[mapserver-users] srid dropped at postgis request

Laurent BAEY laurent.baey at free.fr
Fri Feb 4 04:08:01 EST 2011


Hello

I was playing with the viewer to try to get out of the shape extent, to
see if it was drawing related. The bbox wasn't the good one, sorry.
I've the same result with the original one :

[MapServer Error]: msPostGISLayerWhichShapes(): Error (ERROR: Operation on
two geometries with different SRIDs ) executing query: select
encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex') as
geom,"id_zc" from zones where the_geom &&
GeomFromText('POLYGON((259333.658097445 1733700,259333.658097445
2015600.125,682466.310652555 2015600.125,682466.310652555
1733700,259333.658097445 1733700))',27572)

I also have :
SELECT srid(the_geom) FROM zones WHERE "it's the one i want to draw",
returns 27572.

I also found that when the AsBinary function comes, the srid is lost and
becomes -1.

SELECT sr_id(AsBinary(force_collection(force_2d("the_geom")),'NDR')) FROM
zones WHERE "it's the one i want to draw", returns -1

and postgis doesn't want to execute the request.

Any idea ?

Regards

Laurent



More information about the mapserver-users mailing list