[英]python-shapefile convert geometry to latitude/longitude
I'm completely new in shp file and what I'm trying to do is to convert my point location data to latitude/longitude. 我在shp文件中是一个全新的人,我想做的就是将我的点位置数据转换为纬度/经度。 What I have is, afert .crs command:
我所拥有的是afert .crs命令:
{'proj': 'tmerc',
'lat_0': 0,
'lon_0': 21,
'k': 0.999923,
'x_0': 7500000,
'y_0': 0,
'ellps': 'GRS80',
'units': 'm',
'no_defs': True}
how to obtain latitude and longitude coordinates 如何获取经纬度坐标
Finally, after trial and error, I found a solution. 最后,经过反复试验,我找到了解决方案。 I hope it could be useful for the community.
我希望它对社区有用。 Basically, there is a very good website https://geoffboeing.com/2014/09/using-geopandas-windows/ but .....
基本上,有一个很好的网站https://geoffboeing.com/2014/09/using-geopandas-windows/但是.....
Don't even try: conda install -c conda-forge geopandas. 甚至不要尝试:conda install -c conda-forge geopandas。
It works but then you probably will have problems. 它有效,但是您可能会遇到问题。 In my case problem was in pyproj version and I couldn't update it.
就我而言,问题出在pyproj版本中,我无法更新它。 Then I used a solution with wheel files and ... I had problem with fiona version :) Here's source for whl files: https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
然后我使用了带轮文件的解决方案,并且...我对fiona版本有问题:)这是whl文件的来源: https ://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
So, my final solution was: installation of gdal but ... version 2.4.1 and then the latest version of fiona, pyproj, rtree and shapely in order like Geoff Boeing mentioned from wheel files. 因此,我的最终解决方案是:安装gdal但...版本2.4.1,然后安装最新版本的fiona,pyproj,rtree和shape,以便从轮文件中提到Geoff Boeing。 (installation with 'pip install "path to downloaded wheel file"').
(使用“ pip install“下载的车轮文件路径”安装)。 Don't forget about add path to gdal package after installation of gdal and before further steps.
安装完gdal之后,请不要忘记为gdal软件包添加路径。
After this, I just installed geopandas with pip install and what was important for me descartes and geopy packages (for plotting and geoconding). 之后,我通过pip install安装了geopandas,这对我来说重要的是笛卡尔和geopy软件包(用于绘图和地理编码)。
The smile on my face when all works... priceless and I just had to share with it :) 当一切正常的时候我脸上的笑容……无价,我只需要与它分享:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.