简体   繁体   中英

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. What I have is, afert .crs command:

{'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 .....

Don't even try: 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. 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

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. (installation with 'pip install "path to downloaded wheel file"'). Don't forget about add path to gdal package after installation of gdal and before further steps.

After this, I just installed geopandas with pip install and what was important for me descartes and geopy packages (for plotting and geoconding).

The smile on my face when all works... priceless and I just had to share with it :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM