Questions tagged [pyproj]

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

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

Choosing the right projection using PyProj

I'm starting with GIS work trying to analyze movement of cars on a track. I've understood that in order to use a library like shapely I need to transform from GPS spherical coordinates to Cartesian ...
2
votes
1answer
43 views

How to calculate the corner points of a grid if centre points are know

I am working with a file which has the coordinates in WGS84 format. From this file I have calculated the Cartesian coordinates using the following code: import numpy as np import pyproj from netCDF4 ...
0
votes
1answer
31 views

Converting latitude/longitude to UTM using GDA2020 datum with Pyproj

I want to convert a pair of (latitude, longitude) values that represent a location in Australia to UTM values within the GDA2020 datum. I tried to do something similar to what I usually do with North ...
1
vote
1answer
44 views

How convert lat lon to another format? [closed]

Input data 47,4792010000765 42,989255000241 Output data 5285360.478599999 5310336.491400003 But i receive 3643985.9453798616 5539030.168736918 Whats incorrect in my code? import pyproj Lat = 47....
4
votes
3answers
507 views

I am getting the wrong result for north coordinate

from pyproj import Proj #converting lat/long - UTM lats = -22.818009494 longs = -47.059235202 alt = 644.2332 myProj = Proj("+proj=utm +zone=23K, +south +ellps=WGS84 +datum=WGS84 +units=m +...
1
vote
1answer
33 views

How to get the affine matrix between 2 projection using pyproj?

I'm struggling getting the affine matrix (or crs_transform) using pyproj. The Transformerobject is full of functions to actually transform coordinates but I just want to check the matrix: I'm stuck ...
1
vote
1answer
45 views

QGIS custom coordinate reference system of a local site

I am creating a geo database for an archaeological excavation. We want to put data from a local system and from UTM35 in the same QGIS-project. I have Ground Control Points in both systems. I setted ...
2
votes
1answer
33 views

How to convert Australia related EPSG in pyproj?

I want to convert longitude (151.209900) and latitude (-33.865143) into Australia related EPSG (4283 and 7844) by using pyproj library. I have tried: from pyproj import CRS, Transformer transformer = ...
2
votes
1answer
56 views

PostGIS ST_Transform seems to treat the vertical datum but not the equivalent pyproj Transformer, even so they both rely on Proj

I've narrowed down a problem I met when processing some points having altitude values to the following: It seems that PostGIS and pyproj do not treat the vertical datum in the same way but both are ...
2
votes
1answer
46 views

Getting Projected bounds information in pyproj

I'm building an API where user can insert a number (3857, 27700,etc.) and my API will give the projected bounds. I'm using pyproj's crs_number = 27700 crs_custom = CRS.from_user_input(crs_number) ...
1
vote
0answers
213 views

how to convert X, Y coordinates pixel of the screenshot image.png from the map to really Long, lat

I need to convert the x,y coordinate of the PNG image from the map into Latitude and Longitude. I took an image from google-map that map image is cut from the part of the city here is a sample image ...
0
votes
1answer
33 views

Cassini (Soldner) in pyproj

So there is the cassini projection in Proj. It is possible to use it in the OSGeo4WShell. example: +proj=cass +lon_0=.... +lat_0=.... +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs Is there a way to ...
1
vote
0answers
33 views

Special relationship between EPSG:4326 and EPSG:4369

This is a follow-up question to a previous one (Projection between EPSG:4326 and EPSG:4269 using pyproj does nothing). When using pyproj (python 3.8.8 and pyproj 3.0.1 on windows) to project a point ...
1
vote
0answers
48 views

Projection between EPSG:4326 and EPSG:4269 using pyproj does nothing [duplicate]

According to this quite thorough answer : Is re-projection needed from SRID 4326 (WGS 84) to SRID 4269 (NAD 83)? the crs EPSG:4326 and EPSG:4269 are slightly different, due to a difference in one of ...
1
vote
1answer
76 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
74 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
226 views

Setting CRS of point using 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
43 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
106 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
217 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
111 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
363 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
129 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
190 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
31 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
62 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
39 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
490 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
91 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
82 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
480 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
134 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
139 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 ...
4
votes
2answers
3k 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
461 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
136 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
81 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
134 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
82 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
56 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
48 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
220 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
34 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
152 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
40 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
197 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
263 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
127 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....

1
2 3 4 5