gis.db.models.Collect

class Collect(geo_field) Availability: PostGIS, SpatiaLite Returns a GEOMETRYCOLLECTION or a MULTI geometry object from the geometry column. This is analogous to a simplified version of the Union aggregate, except it can be several orders of magnitude faster than performing a union because it simply rolls up geometries into a collection or multi object, not caring about dissolving boundaries.

gis.db.models.BaseSpatialField.srid

BaseSpatialField.srid Sets the SRID [2] (Spatial Reference System Identity) of the geometry field to the given value. Defaults to 4326 (also known as WGS84, units are in degrees of longitude and latitude).

gis.db.models.BaseSpatialField.spatial_index

BaseSpatialField.spatial_index Defaults to True. Creates a spatial index for the given geometry field. Note This is different from the db_index field option because spatial indexes are created in a different manner than regular database indexes. Specifically, spatial indexes are typically created using a variant of the R-Tree, while regular database indexes typically use B-Trees.

gis.admin.OSMGeoAdmin

class OSMGeoAdmin A subclass of GeoModelAdmin that uses a spherical mercator projection with OpenStreetMap street data tiles. See the OSMGeoAdmin introduction in the tutorial for a usage example.

gis.admin.GeoModelAdmin.openlayers_url

openlayers_url Link to the URL of the OpenLayers JavaScript. Defaults to 'http://openlayers.org/api/2.13.1/OpenLayers.js'.

gis.admin.GeoModelAdmin.modifiable

modifiable Defaults to True. When set to False, disables editing of existing geometry fields in the admin. Note This is different from adding the geometry field to readonly_fields, which will only display the WKT of the geometry. Setting modifiable=False, actually displays the geometry in a map, but disables the ability to edit its vertices.

gis.admin.GeoModelAdmin.map_width

map_width Width of the map, in pixels. Defaults to 600.

gis.admin.GeoModelAdmin.map_template

map_template Override the template used to generate the JavaScript slippy map. Default is 'gis/admin/openlayers.html'.

gis.admin.GeoModelAdmin.map_height

map_height Height of the map, in pixels. Defaults to 400.

gis.admin.GeoModelAdmin.extra_js

extra_js Sequence of URLs to any extra JavaScript to include.