Questions tagged [pyproj]

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

Filter by
Sorted by
Tagged with
76
votes
8answers
140k views

Converting projected coordinates to lat/lon using Python

This site returns Point: X: -11705274.6374 Y: 4826473.6922 when you search with the first key value of 000090, as an example. I assume that this is a spatial reference. I am looking for instructions, ...
33
votes
3answers
26k views

Transforming Shapely Polygon and MultiPolygon objects

Is there an easy way of transforming Shapely objects (namely, Polygons and MultiPolygons) from one projection to another without having to dig around and extract coordinates by hand? In fact, I don'...
4
votes
2answers
5k views

Installing PyProj into ArcPy

I am trying to install pyproj. I downloaded the zip folder on this page pyproj. Then I copied it to C:\Python27\ArcGIS10.3\Lib. However, when I try to import the module, I get the message: ...
2
votes
2answers
1k views

Vertical Datum transformation using Pyproj

I have been using Pyproj for some time now doing only simple projection and transformation. I am totally new to vertical datum and differences in GEOID among Coordinate systems. I have been trying to ...
24
votes
4answers
25k views

Getting polygon areas using GeoPandas

Given a GeoPandas's GeoDataFrame containing a series of polygons, I would like to get the area in km sq of each feature in my list. This is a pretty common problem, and the usual suggested solution in ...
6
votes
1answer
513 views

Explaining pyproj to_epsg min_confidence parameter?

Following on from this question How can I get epsg code in pyproj with version==2.1.3, I discovered that sometimes when intialising a pyproj Proj instance with a string ESPG code eventually results in ...
6
votes
2answers
6k views

Converting EPSG:2284 to EPSG:4326 with pyproj

I have some points in EPSG:2284 and I'm trying to convert them to EPSG:4326 using pyproj, however I get weird results. When I go to the spatial reference website I see that there is an endpoint that ...
5
votes
4answers
3k views

How to get appropriate CRS for a position specified in lat/lon coordinates?

I have a set of city networks whose coordinates are specified in lat/lons. I wish to run an algorithm on each network that treats them as a planar graph. I'm using python and can use pyproj to project ...
5
votes
4answers
10k views

Change shapefile coordinate system using Python

I am struggling with Python and Kartograph.py. I'd like to change coordinate system of the whole shapefile from EPSG:5514 to EPSG:4326. Found some code in here working for points, but I don't know how ...
3
votes
1answer
1k views

Using Rioxarray / QGIS Projection

For the past couple weeks I have been trying to view GOES17 data from netCDF files (converted to geotif) in QGIS 3.10 but cannot get the projection to work correctly. I have attempted numerous ...
3
votes
2answers
2k views

Converting NAD83 (epsg:4269) to WGS84 (epsg:4326) using pyproj

I'm trying to convert US census data (NAD83) to WGS84. I know the difference between the two is quite minor, but trying to apply the transformation using pyproj does not do anything. e.g.: from ...
4
votes
1answer
2k views

Converting elevations into correct units with pyproj?

I am converting a point from wgs84 into a state plane coord system (epsg: 32051, which is defined in US survey feet) using pyproj, but the transform isn't changing the z values into feet: point_4326 =...
2
votes
1answer
116 views

Pyproj projection 0.5 meter differnce from official results (IGD05/12,IG05/12) Israel Grid

I'm trying to use those parameters and I receive a difference of ~0.5m ALON and BSHM APN Points: coords = [ (dms2rad([31,42,28.5694]), dms2rad([34,36,23.92196]), 55.671), (dms2rad([32,46,44....
1
vote
1answer
100 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 ...
6
votes
3answers
15k views

Converting projected coordinates to lat/lon using pyproj fails

I have been trying to work on this issue on myself mainly referring to this post (Converting projected coordinates to lat/lon using Python?) but still didn't succeed. I have some 2-D data function ...
3
votes
1answer
3k views

Converting state plane coordinates to latitude/longitude

I'm trying to convert pairs of x,y coordinates to latitude/longitude using python. The projection is "NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601_Feet_Intl" and a sample x,y pair is 7625659, ...
2
votes
1answer
8k views

Converting EPSG:2263 to WGS84 using Python Pyproj

I'm trying to convert Projected bounds to WGS84 using Pyproj but getting strange results. The Projected Bounds are : 909126.0155, 110626.2880, 1610215.3590, 424498.0529 The corresponding WGS84 ...
3
votes
1answer
3k views

How to tranform MODIS tiles into lat/long?

I'm trying to get the vegetation index nearest to a particular lat/long. I'm getting the data from here which is 250-meter spatial resolution hdf file. The globally gridded projection is split in 36 (...
3
votes
2answers
747 views

How can I convert points in EPSG:2956 to EPSG:4326 with pyproj?

I have some points in EPSG:4326 -110.28879750 64.46310187 405.49938863 -110.28879359 64.46310086 405.45967110 -110.28880175 64.46310446 405.93823604 -110.28880245 64.46310258 405.48060850 -110....
2
votes
1answer
690 views

Generating custom projection in pyproj

I have little experience with pyproj, but I want to achieve the following task: I have a trajectory of a robot, given in lat/long coordinates which I want to convert to x/y Coordinates. In aerospace ...
1
vote
0answers
45 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 ...
5
votes
2answers
4k views

Converting large data with lat and long into X and Y?

I have 9888562 records in dataframe and I would like to convert my lat, long to UTM x,y. according to my code, I have used pyproj package but because my data are too much it takes a long time and ...
4
votes
2answers
580 views

Generating a custom flat projection in pyproj

I have little experience with pyproj, but I want to achieve the following task: I have a trajectory of a robot, given in lat/long coordinates which I want to convert to x/y Coordinates. And I want to ...
3
votes
2answers
297 views

Using QGIS Python interpreter outside QGIS

I'm writing a simple Python Geoprocessing script which leverages two specific modules: from osgeo import gdal import pyproj The script must be shared with colleagues in my organisation.To avoid ...
2
votes
1answer
130 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 ...
2
votes
1answer
3k views

Find rectangle around point with python?

Given a point, latitude and longitude, how would one find the coordinates of a rectangle centered on that point with a known width and height in meters? I tried using the Geodesic stuff from ...
2
votes
1answer
431 views

Getting EPSG code in pyproj with version==2.1.3?

I'm using pyproj in python and I want to get epsg code based on an existing Proj class. An example in version=1.9.6: from pyproj import Proj CGCS2000metre = Proj(init='EPSG:4544') print(CGCS2000metre....
2
votes
1answer
2k views

Pyproj: converting WGS84 to Robinson

I have a WGS84 coordinate pair (37.7749295, -122.4194155). I have an image that is a Robinson Map Projection of the world. I'm trying to write a python script to locate my WGS84 coordinate on my ...
2
votes
1answer
796 views

Incorrect transformation when using pyproj

I am using pyproj to work with shp files and am relatively new to GIS. I am tryign to visualize the shp data, but am having a problem as I am incorrectly transforming the coordionates. Here is an ...
2
votes
1answer
288 views

Converting Ellipsoidal height to Orthometric height in Python

I would like to convert Ellipsoidal height to Orthometric height in Python. I tried below: import pyproj EGM2008height = pyproj.Proj("EPSG:3855") wgs84_ll = pyproj.Proj("EPSG:4326") print(pyproj....
2
votes
2answers
812 views

Use Proj (Proj4) to convert UTM coordinate to Cartesian coordinate relative to an Earth tangent plane with its origin define as lon/lat? [closed]

I may have asked in the wrong place here, https://stackoverflow.com/questions/61147814. Then I discovered http://gis.stackexchange.com, so I decided to ask again here: I have a UTM coordinate (zone, ...
2
votes
1answer
202 views

Abnormal results projecting WGS84 to local Azimuthal Equidistant projection with pyproj

I am trying to project regular WGS84 coordinates to a local projected system (Azimuthal Equidistant), using meters and centered on the eiffel tower (as an exemple). I am using python 3.8.2 and pyproj ...
2
votes
1answer
792 views

PyProj - Transform coordinate in “HK80 grid” to “WGS 84 / UTM zone 49N or 49S”

Am trying to use python pyproj to do the above conversion (convert/transform from Hong Kong GRID to Hong Kong UTM), but am getting different values from the expected result. My expected conversion ...
2
votes
1answer
124 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 ...
2
votes
1answer
259 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
3k views

pyProj Coordinate Transformation Incorrect

I'm using pyProj to transform extents between two different geographical systems. In a case when both my systems are the same I expect to get back the same extents as inputted but this isn't happening ...
1
vote
1answer
115 views

Creating (x,y) coordinates in .nc from .grib2

I have to use a .nc file as input in a model and such model requires projection_x_coordinate and projection_y_coordinate as variables but I don't have them. Is it possible to create them using pyproj, ...
1
vote
1answer
145 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 ...
1
vote
1answer
4k views

Why do I get error “Runtime: b'no arguments in initialization list'” when running to_crs?

I have a geopandas dataframe that has POINT geometry in NAD83. I want to use to_crs to change them to espg: 4326. When I first bring in the feature class as a gpd dataframe, it shows no crs, so I use ...
1
vote
1answer
703 views

Calculate area of polygons in square meters when CRS is EPSG:25833

I have EPSG:28533 coordinates and would like to calculate its area in square meters and then transform these coordinates to EPSG:3857. I have taken the code from here to calculate the area but it does ...
-4
votes
3answers
3k views

What's the difference between EPSG:4326 and EPSG:36232?

I do not understand what these different EPSG's mean, even though they are both under WGS84. The way the latitude and longitude values displayed are different in both the cases when I try to change ...