Which Python modules provide good foundation classes for spatial data?
I am preparing to build an application in Python that works with a lot of spatial data. I am looking for a Python module that provides a nice set of spatially-enabled classes that I can inherit from. Two things I would like to have baked in are:
- Support for both vector and raster data, and conversions between both formats.
- Support for projecting coordinates between datums.
The best module I have been able to find so far is shapely but it focuses on vector data and d开发者_开发技巧oes not include support for datum transformations. An example of the kind of library I am looking for is the sp package for R which provides classes for holding both vector point data and dense or sparse raster data along with datum transformation support.
Are there any Python modules that provide a nice set of spatially enabled classes that I may be overlooking?
Did you try the Geospatial Data Abstraction Library?
I found it on Linux where its called python-gdal.
Abstract of Debians GDAL:
GDAL supports 40+ popular data formats, including commonly used ones (GeoTIFF, JPEG, PNG and more) as well as the ones used in GIS and remote sensing software packages (ERDAS Imagine, ESRI Arc/Info, ENVI, PCI Geomatics). Also supported many remote sensing and scientific data distribution formats such as HDF, EOS FAST, NOAA L1B, NetCDF, FITS.
OGR library supports popular vector formats like ESRI Shapefile, TIGER data, S57, MapInfo File, DGN, GML and more.
see on trac.osgeo.org
More precisely: Shapely is about planar computational geometry and nothing more. It's not a vector data library at all. I use it with Pyproj (http://code.google.com/p/pyproj/). I haven't come across any Python foundation classes for geospatial. They abound, of course, in Java projects like GeoTools. Python arrays could be a good starting point: arrays of coordinates can be used by Shapely and raster-like arrays can be used by GDAL. You might also take a look at the GeoJSON-ish interfaces provided by Shapely, ArcPy, and the SimpleGeo APIs.
Almost all Python modules are listed at the CheeseShop so start there. I can't find anything obvious, though.
RSGISLib is a suite of command line tools with python bindings for processing remote sensing/spatial data in both vector and raster format, which you may find useful.
The link to the webiste is http://www.rsgislib.org and it can easily be installed using Anaconda
精彩评论