pyproj

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

余生颓废 提交于 2021-02-19 05:41:50
问题 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=<authority>:<code>' syntax is deprecated. > '<authority>:<code>' is the preferred initialization method. return > _prepare_from_string(" ".join(pjargs)) The program runs but spits out a map that is blank. There's not much I could find on google. What is this and how to fix it? See code snippet below: ##Create map

GeoPandas .to_crs running into errors

断了今生、忘了曾经 提交于 2021-02-11 08:10:58
问题 I'm trying to import a shape file and change its crs in order to get a map with the correct projection. map_sh = gpd.read_file(r'C:\PATH\VG250_Gemeindegrenzen_2018.shp') map_sh = map_sh.to_crs({'init' :'epsg:25832'}) When I try executing it, I will get the following error: RuntimeError Traceback (most recent call last) <ipython-input-7-8354f57e24ce> in <module> ----> 1 map_sh = map_sh.to_crs({'init' :'epsg:25832'}) ~\AppData\Local\Continuum\miniconda3\lib\site-packages\geopandas\geodataframe

How to speed up projection conversion?

孤人 提交于 2021-01-29 16:12:52
问题 I want to project many coordinates. For example, 4 million coordinates. First, I tested with 100 coordinates. The test result was 13.95 sec. In calculation, it takes 155 hours to process 4 million coordinates. Is there a good way to get results as fast as possible? import pandas as pd import pyproj import time def projection(points): from_proj = pyproj.Proj('EPSG:4326') to_proj = pyproj.Proj('EPSG:2448') points[0], points[1] = pyproj.transform(from_proj, to_proj, points[1], points[0], always

Converting latitude and longitude to UTM coordinates in pyspark

旧时模样 提交于 2021-01-28 06:10:43
问题 I have dataframe contain longitude and latitude coordinates for each point. I want to convert the geographical coordinates for each point to UTM coordinates. I tried to use utm module (https://pypi.org/project/utm/) import utm df=df.withColumn('UTM',utm.from_latlon(fn.col('lat'),fn.col('lon'))) but I obtain this error : --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-39-8b21f98738ca> in <module>() ----> 1

I get error “No module named 'pyproj._datadir'” after I made .py to .exe with pyinstaller

元气小坏坏 提交于 2020-07-06 19:31:34
问题 My code works well when it's .py but when I make .exe file with pyinstaller, it shows ModuleNotFoundError. I write this when I made .exe pyinstaller -F MyCode.py How can I solve this problem? I've read Issues with pyinstaller and pyproj and I was going to try to make and located hook-pyproj.py at "hooks" folder in Pyinstaller. but hook-pyproj.py was already there with the same code. After that, I installed "basemap" and tried to use pyproj from it. However it shows me the same error. This is

I get error “No module named 'pyproj._datadir'” after I made .py to .exe with pyinstaller

不问归期 提交于 2020-07-06 19:30:45
问题 My code works well when it's .py but when I make .exe file with pyinstaller, it shows ModuleNotFoundError. I write this when I made .exe pyinstaller -F MyCode.py How can I solve this problem? I've read Issues with pyinstaller and pyproj and I was going to try to make and located hook-pyproj.py at "hooks" folder in Pyinstaller. but hook-pyproj.py was already there with the same code. After that, I installed "basemap" and tried to use pyproj from it. However it shows me the same error. This is

I get error “No module named 'pyproj._datadir'” after I made .py to .exe with pyinstaller

烂漫一生 提交于 2020-07-06 19:29:22
问题 My code works well when it's .py but when I make .exe file with pyinstaller, it shows ModuleNotFoundError. I write this when I made .exe pyinstaller -F MyCode.py How can I solve this problem? I've read Issues with pyinstaller and pyproj and I was going to try to make and located hook-pyproj.py at "hooks" folder in Pyinstaller. but hook-pyproj.py was already there with the same code. After that, I installed "basemap" and tried to use pyproj from it. However it shows me the same error. This is

Convert x,y to latitiude and longitude

无人久伴 提交于 2020-05-17 07:45:11
问题 If I have a map image where: The latitude and longitude of the upper left corner (x=0, y=0) are known The width and height of the image is known Zoom (z-axis) is known. Can we compute the latitude and longitude for other coordinates in the image? For example, in the following image if I want to compute the lat/lon values for the white ploygon (where the coordinates (x,y) are known) 回答1: So given the information and the shape of the image, (see previous question): import numpy as np top_left =