Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python package to work with GIS data?

Tags:

python

gis

For example, I would like to calculate a midpoint given latitude and longitude. Is there a Python package that already does this?

like image 369
Cory Avatar asked Dec 16 '22 12:12

Cory


1 Answers

You could try Shapely, which is just a neat set of geographic tools. Off hand, I think something like this would work:

from shapely.geometry import MultiPoint
points = MultiPoint([(0.0, 0.0), (1.0, 1.0)])
print points.centroid #True centroid, not necessarily an existing point

Also, did you know there was a whole StackExchange site just for GIS software questions? GIS.StackExchange is really helpful.

Lastly, have you looked at ArcPy?

This is a library built up around ArcGIS by ESRI. Unfortunately, it requires a license. Lame. But if your project has corporate backing, it is an extremely flexible and powerful library for geographic problems.

like image 78
john_science Avatar answered Dec 18 '22 03:12

john_science