Skip to main content

Questions tagged [pyproj]

A Python interface to the PROJ library to perform cartographic transformations and geodetic computations.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Reading MSG Native(.nat) file with satpy

I am trying to read an MSG (Meteosat Second Generation) file given in the native(.nat) format using satpy. I tried using: import numpy as np import os from satpy import Scene import matplotlib.pyplot ...
The Emerging Star's user avatar
2 votes
2 answers
67 views

Obtaining list of all EPSG code for a single location on map

There are APIs like https://epsg.org/info-api.html, maptiler which takes text input like "San francisco" and returns EPSG codes, but the problem, is I am not able to find a library or a tool ...
uk2797's user avatar
  • 21
0 votes
1 answer
31 views

Creating custom projection in pyproj

I'm working on program that converts WGS-84 (ITRF-2005) to local coordinate systems. I have file with transform parameters looking like: #СК-63(С2) 0 0 0 <999632> +proj=tmerc +lat_0=0 +lon_0=27....
Vanyaxxl's user avatar
4 votes
1 answer
90 views

pyproj.Transformer.from_pipeline inverse / Using EPSG transformation code how to invert?

I have been trying to use PROJ as an an alternative confirmation of correct parameters when doing transformations (either by spreadsheet or third party software). Typically we will get instructed by ...
marky9074's user avatar
0 votes
0 answers
5 views

Discrepancy in area calculation between pyproj1 and pyproj2

I am wondering if anyone else has come across this difference when changing from pyproj 1 to pyproj 2 as described in the FAQ's: https://pyproj4.github.io/pyproj/stable/gotchas.html#upgrading-to-...
Jaffe's user avatar
  • 1
0 votes
0 answers
28 views

Making transformations between ellipsoids using PyPROJ

I am transforming coordinates between the Ellipsoids WGS84 and Hayford International using the code from pyproj import CRS, Transformer Define CRS objects for WGS84 and Hayford International ...
nic's user avatar
  • 1
1 vote
1 answer
128 views

User-defined reprojection using rioxarray

I'm trying to reproject a raster dataset using a user-defined projection in Python. I was able to achieve the desired reprojection setting ArcGIS's arcpy.CreateCustomGeoTransformation_management tool ...
Liyuneh's user avatar
  • 11
0 votes
0 answers
27 views

Making C# transformation using gdal referencing python-based pyproj

Recently, I have been migrating code from python to c#. One of the things that is necessary is for coordinate transformations of large amounts of data. The python script looks like the following: ...
Miss_Orchid's user avatar
2 votes
0 answers
50 views

Why does moving to the east of a given geographic origin vary latitude?

I am trying to compute the longitude and latitude of points given an origin point of known longitude and latitude, and (easting, northing) coordinate offsets from that origin (in meters). I know this ...
louisbzk's user avatar
3 votes
2 answers
68 views

OSGeo / PROJ - TransformerGroup Ordinality

My question is within the context of working with pyproj, the popular python package wrapping OSGeo's PROJ library, but it probably spills over into coordinate transformations as a whole and ...
Michael Di Felice's user avatar
1 vote
0 answers
69 views

How to use pyproj to convert between ITRF2014 2023.9 to ITRF2014 2017.0

I am trying to convert a current observation from 2023.9 to a ITRF2014 2017.0 epoch. The Longitude Latitude is: -83.9851111, 43.9823026, 191.101. I Used pyproj to convert to ITRF2014 and then convert ...
Cary H's user avatar
  • 996
0 votes
0 answers
87 views

Pyproj Azimuthal Equidistant (AEQD) transformation always gives a small rotation as compared to country-specific CRS transformations

I am calculating building polygons from a satellite image. This works accurately when using a country-specific CRS. I would like to use a customer CRS, specific to the location at hand, but find that ...
robkew's user avatar
  • 1
1 vote
2 answers
335 views

Transforming from NAD83(2011) or from WGS84 gives the same result (pyproj)

I'm trying to transform (using pyproj) the same coordinates, first from WGS84, and then from NAD83(2011), and I'm getting the same result: from pyproj import CRS, Transformer from_wgs84_transformer = ...
paul's user avatar
  • 11
2 votes
0 answers
148 views

Python : Grid projection issue between 4326 and 3857

I have a polygon in epsg:4326 coords and I would like to create a regular grid of 7000 meters mesh size. import numpy as np import shapely import pyproj import geopandas as gpd polygon_aoi = ...
Magic Mushroom's user avatar
0 votes
1 answer
160 views

Define latitude longitude grid from center point

I would like to create a regular squared grid from a particular point. I have a polygon, I take the center of this polygon and I would like to create a grid that contains this polygon using Python. I ...
Magic Mushroom's user avatar
1 vote
1 answer
65 views

Create a custom CRS using EPSG transform method 9666 (P6 I=J+90 seismic bin grid coordinate operation) with pyproj

I am trying to recreate the EPSG example of georeferencing I=J+90 local bin grid using the P6 I=J+90 seismic bin grid coordinate operation (EPSG code 9666) but the resulting CRS can't be used to ...
YeO's user avatar
  • 609
1 vote
1 answer
802 views

Converting between WGS84, SK42 and ED50 geodetic reference datums

I need to convert between WGS84, SK42, and ED50 geodetic reference datums in either a UTM or MGRS coordinate system given GPS coordinates I've been using pyproj for the conversion by finding the EPSG ...
Christo Labuschagne's user avatar
0 votes
0 answers
241 views

Error installing pyproj

I am getting the following error when attempting to install geopandas: [~]$ pip3.9 install pyproj Collecting pyproj Using cached pyproj-3.6.0.tar.gz (224 kB) Installing build dependencies ... done ...
Joel Breazeale's user avatar
1 vote
0 answers
214 views

Vertical datum transformation with PyProj returns same elevation

I am trying to develop Python code to do a vertical datum transformation between WGS84 (GNSS elipsoid height) to NAVD88 geoid height. I have seen and copied the code from @asynchron located in the ...
GBG's user avatar
  • 10k
1 vote
1 answer
284 views

Running pyproj installed with pip but not with conda

I am running Python 3.11.4 I would like to use pyproj 3.6 to calculate geoid heights as described in the documentation exemple. However, I don't get the same result as in the documentation when ...
basso31's user avatar
  • 21
2 votes
0 answers
180 views

Projection is not found when importing PostgreSQL file with Geopandas

I need to import a couple of files from my PostgreSQL database, which has columns with the geometrical data stored in the CRS "epsg:1330". There are no problems with opening the files using ...
Idalh's user avatar
  • 61
0 votes
0 answers
127 views

Converting Baidu coordinates to WGS 1984 Web Mercator Auxiliary Sphere

I'm trying to convert Baidu coordinates to WGS 1984 Web Mercator Auxiliary Sphere. I have a csv file in which each observation has the latitude and longitude for 2 separate points (4 columns total). I ...
hansen9's user avatar
4 votes
2 answers
2k views

How to convert wgs84 from ellipsoidal height to mean sea level i.e. height above goid, with pyproj?

I want to convert wgs84 coordinates with ellipsoidal height to wgs84 coordinates with height above goid. Therefore I have set up a new conda environment and installed pyproj, proj_data, see conda list ...
sehan2's user avatar
  • 457
1 vote
0 answers
82 views

Why are x and y switched here?

I'm trying to convert between EPSG:7665 and EPSG:32145, but I have to swap the x and y values to get the correct answer. From this datasheet reference point, here's the position: OD1097* NAD 83(2011) ...
Crag's user avatar
  • 111
1 vote
0 answers
72 views

Transforming from ESRI:102173 to EPSG:4326 returning wrong results [closed]

I am trying to convert a set of coordinates using ESRI:102173 system to a standard EPSG:4326 to be able to compare them with other data sets. The issue I am having is than when converting the values ...
Kiwiman's user avatar
  • 11
0 votes
1 answer
871 views

EPSG code has stopped working with pyproj.Transformer.from_crs, but still works with pyproj.transform and pyproj.Proj

My code: from pyproj import Proj, Transformer EASE_Proj = 'EPGS:3409' WGS_Proj = 'EPSG:4326' transformer = Transformer.from_crs(WGS_Proj, EASE_Proj) Suddenly produces the following error after ...
Robbie Mallett's user avatar
0 votes
3 answers
1k views

Creating geometry from lat/lon column using Python

I used the code: import geopandas as gpd geom = gpd.points_from_xy(dat['lon'], dat['lat'], crs=4326) dat = gpd.GeoDataFrame(data=dat[['value']], geometry=geom) but I receive the error: CRSError: ...
Julius Bamah's user avatar
4 votes
1 answer
334 views

Why does GeoPandas behave differently on Windows and Linux (and is there a work-around)?

I am using Python Geopandas 0.12.2 to read and reproject a shapefile. My code works on Windows 10 but does not produce the correct results on Linux. Specifically, the Linux implementation produces a ...
wzell's user avatar
  • 43
1 vote
3 answers
465 views

Identifying the EPSG code for projection

I'm trying to convert a dataset that has projection parameters in meters to lat/long coordinates. After researching online and on stack exchange, I came up with a code. I used the input EPSG as 3857 ...
Rishikesh Sreehari's user avatar
2 votes
0 answers
402 views

How to use an affine transformation pipepline with GDAL Python API?

I am trying to transform coordinates from a local grid to a projected coordinate system (UTM) to ultimately reproject raster or vector data. I am using : Python 3.9 GDAL 3.6.0 Pyproj 3.4 I generated ...
user1639843's user avatar
1 vote
1 answer
1k views

Converting contours in an image to lines in shapefile using Python

I have processed a screenshot from Google Maps using OpenCV and identified some contours for the red road sections, and I want to project these contours to a shapefile. I have searched but couldn't ...
ali bakhtiari's user avatar
1 vote
0 answers
105 views

How to display a map using a new projection (new latitude/longitude to XY conversion formula) [closed]

I have constructed a new formula for planar projection that converts latitude and longitude into XY coordinates, a projection that is completely new and not derived from some projection. def transform(...
Bury Breeze's user avatar
1 vote
1 answer
2k views

Lat/lon after moving x meters to a specified direction

I have recently been working with coordinate systems in Python with pyproj package. I'm facing the following problem: I know my current position from a GPS receiver as EPSG:4326 latitude/longitude ...
Zni's user avatar
  • 13
0 votes
1 answer
324 views

Pyproj transformation of a geopandas does not match QGIS reprojection

I have a file in British National Grid coordinates (EPSG 27700) which I'm trying to convert to WGS84 (EPSG 4326) My first attempt was to transform in the usual way import geopandas as gpd file = '...
Daniel van der Maas's user avatar
0 votes
0 answers
35 views

Reproject raster from rectilinear LCC to rectilinear GK

I have many climate raster (netcdf) in a rectilinear grid in LCC projection (EPSG 3034) and I want to reproject it with python to a local Gauß Kryger projection (31467). Reprojecting every raster ...
PDistl's user avatar
  • 95
0 votes
0 answers
203 views

Datum conversion from NAD27 + NGVD29 height (ftUS) to NAD27 + NAVD88 height (ftUS) using python

I am using Python pyproj to convert xyz values of Louisiana, USA region from NAD27 + NGVD29 height (ftUS) to NAD27 + NAVD88 height (ftUS). So, I am not changing the horizontal projection (because it's ...
ZVY545's user avatar
  • 119
3 votes
1 answer
348 views

Return used transformation from GDAL warp (or similar)

I would like to identify/confirm the transformation used when reprojecting a raster with gdalwarp (or gdal.warp in python). I already tried to find possible transformations with pyproj.Transformer, ...
martin-git's user avatar
0 votes
1 answer
410 views

How to transform X and Y from LV95 to Lat Long with pyproj

I am trying to convert data from LV95 (Berne = 2600 / 1200 km) to WGS84 (~ETRS89) Is this possible with pyproj. I'm trying like this from pyproj import Proj, transform inProj = Proj(init='CH:1903_LV03'...
Tobi's user avatar
  • 103
0 votes
2 answers
360 views

Python script converts UTM to northern hemisphere fine, but I need southern hemisphere

I'll start off by saying that I do not know how to code, and I have been using this Python script to convert building models from lat-long into UTM for many years. The problem is that in all of these ...
user155324's user avatar
1 vote
1 answer
84 views

Proj R_A discrepancy with computed authalic radius

Using Pyproj, I attempted to create a spherical CRS using the authalic radius from WGS84: import pyproj wgs84_spherical = pyproj.CRS.from_proj4('+proj=latlon +ellps=sphere +R_A=WGS84') print(...
shadowtalker's user avatar
1 vote
1 answer
316 views

How to convert WGS84 to NAD27 in pygeodesy?

Using PROJ, this command will convert / reproject / transform a WGS84 latlon point to NAD27 CONUS, UTM zone 11: cs2cs.exe +proj=latlong +init=EPSG:4326 +to +init=EPSG:26711 -120 39 240281.39 ...
Tom Grundy's user avatar
1 vote
1 answer
2k views

Convert GeoPandas linestring from lat long to UTM

I can convert points from lat long to UTM OK using the following code from shapely.geometry import LineString from shapely.ops import transform from functools import partial import pyproj wgs84=...
proximacentauri's user avatar
1 vote
1 answer
157 views

pyproj return meridian_convergence of -0.0 degrees for given point in 4326

I am trying to get the correct meridian_convergence for my given point in EPSG:4326 When I try to run the following code I am getting -0.0 were expecting I 0.6 degrees. import pyproj lat, long = 30....
Losbaltica's user avatar
  • 1,479
3 votes
2 answers
492 views

Test validity of CRS for a single coordinate in python

Does anyone know if there is a simple way to check if a CRS (given by EPSG code) is valid for a single coordinate (lon, lat)?
george_the_frog's user avatar
1 vote
2 answers
3k views

How to convert lat/lon to x/y in Lambert conformal conic projection using Python

I am trying to convert some lat and lon to x and y with projection Lambert conformal conic. I am trying the Python package pyproj for that but getting the wrong values. The issue is that the ...
lsr729's user avatar
  • 323
1 vote
1 answer
7k views

Draw a line between pairs of points with calculating the distance using Folium

I'm trying to achieve the exact transformation explained in this post. Basically, I have a pair of XY coordinates (in EPSG 2154) and by using Folium, I need to : display those points in a map draw a ...
Timeless.'s user avatar
  • 644
1 vote
1 answer
832 views

Converting X/Y coordinates using pyproj giving incorrect results

I have two CSV files which I have to merge and the only thing common I found was one of them has coordinates of six points for polygon. and the second file has x, y coordinates which is the only ...
HIMANSHU GUPTA's user avatar
1 vote
1 answer
544 views

Transforming EPSG:4979 to given WKT (~EPSG:6654)

I am setting up a GIS to transform points defined in lon/lat/z (referenced to WGS84, or in EPSG:4979) to an input .laz/.las file coordinate system. I've handled reading the wkt from laz/las files with ...
kae's user avatar
  • 13
0 votes
1 answer
2k views

Convert coordinates to decimal degree in Python

I am having coordinates from EPSG:4647, these are e.g. sample_x = 32695710.12 sample_y = 5726463.327 In order to plot them on a map (using plotly) I need to convert them into decimal latitude/...
Philipp's user avatar
1 vote
0 answers
278 views

How to convert osmium.osm.location cordinates to normal format coordinates in python(Pyosmium)

I have extracted the coordinates data from nodes using pyosmium. Though I was successful in extracting the data but the coordinates which osmium is giving is not in normal format, I tried to convert ...
data en's user avatar
  • 145

1
2 3 4 5
7