[mapserver-users] srid dropped at postgis request
Laurent BAEY
laurent.baey at free.fr
Thu Feb 3 07:36:16 PST 2011
Hello
I've srid issues since mapserver 5.6.6 and postgis version :
"POSTGIS="1.4.2" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.6.1, 21 August 2008"
USE_STATS"
this is an extract of my mapscript generated mapfile layer section :
LAYER
CONNECTION "user=username password=passwd dbname=database
host=localhost port=5432"
CONNECTIONTYPE POSTGIS
DATA "the_geom FROM zones"
DEBUG 5
NAME "126378_55"
PROJECTION
"init=epsg:27572"
END
STATUS ON
TYPE POLYGON
UNITS METERS
CLASS
NAME "CLASSNAME"
STYLE
ANGLE 360
COLOR 221 136 187
SYMBOL 0
END
END
END
The MAP has
PROJECTION
"init=epsg:27572"
END
But I get :
[Thu Feb 3 16:11:46 2011].488534 msPostGISLayerWhichShapes query: select
encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex') as
geom,"id_zc" from zones where the_geom &&
GeomFromText('POLYGON((-148184.01937046 1431436.44655493,-148184.01937046
3564931.59218599,1351815.98062954 3564931.59218599,1351815.98062954
1431436.44655493,-148184.01937046
1431436.44655493))',find_srid('','zones','the_geom'))
[Thu Feb 3 16:11:46 2011].747437 msPostGISLayerWhichShapes(): Query
error. Error (ERROR: Operation on two geometries with different SRIDs
I see that the postgis function AsBinary drops the geom srid, then
"encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex')" has
srid=-1.
Is there something new that I've missed concerning srids since 5.2
mapserver version ?
Thank you for your help.
Laurent
More information about the MapServer-users
mailing list