Please post any corrections or additions. PRESENTATIONS
"The __future__ module" by Jason Kirtland -- @cheeseinspector, http://discorporate.us/jek/ * The "__future__" module lets you use features of Python interpreters from within some older Python interpreters. * Future features include: using the Python 2.6 "with" statement in Python 2.5, making "print" a function in Python 2.6 like in 3.0, etc. * Full set of future features and their documentation: http://docs.python.org/library/__future__.html "Geohash" by Michel Pelletier -- http://idealist.org/ * Geohash is an algorithm for producing a short code ("hash") that refers to a geographical location. The longer the hash, the more precise the latitude/longitude encoded in it. A unique property of the Geohash is that you can remove characters off the right side of the string and it'll still be valid, although less precise. * Overview of Geohash: http://en.wikipedia.org/wiki/Geohash * Site for finding Geohashes: http://geohash.org/ * Example of how trimming a Geohash string degrades accuracy: http://mappinghacks.com/2008/05/29/geohash-implemented-in-python/ * Geohash is included in PostGIS * There are many python implementations, the python-geohash with a C extension is fast and actively maintained: http://code.google.com/p/python-geohash/ "PostGIS" by Webb Sprague * PostGIS adds support for geographic objects to PostgreSQL databases. * Overview of PostGIS: http://en.wikipedia.org/wiki/PostGIS * Site for PostGIS distribution: http://postgis.refractions.net/ * Manual for PostGIS: http://postgis.refractions.net/documentation/manual-1.4/ * In PostGIS, geography is stored as geometric types: "point" has latitude/longitude, "line" which has two points, "polygon" has a series of connected lines, etc. These are stored in PostgreSQL as "geometry" columns. * You can run database queries to find centroids of a polygon, get distances between objects, select items within a polygon, select items a certain distance from a point, get the Geohash for a geometric object, etc. * Performance is an important issue because some operations can be quite expensive. Ways to address this include adding indexes, creating lower-resolution copies of complex geometric shapes that are quicker to run queries on, storing pre-calculated data, etc. "GeoDjango" by Tim Welch -- @t_doubleuu, http://tdubya.net/ * These notes provide additional content to the slides that Tim posted, you should probably read both: http://tdubya.net/2010/01/13/geodjango-and-friends/ * Tim Welch works on open source Python GIS projects like: o Open OceanMap, "a data collection tool used to effectively collect local expert knowledge in support of marine spatial planning": http://www.ecotrust.org/ocean/OpenOceanMap.html o MarineMap, "a web-based decision support tool for open and participatory spatial planning in the marine environment.": http://marinemap.org/ * GeoDjango is a geospatial extension for the Django web framework. o Site: http://geodjango.org/ o Documentation: http://geodjango.org/docs/ o Tutorial, highly recommended: http://geodjango.org/docs/tutorial.html * GeoDjango works best with PostGIS (PostgreSQL), but will also work with SpatiaLite (SQLite), Oracle Spatial (Oracle), and MySQL. * GeoDjango provides geometry fields for use in Django models: PointField, LineStringField, PolygonField, MultiPolygonField, etc. * GeoManager allows Django models to perform spatial queries: o Relationship: contains, covers, crosses, intersects, overlaps, touches. o Measurement: area, length, perimeter, distance o Geometry: difference, intersection, union o Serialization: GeoJSON, KML, SVG, GeoRSS * The "django.contrib.gis.geos" module provides Python classes for representing geometric types like Point and Polygon. These classes include useful methods like calculating area of a polygon, creating a polygon that's the difference between other polygons, etc. These classes provide a way to specify the spatial reference system (SRID) and transform between them, e.g., go from latitude/longitude to x/y meters from a particular place. * You can get the PostgreSQL INSERT statement to add PostGIS support for a particular SRID from: http://spatialreference.org/ * In Django, you'll need to tell settings.py to use the "django.contrib.gis.db.backends.postgis" engine for the database and include "django.contrib.gis" in the INSTALLED_APPS. * The GeoDjango "ogrinspect" Django manage.py subcommand can read a dataset and generate the code for a Django model with all its attributes. * The GeoDjango admin interface "admin.OSMGeoAdmin" can let you view and edit your mapping data visually on the web and overlay it on the Open Street Map data set. * You may also be interested in GeoExt, a JavaScript toolkit for rich web mapping: http://www.geoext.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/portland/attachments/20100113/16edef11/attachment.htm> _______________________________________________ Portland mailing list [email protected] http://mail.python.org/mailman/listinfo/portland
