Thanks everyone for the feedback on this patch.
I've added some code that deals with database creation. Specifically, to support the template database approach also on PostGIS 2.
I still have some failing test, but they fail on both PostGIS1.5 and 2.0. I'm running ``./runtests.py --settings=<mysettings> gis``.
Two of the failures are:
AssertionError: u'{ "type": "Point", "coordinates": [ 100.000000, 0.000000 ] }' != '{ "type": "Point", "coordinates": [ 100.0, 0.0 ] }'
Could be a JSON serialization quirk? I don't have any JSON lib system-wide nor in my virtualenv, so I know it's using the one shipped within Django. Should we modify the test to unserialize (json.loads) and compare Python objects?
The other failure is:
AssertionError: 'GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]' != 'GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]'
If you compare the two string, the only difference is that the spatial reference for the spheroid is "WGS_1984" instead of "WGS_84".
I'm not exactly sure if they are the same ref, or why and when it would have changed.
Thank you,
Flavio.