[postgis-users] RE: newbie PostGIS SQL question

"Ing. Aleš Daněk" ales.danek at cad-programs.com
Sun Oct 8 03:21:39 PDT 2006


Hello kulbinder dio

I think that problem in your SQL is missing SRID definition. Try this 
SQL which do you want:

select * from admin_obce where the_geom && 
geomfromewkt('SRID=4326;POLYGON((14.3175807572347 
50.1188657131289,14.3177258253264 50.1188803817051,14.3178371331499 
50.118892032579,14.3179856640012 50.118907010321,14.3175807572347 
50.1188657131289))');

Function GeomFromEWKT create geometry (in this case type polygon) with 
4326 srid (WGS84). Than you can match extents of your geomatry and this 
one using && function.

aldama



More information about the postgis-users mailing list