query postgis through wms

Marcos Sánchez Provencio marcos at BURKE.ATH.CX
Mon Nov 19 09:41:38 EST 2007


Try using the srid your data is stored in instead of 31300. You might
use the function getsrid 

SELECT getsrid(the_geom) from b_capa_percid limit 1;


El lun, 19-11-2007 a las 15:26 +0100, Steven De Vriendt escribió:
> Marcos,
> 
> When I try your suggestion Mapserver returns:
> 
>>     <ServiceExceptionReport version="1.1.0">
>>     <ServiceException>
> 
> msDrawMap(): Image handling error. Failed to draw layer named
> 'percelen'. 
> msPOSTGISLayerWhichShapes(): Query error. Error executing POSTGIS SQL
> statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT
> asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from
> (SELECT * FROM b_capa_percid) AS foo WHERE the_geom &&
> setSRID('BOX3D( 76945.5918856108 189996.502536997,91328.1081143621
> 201805.497460877)'::BOX3D, 31300 )
> -ERROR:  Operation on two geometries with different SRIDs
> 
> 
> </ServiceException>
> </ServiceExceptionReport> 
> 
> On Nov 19, 2007 3:19 PM, Marcos Sánchez Provencio
> <marcos at burke.ath.cx> wrote:
>         try
>         DATA "the_geom from (SELECT * FROM b_capa_percid) as foo
>         using srid=31300 using unique gid"
>         
>         
>         
>         El lun, 19-11-2007 a las 09:48 +0100, Steven De Vriendt
>         escribió:
>         
>         > DATA "the_geom from b_capa_percid"
>         
>         
> 



More information about the mapserver-users mailing list