>
> <Polygon object at 0x14d3ef0>
This is because that is the string representation of the geometry field. {{
gemetry}}
>
>
> The truth is that i would rather have a numeric format...How could i
> parse my polygon objects and extract the coordinates?
>
> for example i have:
>
> fromDB = polygons.objects.all()
> coordArray = list(e.geometry for e in fromDB)
>
You have to call the different methods on the geometry field not on your
model.
coordArray = list(e.geometry.wkt for e in polygons.objects.all())
coordArray = list(e.geometry.kml for e in polygons.objects.all())
Ariel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---