Spatial SQL to Django Query Help

2011-02-01 Thread Ryan Clark
Hi there - I have two related models. MapUnitPolys has a 1:M relationship to DescriptionOfMapUnits. MapUnitPolys has a geometry field, DescriptionOfMapUnits does not. The query that I'm trying to accomplish is something like SELECT DISTINCT DescriptionOfMapUnits.* FROM ( MapUnitPolys INNER JO

Geodjango: ogrinspect on a Postgis layer?

2011-01-28 Thread Ryan Clark
I'm interested in using the ogrinspect command to help build a load.py file for bringing data from one PostGIS table (in a legacy db) into my Django project's db. What I can't seem to figure out is how to write the data source location for a PostGIS layer. Can it be done? I tried the following: og