2

I've got a bounding box, and I want to adjust it so it's not less than, say, 2km across. I get the bounding box from google's geolocate service, and then I search for stuff that's inside that in my database, but I want to make sure I don't test against anything smaller than 1 or 2km across.. I'd like to get the area, measure the with, height, and expand pivoting on the center in case it's needed.

I already have all the SRID and stuff right.

Thanks

Lacrymology
  • 2,269
  • 2
  • 20
  • 28
  • What's the SRID of the data coming back? Is it measured in degrees (i.e., SRID 4326) or meters (SRID 3857)? Is that the issue? – Seth Sep 02 '11 at 05:59
  • Can you use some advanced queryset methods here, so that you have done you search with your bbox, you can make distance query https://docs.djangoproject.com/en/dev/ref/contrib/gis/geoquerysets/#std:fieldlookup-distance_gte ? – rootart Nov 13 '11 at 10:03
  • sorry, figured this out a long ago, I hadn't realized the SRID defines a working measurement unit – Lacrymology Nov 17 '11 at 21:02

1 Answers1

0

The answer to this depends on the SRID. You call expand which gets a unitless float as a parameter, and the units on that depend on the units with which the SRID is defined.

Lacrymology
  • 2,269
  • 2
  • 20
  • 28