[postgis-users] Mapserver extent question

David Niergarth dn at hddesign.com
Tue Sep 20 15:39:12 PDT 2005


Wow, I'm overwhelmed by all your thoughtful responses!

We ended up teasing out a query like

p.the_geom && setSRID(
    'BOX(-121.359397 38.542610, -121.357633 38.543996)'::BOX2D, 4326) ;

from other examples but your responses make it much more clear why this 
works and, further, what else is possible. Your responses have helped 
clear up several questions/misunderstandings I had.

Thanks very much,

--David


David Niergarth wrote:
> Hello,
> 
> I have an extent from mapserver (e.g., "-121.682485 38.408966 
> -121.231440 38.763359") that I want to feed back into a PostGIS query.
> 
> How do I express this extent in my query?
> 
> I want to write a query something like
> 
> select recid from tbl_points
> where the_geom && <what goes here?> ;
> 
> 
> A related question... What's a BOX (see following query):
> 
> select extent(the_geom) from tbl_points ;
>                                    extent
> ---------------------------------------------------------------------------- 
> 
>  BOX(-124.278755187988 32.5427703857422,-73.5306396484375 46.1519355773926)
> (1 row)
> 
> It doesn't appear to be a WKT format. Is there a way to use BOX like you 
> would with other WKT formats?
> 
> Thanks for any suggestions.
> 
> --David
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list