Questions tagged [pyproj]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
18 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
  • 924
0 votes
0 answers
42 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
1 answer
179 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
81 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
93 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
0 votes
0 answers
50 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
  • 599
1 vote
1 answer
508 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
172 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
140 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
  • 9,624
1 vote
1 answer
191 views

Problem 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
126 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
103 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
0 votes
0 answers
253 views

How do I use a .gtx file in pyproj?

I want to use the egm08_25.gtx file to convert from ellipsoidal height above goid. from pyproj.transformer import TransformerGroup t = TransformerGroup('EPSG:4979',"+proj=longlat +datum=WGS84 +...
sehan2's user avatar
  • 437
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
  • 437
1 vote
0 answers
72 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
0 votes
0 answers
82 views

Pyproj and removing CRS

I added a CRS into pyproj. I removed my outliers and now I want to convert my tile back to the original heights with the elevations. How do I do this? So far I have this code. tile = pyfor.cloud.Cloud(...
user219892's user avatar
1 vote
0 answers
61 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
679 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
709 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
299 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
398 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
315 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
93 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
1k 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
283 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
31 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
179 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
283 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
277 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
287 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
68 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
259 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
1k 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
124 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,469
3 votes
2 answers
403 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
2k 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
5k 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
719 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
458 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
258 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
0 votes
0 answers
210 views

Receiving Infinity in LineString using shapely and pyproj

I am try get linestring so I can measure the distance and time. Here in this linestring I am getting nan distance and time. data: path = [[29.87819, 121.54944999999998], [24.23111845, 119....
Rajan's user avatar
  • 101
2 votes
2 answers
3k views

Getting wrong coordinates converting UTM to lon/lat with Proj

I have tried many ways to convert UTM to lon/lat, and getting always the same weird result. Getting UTM and lon/lat for a point using GoogleEarth: from pyproj import Proj lon = -40.729124 lat = -20....
Carlos Augusto Frana Schettini's user avatar
0 votes
1 answer
105 views

Conversion from wgs-84 to Minnesota state plane(NAD83(NSRS2007) / Minnesota South) gives NaN values

I am trying to convert latitude and longitude(EPSG:4326) to projected coordinate systems(NAD83(NSRS2007) / Minnesota South). I followed this tutorial. My code: TRAN_4326_TO_3596 = Transformer.from_crs(...
gis_grad_student's user avatar
2 votes
3 answers
200 views

What is an "ographic" latitude (such as in IAU projection 39916)?

In pyproj, I defined/loaded projection IAU 39916. This has the name "Earth (2015) / Ographic / Equirectangular, clon = 180". (I was looking for an equirectangular projection for ...
gerrit's user avatar
  • 719
0 votes
1 answer
250 views

What projection to use for checking how near a point is to a polygon?

I'm using Shapely to do some GIS analysis in Python. I have a Polygon and a Point, both in EPSG 3857 (web Mercator). I want to check whether the point is within a given distance (in metres) of the ...
Tom's user avatar
  • 171
0 votes
2 answers
1k views

Pyproj and a custom CRS

I am converting the geographic coordinates used on old historic maps into WGS84. Through educated guesswork I can establish all the necessary parameters to rebuild the grid system and generate a wkt ...
Tymon's user avatar
  • 11
2 votes
1 answer
721 views

Mask rotated/curvilinear grid (NetCDF) with rectilinear grid (geotiff)

I have two datasets: Climate: avg one month temperature NetCDF File (CF Convention 1.6) grid_mapping_name: rotated_latitude_longitude (with rlat and rlong coordinates defining the grid) curvilinear ...
ProgMau's user avatar
  • 33
0 votes
1 answer
180 views

Why does this suggested change in a Python pyproj initalisation future warning result in an error?

I Recently updated to pyproj v2.6. and started getting future warnings when initalisating a Proj class like so: Proj("+init=world:bng") Proj("+init=EPSG:22770") Both of these ...
dwright's user avatar
  • 313

1
2 3 4 5 6