[[TOC()]] = OGR Geometries = == Background == === What is OGR? === [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. == OGR Geometry Objects == {{{ #!python >>> from django.contrib.gis.gdal import OGRGeometry, SpatialReference >>> wkt1 = 'POINT(5 23)' # can be initialized with WKT or HEX >>> pnt = OGRGeometry(wkt1) >>> print pnt POINT (5 23) >>> print pnt.srs None >>> pnt.srs = 'WGS84' # set the spatial reference >>> pnt.srs >>> pnt.transform_to(SpatialReference('NAD27')) # transform the point to a NAD27 spatial reference >>> print pnt POINT (5.0 22.999999999997065) }}}