Questions tagged [pyproj]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
50 views

Problem transforming coordinates with PyProj

I would like to plot a marker using the Folium library but the data I have is in ETRS89 and Folium does not accept that projection. I am having problems transforming from EPSG25830 (ETRS89) to ...
0
votes
1answer
38 views

Use custom projection in MapProxy

I'm trying to use the proj_data_dir config setting in MapProxy to add support for a custom projection. So far I've been unsuccessful and suspect I'm almost there, but not quite... I've created a file ...
0
votes
1answer
51 views

How can I set the CRS of a point with shapely

I am working on a tool, which transfers data, including geometries, from different legacy databases to postgis. Currently this means I have a MS-access Database, which contains point geometries, but ...
0
votes
0answers
20 views

geopandas.to_crs(epsg=3395) does not work in jupyter notebook. it seems some mismatch with pyproj & geopandas versions?

After importing geopandas df , with epsg =4326, I tried to re project it to epsg =3395 using gdf.to_crs(epsg =3395) in jupyter python note book. I got error "RuntimeError: b'no arguments in ...
2
votes
1answer
44 views

Converting from EPSG:4978 to EPSG:4326 using pyproj always produces 0.0 latitude

I am trying to convert between EPSG 4326 and 4978. I have wrote the following codes: import pyproj lon = -74.6604194 lat = 40.3450248 transformer = pyproj.Transformer.from_crs("EPSG:4326", &...
3
votes
3answers
197 views

What is EPSG number for NZTM?

I am trying to follow the solution posted at Converting projected coordinates to lat/lon using Python to convert NZTM coordinates into WGS84. I wrote following script to covert NZTM to WGS84: from ...
1
vote
0answers
61 views

Pyproj Invalid projection: +init=epsg:25832

In my Python Pandas project I have a .csv file with geographic coordinates and want to transform it into lat,lon format. the last weeks I successfully used the following code to make it work. import ...
0
votes
0answers
61 views

Converting LCC crs to another format

I collected metadata about POIs which I want to visualize. The original data however makes use of a projected CRS ("LCC projection") which I want to transform to lat/lon (WGS84): "crs&...
1
vote
1answer
167 views

Unable to install proj related Python packages in a Linux alpine environment

I'm unable to install pyproj or any proj related Python packages such as geopandas, in an alpine dockerized environment, e.g. [python:3.9.1-alpine3.12][1]. Error is, e.g. for pyproj itself here: # pip ...
3
votes
1answer
91 views

Converting Individual Points Instead of Entire Geometries Causes Different Transformation Results in GeoPandas and PyProj

I am working with geospatial data to be used to make calls to the Foursquare API and conduct cluster analysis on extracted data. To do this, it is helpful if I can project data using both GeoPandas....
1
vote
1answer
105 views

Converting NetCDF WRF weather forecasts from a custom Lambert Conformal Conical projection to WSG84

I'm having some trouble reading a WRF weather forecast prediction file where the coordinates are in a custom Lambert Conformal Conical projection. My final goal is to get the weather forecast a a ...
0
votes
0answers
23 views

Get projection parameters from Leaflet

I have a Leaflet map that is customized by an end-user by panning and zooming to an area of interest. I'd like to then take all of the relevant parameters (projection, zoom level, bounds, etc) and ...
0
votes
1answer
39 views

Using vgridshift from Python

When running the following code:- outProj = Proj("+proj=vgridshift +grids=dvr90.gtx") I am getting the following error: pyproj.exceptions.CRSError: Input is not a CRS: +proj=vgridshift +...
0
votes
1answer
32 views

Large scale map projection (ca. 20 km) in pyproj results in wrong distance

I would like to transform from lon/lat (EPSG:4326) to a local x/y coordinate system for large scale equidistant maps with a map size of ca. 20 km. I need to do this mapping all over the globe apart ...
1
vote
1answer
257 views

How to project Lambert Conformal Conic to WGS84 in Python?

I am using pyproj to re-project Canada's Census Tract boundary shapefiles that are currently in "PCS Lambert Conformal Conic" system. I want to convert them to latitude and longitude WGS84 ...
2
votes
1answer
79 views

Unexpected Conversion Result using Pyproj

I am trying to use Pyproj to convert a location in Boston from State Plane to Latitude and Longitude. However, the result did not turn out as I expected. Here is my snippet: from pyproj import Proj, ...
0
votes
2answers
75 views

Why are the 500 meters not 500 meters? And how do I add 500 meters in x/y direction to a lat/lon point?

I wanted to create a square cell on a map with size 500m times 500m. Therefore, I wrote the following code: from pyproj import Transformer bl_lat, bl_lon = 40.64423086189233, -74.0307935018417 ...
3
votes
1answer
216 views

Shapely flips lat/long coordinate

I have a pandas dataframe containing a Shapely geometry object. The shapely object (circle) was computed from the following SO https://stackoverflow.com/questions/27431528/find-the-intersection-...
0
votes
1answer
89 views

Is it possible to use ESRI:54009 (World_Mollweid) proj with rasterIo?

In a python environment I try to project from EPSG:4326 to ESRI:54009 to compute surfaces. The ESRI description doesn't seem to be recognise by rasterio lib : from rasterio.crs import CRS CRS....
2
votes
1answer
98 views

First call to transform() fails with inf, all subsequent calls are OK - what could be the reason?

I'm trying to get to the bottom of the following (weird) problem. When applying pyproj.Transformer transformation to a certain polygon, it fails the first time with (inf,inf) throughout. Second and ...
0
votes
0answers
26 views

Python pyproj converting from WGS84 to Israel Grid IG 05/12 [duplicate]

Now I see this is duplicate and is answered in Pyproj projection 0.5 meter differnce from official results (IGD05/12,IG05/12) Israel Grid I am trying to translate coords from WGS84 (file collected ...
1
vote
1answer
2k views

UserWarning when trying to get centroid from a polygon GeoPandas

I have this geopandas dataframe: df1 = gpd.GeoDataFrame(df,crs=rasterio.crs.CRS.from_string("epsg:4326"), geometry=df['geojson'].apply(json_load)) df1 = df1.set_crs(epsg=4326) print (df1....
2
votes
1answer
324 views

Translating EPSG:4326 lon lat coordinates to xy using pyproj

I'm trying to work out the details of using pyproj to translate the lat lon coordinates from the USGS Earthquake feed to xy coordinates corresponding to those positions on a basemap of a determined ...
2
votes
1answer
94 views

Pyproj giving negative UTM northing

I have a location off of the coast of Madagascar with longitude and latitude: X = 43.28191425 Y = -22.49701687 This point also has a Z value (height). I want to convert the lat,lon to UTM co-ords ...
1
vote
1answer
76 views

Coordinate Transformation Difference between QGIS and Proj

I transformed coordinates on PyQgis and Proj command line and there is 3.8 meters difference between the transformations. I used the same EPSG codes. For Proj 6.3: echo 35.53 38.75 | cs2cs +init=epsg:...
0
votes
1answer
110 views

Need a simple python program to convert EPSG/SRID 102002 (LCC) to WGS84

I'm going to convert some coordinates from Canada LCC (EPSG/SRID 102002) into WGS84 (EPSG/SRID 4326). I found a python package for this purpose which is pyproj. However, seems it doesn't support ...
0
votes
0answers
64 views

Convert cct and cs2cs scripts to pyproj

I am working on a RTK application where I use proj7.1 to make necessary transformations. The application is written in python3.7 using subprocess.Popen to call cct and cs2cs which may have performance ...
1
vote
0answers
52 views

Issue with circular patterns showing up after orthographic projection

For a project I'm working on, I'm trying to project a GOES-16 image to an orthographic projection centred at the continental United States. In a later stage, I found these odd circular patterns appear ...
0
votes
1answer
47 views

Converting from Local Coordinate to lat/long and vice verse gives out different results

I am trying to convert a set of local co ordinates into lat/long and vice versa and I have the code for it taken from this site itself , the issue is When I do these conversions they are not resulting ...
1
vote
1answer
114 views

Trying to project GeoPandas geodataframe geometry to new CRS is not working as expected

I am working with GeoPandas and a Point GeoDataFrame. I have data points in WGS84 (EPSG=4326) that are located in New Zealand. I am trying to project them to a local UTM, but I cannot get the geometry ...
1
vote
0answers
32 views

Distance difference between Pyproj and Haversine

I'm measuring the distance between two points with two different methods. This results in two very different results. Please have a look: from pyproj import Transformer from haversine import haversine,...
1
vote
1answer
115 views

Using pyproj inverse transform with GeoPandas and GroupBy + SortBy constraints

I am using pyproj inverse transform to add azimuth and distance "info" to a grouped and ordered geodataframe. I asked a similar question earlier here, but I didn't realize grouping was a ...
0
votes
1answer
35 views

Pyproj switching output coordinates

I'm trying to project from ED50 31N to WGS 84. I'm using script below but when I generate the outputs they are inverted from the coordinates I would expect. I expect x_out to be 4.031819616199967 and ...
1
vote
1answer
140 views

Pyproj inverse transform returns NaN with EPSG that is not 4326

I am using pyproj inverse transform to add azimuth and distance "info" to an ordered geodataframe and keep getting unexpected NaN results when I use a local UTM-based EPSG. It works fine in ...
2
votes
1answer
175 views

Adding EPSG codes to Pyproj

I am trying to correct ellipsoid heights to orthometric height, transforming from WGS84 to EGM2008 using the EPSG code 3855. I have tried with pyroj, as in this question: import pyproj EGM2008height = ...
0
votes
1answer
93 views

Proj/PyProj Convert between ocentric and ographic latitudes

I am trying to use Pyproj to perform the conversion between ocentric and ographic latitudes. I can do this using the cct command line tool: echo 0 45 | cct -z0 +proj=geoc +a=3396190 +b=3376200 0....
0
votes
1answer
45 views

How to extract CRS ellipsiod info in correct format for pyproj inverse

I am using pyproj inverse transform to add azimuth and distance "info" to an ordered geodataframe (gdf), but my datasets are in different locations around the world. I need to use a local ...
1
vote
1answer
80 views

Using pyproj inverse transform to get azimuth, row iteration and lambda apply (I'm close to the answer!)

I am using pyproj inverse transform to add azimuth and distance "info" to an ordered geodataframe. I am trying to iterate over all the rows in the geodataframe to add the "info" as ...
0
votes
0answers
215 views

Matplotlib Basemap how to set EPSG to be consistent with new version of pyrpoj

I am getting a Matplotlib Basemap error related to pyproj and setting the EPSG. (I know Basemap is being depreciated, but this is what I am working in for now.) As a result, I can't plot the ...
1
vote
0answers
60 views

How correctly convert WGS84 to Pulkovo 1942 with height?

I have next python code: import pyproj import sys import logging from pyproj import Transformer from pyproj import CRS lat = sys.argv[2] lon = sys.argv[3] z = sys.argv[4] transg = Transformer....
0
votes
0answers
100 views

Conversion of (lat, lon, height) to another CRS with pyproj results in no transformation

I have latitude, longitude, and ellipsoidal_height measurements in the IGS14 CRS. I want to convert/transform/project this data into latitude, longitude, and ellipsoidal_height measurements in the ...
1
vote
1answer
369 views

Transformation from CRS EPSG:3857 to ESRI:54009

I am trying to convert from EPSG:3857 to ESRI:54009 and facing some issues (pyproj version -2.6.1). ERROR 1: PROJ: proj_create_from_database: crs not found ERROR 1: PROJ: proj_create: unrecognized ...
0
votes
1answer
421 views

Reprojecting unequal number of latitude and longitude: pyproj.exceptions.ProjError: x, y, z, and time must be same size

I have a rectangular matrix of geographic climate data with a 1d row of latitude coordinates (size=834) and a 1d column with longitude coordinates (size=1115). They are both in unit of m (EPSG:32630) ...
2
votes
1answer
227 views

Why does pyproj give a different point location compared to ordnance survey when I convert from WGS84 to EPSG:27700 (BNG)

I get different results using 2 methods to convert co-ordinates from WGS84, epsg:4326 to BNG (British National Grid) epsg:27700. The differences in the plotted eastings and northings values are very ...
2
votes
1answer
949 views

ImportError: cannot import name 'CRS' from 'pyproj'?

I have installed pyproj version 1.9.6. using the command prompt window. However, when trying to import CRS (from pyproj import CRS), I receive the following ImportError: ImportError: cannot import ...
0
votes
0answers
39 views

Accommodate for tectonic shift

Given a set of coordinates of landmarks to a specific time how could one accommodate for the change of those coordinates over time via pyproj. I found that Pyproj recommends using the time component ...
0
votes
1answer
810 views

Initalize pyproj correctly

I'm trying to initialize the pyproj transformer as laid out here: Repeated transformations. This seems like it should be pretty easy. I'm trying to go from NC stateplane to lon/lat. https://epsg.io/...
0
votes
1answer
77 views

EPSG Error Trap

I'm using pyproj and I'd like to run an error trap on the EPSG code. Specifically, if the user enters a EPSG code that is not in the proj database, it would provide a Boolean flag I can check before ...
3
votes
1answer
53 views

What is the best way to handle CRSs in Geopandas so that both versions <0.7 and >=0.7 are handled?

I am developing a python package called RivGraph. I've recently run into an issue related to geopandas' decision to overhaul CRS representation, as described here and here. The short of it is that in ...
1
vote
0answers
77 views

Converting QGIS X,Y info to lat, long using Python

I am trying to convert QGIS x,y points into the lat, long coordinates. I have (335687.7471962841, 4487822.535352517) supposedly point to somewhere in the Chicago metropolitan area. I tried the ...

1
2 3 4 5