Perhaps I didn't explain it well, Jeff. I am just trying to get the smallest distance from one point to any of the points, lines, or polygons inside of a queryset. The data I am receiving from the queryset is a geometrycollection already... That is how it is being stored in the database.
On Tue, Jan 31, 2012 at 8:36 PM, Jeff Heard <jefferson.r.he...@gmail.com>wrote: > You should be able to create a geometrycollection object from a queryset > (you may have to use a list comprehension for this), then calculate the > centroid and take the distance from that. Taking the distance from the edge > should only be a little more > Complicated. Check the django GEOS API docs For complete details > > > > On Jan 31, 2012, at 6:36 PM, Loafer <loafer...@gmail.com> wrote: > > > I have a model that currently stores a Geographic Point (Using Django > > GIS (GeoDjango)) and another model that has a field to store a > > geometry collection (A collection of polygons, lines, and or points). > > > > I am trying to find the distance from the point to any one of the > > shapes in the geometry collection. Apparently the distance function > > only works on single shapes, not a collection. Are there any > > workarounds to this? > > > > Any help is appreciated. > > > > Thanks. > > > > -- > > You received this message because you are subscribed to the Google > Groups "Django users" group. > > To post to this group, send email to django-users@googlegroups.com. > > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.