[Geowanking] Looking for a spot of help with multi dimension linestrings in GeoDjango
Andrew Johnson
andrewljohnson at trailbehind.com
Sun Jul 5 21:21:03 PDT 2009
Hi folks,
I've been to the GeoDjango mailing list with this question, and there's an
unanswered question about the same topic on StackOverflow.com, but I can't
seem to figure it out, so I'm hoping one of the map gurus here might know
the answer.
In GeoDjango/PostGIS, I'm trying to make a three dimensional LineStringField
for lon, lat,
elevation, but only the first two dimensions are saving to the database. I
have it declared like this:
class Trail(models.Model):
linestring = models.LineStringField(dim=3)
I removed the 2-dimension constraint on the table in the database. And the
coord_dimension is 3 for the table in geometry_columns.
I construct a linestring using a list of length three lists, which I've
inspected in python and is correct before the database save.
After the linestring is saved, viewing the Trail in psql with as_ewkt and in
python only shows that the first two dimensions were saved.
Any ideas what I'm doing wrong?
Thanks for your help.
Andrew Johnson
Co-founder, TrailBehind.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://geowanking.org/pipermail/geowanking_geowanking.org/attachments/20090705/1d29e4d8/attachment-0002.html>
More information about the Geowanking
mailing list