Changes between Initial Version and Version 1 of GeoDjangoExtras


Ignore:
Timestamp:
09/07/2007 08:16:40 PM (12 years ago)
Author:
jbronn
Comment:

stubbed out some of the included features

Legend:

Unmodified
Added
Removed
Modified
  • GeoDjangoExtras

    v1 v1  
     1= !GeoDjango Extras =
     2[[TOC()]]
     3This documentation is only a stub, and will become more complete as its written.
     4== Built-in Models ==
     5
     6The PostGIS {{{spatial_ref_sys}}} and {{{geometry_columns}}} tables may be accessed through the {{{SpatialRefSys}}} and {{{GeometryColumns}}} models, respectively.
     7
     8=== !SpatialRefSys ===
     9{{{
     10>>> from django.contrib.gis.models import SpatialRefSys
     11>>> wgs84 = SpatialRefSys.objects.get(srid=4326)
     12>>> print wgs84
     13GEOGCS["WGS 84",
     14    DATUM["WGS_1984",
     15        SPHEROID["WGS 84",6378137,298.257223563,
     16            AUTHORITY["EPSG","7030"]],
     17        TOWGS84[0,0,0,0,0,0,0],
     18        AUTHORITY["EPSG","6326"]],
     19    PRIMEM["Greenwich",0,
     20        AUTHORITY["EPSG","8901"]],
     21    UNIT["degree",0.01745329251994328,
     22        AUTHORITY["EPSG","9122"]],
     23    AUTHORITY["EPSG","4326"]]
     24>>> print wgs84.proj4text # PROJ.4 representation
     25+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
     26}}}
     27
     28=== !GeometryColumns ===
     29== !LayerMapping ==
     30Convenient utility for importing spatial data into geographic models from GDAL-supported data sources (''e.g.'', SHP Files).  See the [browser:django/branches/gis/django/contrib/gis/utils/LayerMapping.py source code] docstring for more details.
     31{{{
     32from django.contrib.gis.utils import LayerMapping
     33}}}
     34
     35== Measure ==
     36Robert Coup's [browser:django/branches/gis/django/contrib/gis/measure.py measure] module allows for convenient representation of distance units.
     37=== Distance ===
     38{{{
     39>>> from django.contrib.gis.measure import Distance
     40>>> d = Distance(mi=5) # 5 miles
     41>>> print d
     425.0 mi
     43>>> print d.nm # What's that in nautical miles?
     444.3448812095
     45>>> d += Distance(yd=100) - Distance(ft=5) # Adding 295 feet
     46>>> print d
     475.05587121212 mi
     48}}}
     49=== Area ===
     50
Back to Top