[Mapserver-users] Strange problem when using OVERLAYSYMBOL
Eric L. Blevins
eblevins at insight.rr.com
Tue Jan 7 14:52:54 PST 2003
This is a multi-part message in MIME format.
------=_NextPart_000_01AA_01C2B675.9B0637A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
This might be a bug or maybe I have something missing from my layers but =
I do know that removing OVERLAYSYMBOL from the layer makes this problem =
go away.
this causes an error in the layer directly after this layer:
LAYER
NAME railroad
TYPE line
STATUS default
CONNECTIONTYPE postgis
maxscale 200000
CONNECTION "user=3DXXXXX dbname=3DTIGER host=3DXXXXX"
DATA "the_geom from (select oid,the_geom,fename,fetype from =
railroad) AS foo using SRID=3D4269"
CLASS
SYMBOL 'circle'
COLOR 0 0 0
size 5
OVERLAYSYMBOL 'dcircle'
OVERLAYCOLOR 255 255 255
overlaySIZE 3
end
END
This is the error I recieve which happens to be the next layer in the =
map file:
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'),OID::text from =
(select oid,the_geom,fename,fetype,symbol from local) AS foo WHERE =
the_geom && 'BOX3D(-71.133294768 42.308640336,-71.027438768 =
42.414496336)'::BOX3D=20
However if I remove the OVERLAY stuff the errors go away.
The thing I noticed is that the SRID is not in this query and if you try =
to run this query from the command line postgresql returns "ERROR: =
Operation on two GEOMETRIES with different SRIDs" hence the reason the =
next layer fails.
Here is what the next layer looks like:
LAYER
NAME Local
TYPE line
STATUS default
CONNECTIONTYPE postgis
maxscale 22000
CONNECTION "user=3DXXX dbname=3DTIGER host=3DXXX"
DATA "the_geom from (select oid,the_geom,fename,fetype,symbol =
from local) AS foo using SRID=3D4269"
SIZEUNITS feet
CLASS
COLOR 140 140 140
size 40
symbol "circle"
end
END
You can see that I have the using SRID=3D4269 in the layer but for some =
reason when I use OVERLAYSYMBOL the using SRID=3D4269 gets ignored in =
the layer following the layer with OVERLAYSYMBOL. Simply removing the =
OVERLAYXXX lines from the mapfile everything renders perfect.
Anyone have any ideas what the problem could be?
Thanks!
Eric L. Blevins
www.WiFiMaps.com
------=_NextPart_000_01AA_01C2B675.9B0637A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2722.900" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>This might be a bug or maybe I have =
something=20
missing from my layers but I do know that removing OVERLAYSYMBOL from =
the layer=20
makes this problem go away.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>this causes an error in the layer =
directly=20
after this layer:</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>LAYER<BR> =20
NAME railroad<BR> TYPE=20
line<BR> STATUS=20
default<BR> CONNECTIONTYPE=20
postgis<BR> maxscale=20
200000<BR> CONNECTION =
"user=3DXXXXX=20
dbname=3DTIGER =
host=3DXXXXX"<BR> DATA=20
"the_geom from (select oid,the_geom,fename,fetype from railroad) AS foo =
using=20
SRID=3D4269"<BR> =20
CLASS<BR> &nbs=
p; =20
SYMBOL=20
'circle'<BR> &=
nbsp; =20
COLOR 0 0=20
0<BR> &n=
bsp; =20
size=20
5<BR> &n=
bsp; =20
OVERLAYSYMBOL=20
'dcircle'<BR> =
=20
OVERLAYCOLOR 255 255=20
255<BR> =
=20
overlaySIZE 3</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2> =20
end<BR>END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>This is the error I recieve which =
happens to be the=20
next layer in the map file:</FONT></DIV>
<DIV> </DIV>
<DIV>msPOSTGISLayerWhichShapes(): Query error. Error executing POSTGIS =
SQL=20
statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT=20
asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from =
(select=20
oid,the_geom,fename,fetype,symbol from local) AS foo WHERE the_geom =
&&=20
'BOX3D(-71.133294768 42.308640336,-71.027438768 42.414496336)'::BOX3D=20
</DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>However if I remove the OVERLAY stuff =
the errors go=20
away.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The thing I noticed is that the SRID is =
not in this=20
query and if you try to run this query from the command line postgresql =
returns=20
"ERROR: Operation on two GEOMETRIES with different SRIDs" hence =
the reason=20
the next layer fails.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Here is what the next layer looks=20
like:</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>LAYER<BR> =20
NAME Local<BR> TYPE=20
line<BR> STATUS=20
default<BR> CONNECTIONTYPE=20
postgis<BR> maxscale=20
22000<BR> CONNECTION =
"user=3DXXX=20
dbname=3DTIGER host=3DXXX"<BR> =
DATA=20
"the_geom from (select oid,the_geom,fename,fetype,symbol from local) AS =
foo=20
using SRID=3D4269"<BR> =
SIZEUNITS=20
feet<BR> =20
CLASS<BR> &nbs=
p; =20
COLOR 140 140=20
140<BR> =
=20
size=20
40<BR> &=
nbsp; =20
symbol "circle"<BR> =20
end<BR>END<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </DIV></FONT>
<DIV><FONT face=3DArial size=3D2>You can see that I have the using =
SRID=3D4269 in the=20
layer but for some reason when I use OVERLAYSYMBOL the using SRID=3D4269 =
gets=20
ignored in the layer following the layer with OVERLAYSYMBOL. =
Simply=20
removing the OVERLAYXXX lines from the mapfile everything renders=20
perfect.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial><FONT size=3D2>Anyone have any ideas what the =
problem could=20
be?</FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2></FONT></FONT> </DIV>
<DIV><FONT face=3DArial><FONT size=3D2>Thanks!</FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2>Eric L. =
Blevins</FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><A=20
href=3D"http://www.WiFiMaps.com">www.WiFiMaps.com</A></FONT></FONT></DIV>=
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_01AA_01C2B675.9B0637A0--
More information about the MapServer-users
mailing list