I'm looking into using the UTM coordinate system with geodjango. And I can't figure out how to get the data in properly.
I've been browsing the documentation and it seems that the "GEOSGeometry(geo_input, srid=None)" or "OGRGeometry" could be used with an EWKT, but I can't figure out how to format the data.
It looks like the UTM SRID is: 2029
From the wikipedia article the format is written like this:
[UTMZone][N or S] [easting] [northing]
17N 630084 4833438
So I tried the following with no luck:
>>> from django.contrib.gis.geos import *
>>> pnt = GEOSGeometry('SRID=2029;POINT(17N 630084 4833438)')
GEOS_ERROR: ParseException: Expected number but encountered word: '17N'
>>>
>>> from django.contrib.gis.gdal import OGRGeometry
>>> pnt = OGRGeometry('SRID=2029;POINT(17N 630084 4833438)')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python26\lib\site-packages\django\contrib\gis\gdal\geometries.py", line 106, in __init__
ogr_t = OGRGeomType(geom_input)
File "C:\Python26\lib\site-packages\django\contrib\gis\gdal\geomtype.py", line 31, in __init__
raise OGRException('Invalid OGR String Type "%s"' % type_input)
django.contrib.gis.gdal.error.OGRException: Invalid OGR String Type "srid=2029;point(17n 630084 4833438)"
Are there any example available to show how this is done?
May be I should just do any necessary calulations in UTM and convert to decimal degrees?
In this case does GEOS or other tools in geodjango provide convertion utitilites?