Database Reference
In-Depth Information
TherecipesofthischapterwillnotcoversomeotherusefulgeospatialPythonlibrar-
iesthatareworthyofbeinglookedatifyouaredevelopingageospatialapplication.
Under these Python libraries, the following libraries are included:
Shapely :ThisisaPythoninterfacetotheGEOSlibraryforthemanipulation
and analysisof planar geometric objects: http://toblerity.github.io/shapely/
Fiona :ThisisaverylightOGRPythonAPIthatcanbeusedasanalternative
to the OGR bindings used in this chapter to manage vector datasets: ht-
tps://github.com/Toblerity/Fiona
Rasterio :Thisisthenewkidontheblock,apythonicGDALPythonAPIthat
can be used as an alternative to the GDAL bindings used in this chapter in
order to manage raster datasets: https://github.com/sgillies/rasterio
pyproj : This is the Python interface to the PROJ.4 library: ht-
tps://code.google.com/p/pyproj /
Rtree : This is a ctype Python wrapper to the libspatialindex library,
providing several spatial indexing features that can be extremely useful for
some kind of geospatial development: http://toblerity.github.io/rtree/
Inthefirstrecipe,youwillwriteaprogramthatusesPythonandthe psycopg , url-
lib2 , and simplejson libraries to fetch weather data from the Web and import
them into PostGIS.
In the second recipe, we will drive you to use Python and the GDAL OGR Python
bindingslibrarytocreateascriptforgeocodingalistofplacenamesusingoneofthe
GeoNames Web services.
You will then write a Python function for PostGIS using the PL/Python language to
querythe openweathermap.org Webservices,alreadyusedinthefirstrecipe,tocal-
culate the weather for a PostGIS geometry from within a PostgreSQL function.
Inthefourthrecipe,youwillcreatetwoPL/pgSQLPostGISfunctionsthatwillletyou
perform geocoding and reverse geocoding using the GeoNames datasets.
Afterthis,thereisarecipeinwhichyouwillusethe OpenStreetMap streetdatasets
imported in PostGIS to implement a very basic Python class in order to provide a
geocode implementation to the class's consumer using the PostGIS trigrams sup-
port.
Search WWH ::




Custom Search