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
0answers
48 views

Resolving CRS Error in PyProj

I am trying to use the pysheds package to calculate flow accumulation from a DEM. However, when reading the DEM .tif-file, I get the following error. I can't find any more information as to what this ...
2
votes
1answer
57 views

Why is a projection conversion off by factor of SQRT(2)?

I am attempting to draw a 3 km ring around downtown Minneapolis. Let downtown be defined as Government Plaza (-93.2661, 44.9765). I am using this ring to calculate census tracts within a distance of a ...
4
votes
1answer
57 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 ...
2
votes
1answer
57 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
2answers
62 views

pyproj EPSG:4326 converts degrees to radians

Case My input is a point given as x, y and an SRS name which specifies how to interpret the numbers. My goal is to convert these into lon, lat in degrees. I convert this by using this piece of code:...
1
vote
1answer
37 views

Custom projection in GeoServer

I am trying to create a custom projection in GeoServer, but I see nothing (from the logs, neither in the SRS_list) coming out. The projection I'm trying to create is a Mercator for Mercury. I start ...
0
votes
1answer
116 views

Change CRS of large GeoTIFF and extract windows from large raster in Python

This is the first time I am working with GeoTIFF formats and I want to do this in Python. I am trying to use rasterio and pyproj for the following tasks. I have already made some first steps based on ...
0
votes
1answer
42 views

Retrieving lat-lon coordinate from projdef?

I am trying to plot an hdf5 file where geographical domain is defined like : group LL_lat : 23.55908203125102 LL_lon : -138.4263916015652 LR_lat : 16....
0
votes
1answer
51 views

Get central meridian, PyProj?

I am using PyProj and I am trying to find a way how to get Central Meridian and Latitude of the center of the zone for my State Plane coordinate system.
1
vote
2answers
95 views

PyProj giving RuntimeError: b'argument not numerical or out of range'?

I have this string: string = '+proj=lcc +a=6371200.0 +f=0.0 +pm=0.0 +x_0=5632642.22547 +y_0=4612545.65137 +lon_0=-107.0 +lat_1=50.0 +lat_2=50.0 +lat_0=50.0 +units=m +axis=enu +no_defs' Then I do: ...
2
votes
1answer
197 views

Transform coordinate from rotated lat/lon to normal lat/lon WGS84

I have acces to an OPeNDAP service that allows me to peek into a humongous ocean wave dataset. It takes latitude and longitude as inputs (in fact even a range of the two) - but the coordinate system ...
0
votes
2answers
262 views

Projection conversion with Python/Pyproj: Canada Albers Equal Area to WGS

How do I get the geographical coordinates (lat and lon) from x,y values in Canada Albers Equal Area projection? The range of x and y values as follows: min(x) = -5171461.906673405 max(x) = 3372679....
1
vote
1answer
454 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 ...
2
votes
1answer
53 views

Trying to implement Albers projection in Python, what is going wrong?

I have a platform where I can't import Proj4. I only need to convert points to Albers projection, so it seemed simple, but my conversion has some errors: Projection definition: +proj=aea +lat_1=52 +...
2
votes
1answer
751 views

Transform coordinates from custom projection to lat long PyProj

I am trying to convert a pair of coordinates specified in US survey feet on a custom transverse mercator projection to lat/long using PyProj. I must be doing something wrong because I cannot get the ...
2
votes
1answer
749 views

Converting lat,lon to x,y coordinates with pyproj

I am trying to convert lat,lon to x,y coordinates in France, using the pyproj library and what I am doing is obviously wrong. Here is some of my code: import pyproj import math PROJ='+proj=utm +...
0
votes
1answer
70 views

Why is pyproj shifted by 33 feet from QGIS?

I have written a script to take WGS84 coordinates and convert them into a projected system for importing into a CAD program. I thought I had everything working when I decided to use QGIS to confirm ...
1
vote
1answer
1k views

Easting and northing conversion into lat and long gives wrong information python

This is my easting and northing 315846.356,5808849.713 p2 = Proj(proj="utm",zone='55H') x,y=315846.356 ,5808849.713 lat,long=p2(x,y,inverse=True) I got Longitude 144.29314340365048 and Lattitude 52....
1
vote
1answer
384 views

Reprojecting coordinate system with Python and lat/lon is only slightly off [duplicate]

I am using Python to reproject a shapefile (called "SCL" in my project) into a new coordinate system that will allow me to plot it on the same map as another shapefile (called "PUMA" in my project). ...
0
votes
3answers
1k views

Translate Cartesian coordinates to WGS84, preferably in pyproj?

I have some Cartesian coordinates: x = 3862525.511 y = -109738.522 I need to translate them into WGS84 coordinates, preferably using pyproj. Is this possible, or have I misunderstood the nature of ...
0
votes
2answers
436 views

Rinex Header GPS Position Coordinate System

I am extracting data from rinex observation files and would like to convert the approximate position to latitude and longitude using Proj.4. The rinex standard states that these coordinates are WGS84, ...
2
votes
1answer
2k 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 ...
0
votes
1answer
394 views

Convert NAM Grid (Lambert Conformal Conic) to MERRA2 Grid (lat/lon) using pyproj

I am attempting to convert NAM grid data into a simple lat/lon grid that my current MERRA2 data is on (NAM Grid Info). The NAM data is currently in lat/lon but on a Lambert Conformal Projection. I've ...
0
votes
1answer
225 views

PyProj: Transform from LLA to ORTHO with WGS84 gives sphere instead of ellipsoid

I want to convert my coodrinates from lon, lat to x, y of orthographic projection. I tried to use PyProj to do it, but it uses sphere, not ellipsoid. Here it is: lonlat_proj = pyproj.Proj(proj="...
7
votes
1answer
710 views

Different origins of UTM projection

I have latitudes and longitudes from a GPS unit which uses WGS84, and would like to project those to some kind of plane. I'm totally new to this, but after a lot of reading it sounds like UTM is a ...
0
votes
1answer
148 views

How to align Aerial images from MassGIS with OSM using python?

MassGIS Dataset: I'm using the MassGIS Data: USGS Color Ortho Imagery (2013/2014) aerial images of Boston. Basically, the dataset is divided into small patches of jpeg2000 images, where each of the ...
1
vote
1answer
247 views

pyproj does not properly convert EPSG:3760 to WGS 84 [duplicate]

I have coordinates stored in EPSG:3760. I can use https://epsg.io/transform to transform these properly to WGS 84 GPS coordinates, like so: As seen in the photo, my coordinates (1728779.950564162, ...
2
votes
2answers
404 views

What is the difference between a datum and an ellipsoid? [duplicate]

For example I am converting from ECEF to lla using def ecef_to_lla(x, y, z): lla = pyproj.Proj(proj='latlong', ellps='WGS84', datum='WGS84') ecef = pyproj.Proj(proj='geocent', ellps='WGS84', ...
1
vote
1answer
147 views

Transform Box from SR-ORG:6630 to WGS-84 in Python

I have an image file that I'm opening with gdal and using GetGeoTransform() to determine the minimum and maximum lats and lons: Lon_Min=-2493045.0 Lon_Max=2342655.0 Lat_Max=3310005.0 Lat_Min=177285.0 ...
2
votes
0answers
113 views

How can I transform coordiantes to a topocentric system using PROJ.4?

I would like to transform coordinates (e.g. WGS84 or Bejing1954) to a topocentric system. There seem to be several EPSG codes for this (5819, 5820, 5821, 15594, found here or here) but none of them ...
1
vote
2answers
1k views

geopandas can't import

I've installed geopandas on ubuntu 17.10 and can't import geopandas. I can't find this particular error anywhere. from pyproj import _proj ImportError: cannot import name '_proj' I'm using a virtual ...
1
vote
0answers
344 views

Shapely LineString contains method not showing contained points

I have some GeoJSON files that I converted from some KML someone gave me to analyze. I have used GPSBabel to convert them from KML to GeoJSON. The reason for doing so is that I am able to easily ...
1
vote
1answer
486 views

Converting coordinates from shapefile using python?

I am really new to working with this kind of data. I have been trying to work with a shapefile that I wish to convert to geojson. The source has both shapefiles and geojson downloads available, but ...
2
votes
1answer
425 views

Bessel_1841 to Mercator in Python

Despite similar Q&As I can't seem to get my answer. So I have this set of coordinate (124616.1535508, 486555.4631204) are mapped to the Bessel_1841 coordinate space. I'd like to transform these ...
1
vote
0answers
114 views

Cartesian / Meters issue while making ellipses

I am trying to create an ellipse to be stored in my django project. I'm provided a lat, lon, major/minor in Nautical Miles, and an orientation in degrees. Between this post and the docs I've been able ...
6
votes
3answers
10k 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 ...
1
vote
2answers
148 views

Something going wrong trying to transform longitude, latitude to NAD 83 using pyproj

I'd like to convert a latitude longitude pair to NAD 83. I've read NAD 83 is equivalent to epsg:4269 and the shapefile I am working with is a US Census TIGER shapefile, all of which are supposed to ...
1
vote
0answers
437 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 ...
1
vote
1answer
291 views

Python Egg Extraction Error When Trying to Use pyproj in Pyspark

I have pyproj installed in my conda environment on my local machine (MacBook Pro). Everything works properly. I am able to use pyproj within the pyspark installation on my local machine. However, I ...
2
votes
2answers
630 views

Buffer does not intersect or contain the point used for the center of the buffer when creating the buffer

I made the buffer below (see code). I then tried to see if the buffer contains or intersects the center of the buffer, but False is returned. Why? from shapely.geometry import Point, Polygon ...
2
votes
3answers
2k views

Projection of all the polygons contained in a geojson at once

I would like to project all the features in a geojson from WGS84 (EPSG:4326) to Web Mercator (EPSG:3857) using python. This geojson contains only polygons. I found out the following shapely code ...
3
votes
1answer
8k views

Convert GPS coordinates to Web Mercator EPSG:3857 using python/pyproj

I've created a couple of functions using the math package from python 3.5 to transform GPS coordinates to x/y web mercator (pseudo mercator) as explained here: http://wiki.openstreetmap.org/wiki/...
1
vote
0answers
792 views

Projecting data from 'EPSG:4326' to Lambert Azimuthal Equal Area with PyProj [closed]

I have a list of data points given in lon/lat coordinates, which I want to convert to cartesian ones using pyproj. My dataset refers to Italy, so I was considering using either the Lambert Azimuthal ...
1
vote
2answers
2k views

Latitude Longtitude to X, Y, Z coordinate system using python

does anyone know how to go about converting lat, long, alt to x, y, z where you have an origin for x/y coordinate (specific place in London)? In other words, I have a lat long and alt data and would ...
2
votes
1answer
489 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 ...
1
vote
1answer
249 views

What does the “zone” stand for in proj?

I am using proj, in particular pyproj, to convert from UTM coordinates to the (x,y) coordinates used, for example, by Google Maps. There is a parameter called zone which I could not understand how I ...
1
vote
1answer
430 views

Blank crs attributes in fiona: Can't get proj4 parameters from OpenFileGeodatabase

I’m having trouble obtaining crs values for geodatabase feature classes in fiona (version 1.7.5). Specifically, the crs attribute returns empty for many of the geodatabases I try to read. This is not ...
2
votes
1answer
1k views

Why does Pyproj fail converting lon lat alt to ECEF?

I'm trying to convert a WGS84 lon, lat and alt to ECEF and Pyproj is giving me really weird results. My code is simply: lon, lat, alt = 49.74761271, -113.2179781, 0 ecef = pyproj.Proj(proj='geocent', ...
2
votes
1answer
708 views

Are there EPSG codes for solving China GPS shift problem?

I am currently using PyProj for a project, and would like to transform from WGS-84 (or other systems) to the China-specific datums for writing into kml files. I have seen other packages specifically ...
1
vote
2answers
6k views

Converting WGS84 to ECEF in Python?

I am trying to convert some coordinates geodetic coordinates (WGS84) to ECEF. I've tried my own implementation in Python and using pyproj and am getting difference results. Could someone please help ...