Hi,

I didn't realize what you were asking for. :D

Django has bunch of spatial queries, so you're looking some of those
__inside, __within lookups. Coordinate transformations do happen
automatically so you just need to provide srid for you "envelope".

On Sun, Jan 7, 2018 at 1:48 AM, Tom Tanner <dontsendemailher...@gmail.com>
wrote:

> Here's a sample PostGIS query I use to get geometries within four points:
>
>     SELECT *
>     FROM myTable
>     WHERE ST_MakeEnvelope(-97.82381347656252, 30.250444940663296, -
> 97.65901855468752, 30.29595835209862, 4326) && ST_Transform(myTable.geom,
> 4326);
>
>
> With this query, I can get all rows within those four points. How do I
> execute this query or similar queries in Django or GeoDjango?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/aac95827-0c79-4aef-84cf-646ca82cfffa%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/aac95827-0c79-4aef-84cf-646ca82cfffa%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jani Tiainen

- Well planned is half done, and a half done has been sufficient before...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91oeeAHfgAke5mB4PYx8n8%3DKvHgYPY27ua5ULWB1Qz6n5og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to