I'm trying to add coordinate information to my database, adding django.contrib.gis
support to my app. I'm writing a south
data migration that takes the addresses from the database, and asks Google for the coordinates (so far I think my best bet is to use geopy
for this).
Next I need to convert the returned coordinates from WGS84:4326
, Google's coordinate system, to WGS84:22186
, my coordinate system.
I'm lost among the GeoDjango docs trying to find a way to do this. This far, I gather I need to do this:
gcoord = SpatialReference("4326")
mycoord = SpatialReference("22186")
trans = CoordTransform(gcoord, mycoord)
but then, I don't know how to use that CoordTransform
object.. seems to be used by GDAL's data objects, but that's overkill for what I want to do..