[postgis-users] All object between the coordinates
Sandro Santilli
strk at keybit.net
Tue Jan 17 12:46:46 PST 2012
On Tue, Jan 17, 2012 at 06:48:50PM +0200, ceyhun at likya.net wrote:
> I am a newbie on PostGIS. I have a database converted from Netcad Spatial
> Data to PostGIS. My maps seems to work fine but I don't know how to query
> all objects between the following coordinates:
>
> 26.3456 - 27.21546 Eastern Meridians
> 36.1254 - 42.87875 Northern Parallels
SELECT the_geom FROM the_table WHERE
ST_Intersect(
the_geom,
ST_MakeEnvelope(26.3456, 36.1254, 27.21546, 42.87875)
);
Add a SRID parameter to ST_MakeEnvelope to match the SRID
of your column.
Read more in the PostGIS manual.
--strk;
() Free GIS & Flash consultant/developer
/\ http://strk.keybit.net/services.html
More information about the postgis-users
mailing list