CARVIEW |
Select Language
HTTP/2 200
server: nginx
content-type: text/html;charset=utf-8
cache-control: must-revalidate
expires: Fri, 01 Jan 1999 00:00:00 GMT
set-cookie: trac_form_token=7647a1d5a533d5d397ac802f; HttpOnly; Path=/; Secure
set-cookie: trac_session=b8db855c61805d1838fcfb98; expires=Tue, 21 Oct 2025 07:44:55 GMT; HttpOnly; Path=/; Secure
strict-transport-security: max-age=31536000; includeSubDomains; preload
permissions-policy: interest-cohort=()
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
accept-ranges: bytes
via: 1.1 varnish, 1.1 varnish
date: Wed, 23 Jul 2025 07:44:55 GMT
x-served-by: cache-fra-eddf8230093-FRA, cache-bom-vanm7210047-BOM
x-cache: MISS, MISS
x-cache-hits: 0, 0
x-timer: S1753256696.515147,VS0,VE345
vary: Accept-Encoding
OGRGeometry – Django
Back to Top
Django
The web framework for perfectionists with deadlines.
Issues
OGR Geometries
Background
What is 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
>>> 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 <django.contrib.gis.gdal.srs.SpatialReference object at 0xb60ab86c> >>> pnt.transform_to(SpatialReference('NAD27')) # transform the point to a NAD27 spatial reference >>> print pnt POINT (5.0 22.999999999997065)
Last modified
18 years ago
Last modified on Oct 25, 2007, 1:15:54 AM
Note:
See TracWiki
for help on using the wiki.
Download in other formats:
Django Links
Learn More
Get Involved
Follow Us
- Hosting by In-kind donors
- Design by Threespot &
© 2005-2025 Django SoftwareFoundation unless otherwise noted. Django is a registered trademark of the Django Software Foundation.