Python interface to PROJ.4 library. Performs cartographic transformations and geodetic computations.
Questions tagged [pyproj]
184 questions
0
votes
1 answer
Projecting from Irish Transverse Mercator (ITM) to WGS84 latitude-longitude
Unfortunately my projection from Irish Transverse Mercator (ITM) to WGS84 latitude-longitude seems to have gone wrong as the plotted coordinates don't line up with a map of Dublin sourced from the CSO (see below).
My transformed coordinates plotted…

rdmolony
- 601
- 1
- 7
- 15
0
votes
1 answer
python pyproj transform yielding different results for the same input parameters
I'm running a simple python script to transform longlat Nad83 to Ky State Plane South Nad83 (epsg 4269 to 6474). When I set the input Projection to:
inProj = pyproj.Proj(proj='longlat', datum ='NAD83')
I get one answer (which appears to be…

moon
- 1
0
votes
1 answer
How to check if the coordinate transformation worked?
I have a pandas dataframe that looks like this
latitude longitude xx yy
0 37.75153 -122.39447 553343.041098 4.178420e+06
1 37.75149 -122.39447 553343.069815 4.178415e+06
2 37.75149 -122.39447 553343.069815 …

quant
- 4,062
- 5
- 29
- 70
0
votes
1 answer
"b'no arguments in initialization list" with pyproj, Pycharm, and Anaconda
So I've been attempting to do a little GIS projection conversation for a project of mine, using some code I found online.
from pyproj import Proj, transform
inProj = Proj(init='epsg:8826')
outProj = Proj(init='epsg:4326')
x1,y1 = 2305277.9,…

rwjam
- 163
- 10
0
votes
0 answers
Geopandas to_crs flips map
I have a shape file over Swedish historical municipalities. The CRS is epsg:3034 according to the documentation.
Geopandas to_crs flips the map when converting the coordinate system to WGS84.
Why is this happening and how can I correct it?
Code…

jon
- 35
- 9
0
votes
0 answers
OSMnx Error: No module named 'pyproj.compat'
I am attempting to try out some applications of OSMnx. The installation goes through without errors following the provided installation guide using Anaconda3 in Windows 10. However, upon importing the package,
import osmnx as ox
I receive the…

Taylor Johnson
- 1
- 1
0
votes
1 answer
How do you reproject a shapefile?
I'm trying to change the projection of my shapefile from "epsg:26741" to "epsg:4326" using python code. I have looked up how to do this online and found some code, but when I run the code, it throws an error message. This gets thrown specifically in…

Ice
- 1
0
votes
1 answer
I have a json file that has a 2263 projection and i want to change it to 4326 using pyproj?
How do i use the pyproj module to take a file from a path and just change it automatically?
The file also includes multiple rows of data. It would probably need to run a loop on all the coordinates and just change them?
I've added this code into…

user35131
- 1,105
- 6
- 18
0
votes
1 answer
Why is my code calculating an incorrect distance between transformed coordinates?
I have a large file of points and I am trying to find the distance between those points and another set of points. Initially I used the to_crs function of geopandas to convert the crs so that I can get an accurate distance measure in terms of meters…

SingaporePythonProgrammer
- 206
- 1
- 2
- 11
0
votes
1 answer
Mapping lat long coordinates with pyproj
I have a series of Coordinates in standard LAT/LONG format. I would like to plot them on a X-Y axis using a meter scale.
Ideally I would find the most southern eastern point and use it as origin. I found online the library "pyproj" and I would like…

Mike
- 375
- 1
- 4
- 14
0
votes
1 answer
How to transform lat/lon coordinates from degree to km to create a 1 km grid
I have a dataframe containing lat/lon coordinates in decimal degree.
My goal is to aggregate the data on a rectangular grid of 1 km². For that matter, I transformed my coordinates into km based on the method described in Convert latitude, longitude…

JaneDOEE
- 1
- 3
0
votes
1 answer
Shapely/PyProj area calculation doesn't match Google Earth Engine nor Geojson.io
When calculating the area for a polygon, the result using shapely/pyproj is drastically different when compared to google earth engine or geojson.io. I figured this has something to do with projection and when looking into it, I found examples such…

Brenton
- 85
- 1
- 8
0
votes
1 answer
Unable to translate to Mercator projection using geopandas
I am trying to plot a map of Spain using Geopandas and Matplotlib. I am using the GeoJSON file you see below in which the geometry is in geographical coordinates (EPSG 4326)
I would like to plot the map in Mercator projection but when I try to…

juancar
- 187
- 2
- 16
0
votes
1 answer
Converting coordinates to longitude and latitude using pyproj
I am trying to convert coordinates to longitude and latitude using Pyproj, however I get an error that I am unable to solve:
b'no arguments in initialization list'
from pyproj import Proj, transform
inProj = Proj(init='epsg:3942')
outProj =…

Peslier53
- 587
- 1
- 7
- 21
0
votes
1 answer
"Invalid projection" when creating a CRS
I am attempting to construct a CRS instance with PyProj to match a geographic shape to image bounds. With the following code
pyproj.Proj(proj='aea', lat1=b[1], lat2=b[3])
I am getting the error:
pyproj.exceptions.CRSError: Invalid projection:…

Evan
- 174
- 2
- 10