Tyler Erickson wrote:
> I'm not aware of any current support for spheroid calculations in
> geodjango, but you could try constructing raw sql and running it
> against PostGIS. If that works you could include it in a custom method
> for your model.
> See:
http://docs.djangoproject.com/en/dev/topics/db/sql/
`ST_Length_Spheroid` is used automatically when you try to calculate the
length of a geometry that has a geographic coordinate system. For
example, if you had the following model:
class GeoModel(models.Model):
line = models.LineStringField()
objects = models.GeoManager()
Then the following queryset would use `ST_Length_Spheroid` in its SQL
(because the default SRID is 4326, a geographic coordinate system):
qs = GeoModel.objects.length()
-Justin