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
35 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 ...
0
votes
1answer
31 views

pyproj gives inf instead of values

I want to convert the coordinates (639117.49, 6865775.92) from EPSG:4326 to EPSG: 3949, by using the following code: from pyproj import Proj, transform P4326 = Proj(init='epsg:4326') P3949 = Proj(...
1
vote
1answer
25 views

How can I transform X Y coordinates of NAD83 Texas North Central to latitude and longitude, preferably in Python?

I am at my wit's end here! For a project at work, I am plotting a simple map in Power BI that pinpoints some of our internal utility permitting activity. One of the datasets I have been given appears ...
2
votes
1answer
16 views

Geodesic distance discrepancies using proj

I have two positions represented as latitude,longitude pairs, and I'm trying to get the distance between them. I've 3 methods that all yield different results, where I think they should be VERY close. ...
1
vote
0answers
41 views

Error while reprojecting CSV-file with pyproj

I am trying to reproject a csv-file and here's the error i get. File "C:\Users\jonat\Anaconda3\lib\csv.py", line 98, in fieldnames self._fieldnames = next(self.reader) Error: iterator ...
0
votes
1answer
29 views

Errors relating to merging point shapefiles

I have created two different point shapefiles which represent towns within a state. However I want to know the distance between both towns, but first I want to draw a line between them. Is this ...
1
vote
1answer
33 views

PyProj incorrect transformation from EPSG:25832 to EPSG:4326

I have the following code to transform coordinates: from pyproj import Proj, transform def transform_coordinates(coordinates): (x, y) = coordinates inProj = Proj('EPSG:25832') outProj = ...
0
votes
0answers
27 views

name 'pyproj' is not defined

I am trying to use pyproj and transform but I have an error name 'pyproj' is not defined. I check my environment and I can see the pyproj version 2.6.0. My python version is 3.7.3. So, what's going ...
0
votes
1answer
40 views

What is the order of parameter (lat/long) in python UTM package for conversion into x, y coordinate?

Currently, I am trying to convert (lat, long) into (x, y) coordinates in Python. There are some packages like pyproj or utm to do that. For example: import utm lat = 41.8836718276551 lon = 12....
2
votes
2answers
138 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, ...
0
votes
1answer
52 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
48 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....
0
votes
0answers
39 views

Datum Transformation from WGS84 UTM Zone 35N to ED50UTM Zone 35N with a grid shift file (.gsb file)

I would like to transform WGS84 UTM Zone 35N coordinates to ED50UTM Zone 35N coordinates with a grid shift file (.gsb file I have) in python using pyproj. I tried below code but it gives failed to ...
1
vote
1answer
55 views

Shapely/Pyproj converts all polygon coordinates to inf [duplicate]

After some libraries got updated, I can't convert a polygon between CRS in shapely/pyproj. Everything seems to be done according to the documentation. Pyproj version 2.4.2.post1, Shapely version 1.7....
3
votes
2answers
166 views

Use pyproj new projection initialization method when setting a CRS in GeoPandas

Issue Using GeoPandas: this: (...) t_srs = 4326 gdf.set_geometry('geom', crs={'init': u'epsg:'+str(t_srs)}, inplace=True) or this: (...) gpd.read_postgis(sql_string, conn, geom_col='geom', crs={'...
2
votes
1answer
53 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 ...
1
vote
2answers
53 views

GeoTIFF projections with Python GDAL

I have a GeoTIFF I imported into Python environment with GDAL. The image has spatial reference data, which are the parameters describing the geo model: (-104.31292762744124, 0.00030593847623094916, 0....
1
vote
0answers
32 views

Re-occuring errors in my JupyterLab environment because of instillation errors in anaconda?

I use python in the JupyterLab notebook environment through anaconda3 for my coding. I recently encountered a Runtime Error when trying to set the CRS for a geodataframe and from my research online it ...
2
votes
1answer
61 views

Including geoidgrids when initializing projection via EPSG

It's not clear to me how you're intended to initialize a pyproj.Proj() object with both an EPSG code and geoidgrids. For my specific use case with the grid file downloaded from here: epsg = 3162 # ...
2
votes
0answers
59 views

Using PyProj/Programming to Convert Lat/Lon to X,Y on a Gnomonic Projection

As a preface, I'm pretty new to the world of GIS. I'm working on a personal project to create interactive event timelines over custom maps. Being I'd like to be able to intake a an event location (in ...
1
vote
1answer
30 views

World_Eckert_IV to Latitude/Longitude projection is incorrect

I'm using pyproj to transform between coordinate systems. Here is my .prj file: PROJCS["World_Eckert_IV", GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], ...
0
votes
1answer
60 views

Distance between two points is not proportional above or below the Equator

I am trying to develop a tool that would find a point (longitude, latitude) that would be located a chosen distance away to the left from given point using Python and pyproj. I am not very familiar ...
1
vote
2answers
117 views

Making a coordinate transformation on a csv file using pyproj?

I mostly got my answer from this original posting: How to reproject 500 CSV files efficiently and easily using QGIS? and using the code from response 7 from blord-castillo. My problem is that the ...
2
votes
1answer
39 views

Convert LR/LOLA data to latitude and longitude

I have height map data from here LR LOLA DEM from the Moon which seems to be "simple spherical" and I want to convert them to latitude and longitude with this: (It's a bit pseudo code) from affine ...
1
vote
1answer
110 views

Transform geospatial data from decimal degrees to x,y coordinates using pyproj in Python

I have the following dataframe 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 -...
0
votes
1answer
42 views

2D move transform with pyproj

Let's say I want to move my 2D coordinate system by A and B meters in pyproj. How would I do it?
3
votes
1answer
92 views

What is the correct way to assign GeoPandas a CRS from Rasterio?

I'd like to be able to create a new GeoPandas object and inherit the CRS from Rasterio, and save a shapefile. The current projection format is seen as invalid when writing an ESRI driver. From here, ...
0
votes
0answers
78 views

Transform XY coordinates from within a custom flat geometry to latitude and longitude

I am looking for a Python based tool/API (PyProj?) that will help me transforming a set of XY points from within a custom flat map to latitude and longitude. I have information about the latitude and ...
1
vote
0answers
40 views

Generate custom WKT Coordinate System definition from local / WGS84 pairs of coordinates [closed]

I am wondering if it possible to create a custom WKT for coordinate transformations based on pairs of WGS84 lat/lon and the corresponding local N/E values. So like a minimum 2 pairs? If so is it ...
2
votes
1answer
221 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 ...
2
votes
1answer
57 views

How can I determine if a transformation between two CRS is simply scaling/translating or more complex?

We are using pyproj to transform between coordinate reference systems. What is a good way to check if the transformation is simply scale/translate/units? Basically, I want to know if a grid in the ...
3
votes
1answer
636 views

Constant future warnings with new pyproj

When I work with different CRS in GeoPandas, pyproj module always fires many FutureWarnings. /home/culebron/.local/lib/python3.7/site-packages/pyproj/crs.py:77: FutureWarning: '+init=<authority>...
4
votes
1answer
212 views

Setting CRS to ESRI:102001 using GeoPandas

I've been passed some GeoJSON shape data that I've been told is in the CRS ESRI:102001, although that property has not been written into the GeoJSON file. I've been able to confirm that is the correct ...
1
vote
0answers
30 views

Manipulating Transformation parameters with PyQGIS

Is it possible to add a layer with a local coordinate system, transformed on the fly by a custom transformation entry from this local CRS -towgs84 and furthermore to manipulate the -towgs84 Parameters?...
1
vote
1answer
51 views

Updating Pyproj syntax results in other values

I want to know the length in meters of a LineString with coordinates in EPSG4326. Based on this post, this is code that works for me: from shapely.geometry import LineString from shapely.ops import ...
0
votes
0answers
47 views

Convert heights from DHDN Gauß Krüger Zone 4 to UTM 32 ETRS 89 in pyproj

I am using pyproj. X/Y conversion is pretty straightforward through transformer = Transformer.from_crs(31468, 25832,always_xy=True) However, this does not transform the heights. From Vertical ...
3
votes
2answers
169 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 ...
1
vote
2answers
141 views

Project large collection of shapely object to different CRS [closed]

What is the most efficient way of projecting several thousands of polygons and multipolygons to a different CRS in Python? I have found that looping over the polygons and reprojecting them one by one ...
6
votes
1answer
149 views

How can I convert the Gaussian coordinates( Gauß-Krüger) to the WGS84 coordinates

I have a list of WGS84 and Gauss coordinates, but how to convert another WGS84 coordinates. I want to use PROJ for conversion. What is PROJ string like? | Name | x | y | H | ...
1
vote
1answer
74 views

Creating custom proj4 string from components

I'm trying to work with NOAA's NDFD weather data, which are released as rasters in GRIB format. Specifically, I'm currently trying to get the pixels that intersect an arbitrary geometry. Information ...
1
vote
1answer
298 views

MapProxy Installation problem with PyProj

I'm testing MapProxy (1.12.0) on a Windows Machine and followed each step from the "Installation on Windows" docs. I have a running virtualenv, used pip to install MapProxy and PyProj. The command ...
1
vote
1answer
44 views

Conversion of NAM Lambert Conformal coordinate system to NAD 1983 UTM Zone 11N

I am attempting to convert the NAM wind data coordinate system using data from the thredds server: Catalog = TDSCatalog('http://thredds.ucar.edu/thredds/catalog/grib/NCEP/GFS/' ...
0
votes
1answer
79 views

Get type of projection from pyproj CRS object

I'm used to using PROJ strings/dictionaries in python where I have access to a proj_dict['proj'] element. I have some calculations that I can only do with the PROJ.4 geos projection and otherwise ...
2
votes
1answer
73 views

Gravity related height from ellipsoidal height using pyproj

I'm using the pyproj library (http://pyproj4.github.io/pyproj/stable/index.html) to get translate ellipsoidal heights into gravity related height. Code: from pyproj import CRS from pyproj import ...
3
votes
2answers
289 views

How to create an hexagonal grid of regular hexagons of definite area anywhere on the globe, using shapely?

I have a geojson file describing a polygon. I want to create an hexagonal grid on top of this polygon, with regular hexagons of area 90000 square meters. Right now, I can either guarantee the area, ...
0
votes
1answer
384 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 ...
2
votes
1answer
54 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....
0
votes
1answer
2k 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 ...
2
votes
1answer
205 views

Transforming geometry points coordinates to WGS84 in geodataframe

I have shapefile that has been brought into my script as a geodataframe. Initially, it shows no crs although the source originally had a datum = NAD83. I want the coordinates for the geometry (the ...
1
vote
2answers
200 views

`pyproj` initialization error in PyCharm but not in cmd?

I am currently struggling to get pyproj to initialize when running in PyCharm. Oddly enough, I am able to get it to work in cmd. The version of pyproj I am using is 1.9.6, and the version of proj4 I ...