Changes between Initial Version and Version 1 of OGRGeometry


Ignore:
Timestamp:
10/25/2007 01:15:54 AM (8 years ago)
Author:
tlp
Comment:

Added preliminary documentation for OGR Geometries

Legend:

Unmodified
Added
Removed
Modified
  • OGRGeometry

    v1 v1  
     1[[TOC()]]
     2= OGR Geometries =
     3
     4== Background ==
     5
     6=== What is OGR? ===
     7
     8[http://www.gdal.org/ogr/ OGR] is an open source C++ library included in GDAL which allows for reading and writing from a variety of vector file formats.
     9
     10== OGR Geometry Objects ==
     11
     12
     13{{{
     14#!python
     15>>> from django.contrib.gis.gdal import OGRGeometry, SpatialReference
     16>>> wkt1 = 'POINT(5 23)' # can be initialized with WKT or HEX
     17>>> pnt = OGRGeometry(wkt1)
     18>>> print pnt
     19POINT (5 23)
     20>>> print pnt.srs
     21None
     22>>> pnt.srs = 'WGS84' # set the spatial reference
     23>>> pnt.srs
     24<django.contrib.gis.gdal.srs.SpatialReference object at 0xb60ab86c>
     25>>> pnt.transform_to(SpatialReference('NAD27')) # transform the point to a NAD27 spatial reference
     26>>> print pnt
     27POINT (5.0 22.999999999997065)
     28}}}
     29
     30
     31
     32
     33
     34
Back to Top