Questions tagged [pyproj]

Python interface to PROJ.4 library. Performs cartographic transformations and geodetic computations.

See also:

184 questions
4
votes
1 answer

pyproj fails to compile when i pip install it. And it's not about gcc

It throws errors that make it seems like there's something really wrong about the code, such as : _proj.c:7486:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’? tstate->exc_type =…
Avi Tshuva
  • 246
  • 2
  • 12
4
votes
1 answer

Projecting a NumPy array of coordinates using pyproj

I have a NumPy array of latitude/longitude (WGS84) coordinates like this: coords = np.asarray([ [6.74219, -53.57835], [6.74952, -53.57241], [6.75652, -53.56289], [6.74756, -53.56598], [6.73462, -53.57518]]) I want to use the…
Uli Köhler
  • 13,012
  • 16
  • 70
  • 120
3
votes
2 answers

How to solve the invalid projection error in CRS?

from pyproj import CRS import geopandas as gpd import matplotlib.pyplot as plt import matplotlib import json import pandas as pd gdf = geopandas.read_file("Frog_Census_Records.geojson") The error displayed is : CRSError: Invalid projection:…
ponmani
  • 67
  • 6
3
votes
1 answer

pyproj "crs not found" (GDAL/Docker) - Python

I am attempting to run a Docker container which contains several Python scripts to be executed in sequence, including one that converts UTM coordinates to their latitude/longitude equivalent. The script works when run as a standalone script (e.g.…
mdl518
  • 327
  • 3
  • 14
3
votes
1 answer

Fast conversion of easting and northing to latitude and longitude for a large DataFrame of locations

I am using Pandas and PyProj to convert eastings and northing to longitutde and latitude and then save the split output into 2 columns like this.... v84 = Proj(proj="latlong",towgs84="0,0,0",ellps="WGS84") v36 = Proj(proj="latlong", k=0.9996012717,…
fightstarr20
  • 11,682
  • 40
  • 154
  • 278
3
votes
2 answers

pyproj FutureWarning: '+init=:' syntax is deprecated

Open Street Map (pyproj). How to solve syntax issue? has a similar question and the answers there did not help me. I am using the helper class below a few hundred times and my console gets flooded with…
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
3
votes
1 answer

changing CRS in GeoPandas

I'm trying to change the CRS of a geopandas dataframe. The current CRS is: Name: unknown Axis Info [ellipsoidal]: - lon[east]: Longitude (degree) - lat[north]: Latitude (degree) Area of Use: - undefined Datum: World Geodetic System 1984 -…
jheilbron
  • 51
  • 1
  • 2
3
votes
1 answer

Open Street Map (pyproj). How to solve syntax issue?

Using pyproj for visualizing open street map and getting the following error: > AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyproj\crs.py:77: > FutureWarning: '+init=:' syntax is deprecated. > ':' is…
RageAgainstheMachine
  • 901
  • 2
  • 11
  • 28
3
votes
1 answer

Why do the inverse function from both cartopy and basemap have different results to calculate distance?

I want to calculate the distance between two points on surface of earth in meteres I have tried with both basemap and cartopy but both result in different numbers. Basemap: import mpl_toolkits.basemap.pyproj as pyproj k =…
Anveshan Lal
  • 115
  • 9
3
votes
2 answers

Reprojecting Xarray Dataset

I'm trying to reproject a Lambert Conformal dataset to Plate Carree. I know that this can easily be done visually using cartopy. However, I'm trying to create a new dataset rather than just show a reprojected image. Below is methodology I have…
James
  • 149
  • 1
  • 10
3
votes
0 answers

georasters pip install on windows fail

Following the steps given in https://github.com/ozak/georasters, but having the same traceback for both steps of the pip install process. Blows up when "collecting pyproj.." with some issue with "msvc.py". Collecting pyproj (from georasters) …
javier Moreira
  • 65
  • 2
  • 10
2
votes
1 answer

Extracting CRS Codes from PyProj Library

I need help with a python program. I am looking to obtain crs codes/definitions from Pyrpoj library, add them to a list, allow the user to select a crs from the list and print it out, but it does not seem to work. I have made sure to update the…
2
votes
1 answer

Why do the Pyproj and Haversine methods to calculate heading from two lat/lon points differ from what Google Earth displays?

I am trying to implement a short python function to calculate the heading between two points. In other words if I am at point one, what heading relative to true north would I need to take to get to point two. I have used the following Python…
Jon
  • 1,621
  • 5
  • 23
  • 46
2
votes
3 answers

Geopandas convert crs

I have a created a geopandas dataframe with 50 million records which contain Latitude Longitude in CRS 3857 and I want to convert to 4326. Since the dataset is huge the geopandas unable to convert this.how i can execute this in distributed manner. …
code_bug
  • 355
  • 1
  • 12
2
votes
2 answers

How to speed up calculating geometry area of 2D boundary arrays?

Background I have four 2D arrays: lon_centers, lat_centers, lon_bnds, and lat_bnds. bnds means the boundary of each pixel and centers stands for the center of pixels. Data overview import numpy as np import matplotlib.pyplot as plt lon_bnds =…
zxdawn
  • 825
  • 1
  • 9
  • 19
1
2
3
12 13