[Mapserver-users] GetFeatureInfo PostGIS problem
Jan Jansen
jansen at nieuwland.nl
Wed Jul 7 05:15:09 PDT 2004
This is a multi-part message in MIME format.
------=_NextPart_000_005F_01C4642C.CFB39D10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I'm having a problem querying a PostGIS layer with the GetFeatureInfo =
request. I have a point-layer in PostGIS which displays fine. When I =
query this with a getFeatureInfo request, everything goes well as long =
as this query returns 1 record. When multiple records are selected (when =
points are close to eachother), the returned GML answer is invalid (it =
stops after the first </Bunkerstations_feature> element in the GML =
answer). The problem only occurs with PostGIS layer, not with other =
(shapefile) layers.
querystring:
http://192.168.216.232/cgi-bin/mapserv?map=3D/home/htdocs/jjansen/imc.map=
&REQUEST=3DGetFeatureInfo&FEATURE_COUNT=3D10&query_layers=3DBunkerstation=
s&VERSION=3D1.1.0&width=3D500&height=3D300&x=3D220&y=3D222&INFO_FORMAT=3D=
gml&bbox=3D40000,402000,300000,558000
LAyer syntax in Mapfile:
LAYER
CONNECTIONTYPE postgis
NAME "Bunkerstations"
CONNECTION "user=3Dpostgres dbname=3Dimc host=3D192.168.216.241 =
options=3D'-c client_encoding=3Dlatin1'"
DATA "lokatie from (SELECT brancheinstelling.bezoekadres AS =
bezoekadres, infoeenheid.oid AS oid, infoeenheid.link_detail AS =
link_detail, brancheinstelling.bezoekplaats AS bezoekplaats, =
infoeenheid.titel AS titel,infoeenheid.infoeenheid_id AS infoeenheid_id, =
infoeenheid.lokatie AS lokatie
FROM infoeenheid LEFT JOIN brancheinstelling ON infoeenheid.volgnr =3D =
brancheinstelling.brancheinstelling_id WHERE infoeenheid.gegevenstypenr =
=3D 18) AS infoeenheid_plat USING UNIQUE oid USING SRID=3D-1;"
STATUS ON
TYPE POINT
DUMP TRUE # allow GML export
TEMPLATE "dummy.htm"
TOLERANCE 10
CLASS
NAME 'bunkerstation'
SIZE 15
COLOR 0 0 255
SYMBOL 'square'
END
=20
METADATA
WMS_TITLE "bunkerstation"
END #METADATA
END #Layer
Does anyone have any suggestions?
Best regards,
Jan Jansen
------=_NextPart_000_005F_01C4642C.CFB39D10
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.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm having a problem querying a PostGIS =
layer with=20
the GetFeatureInfo request. I have a point-layer in PostGIS which =
displays fine.=20
When I query this with a getFeatureInfo request, everything goes =
well as=20
long as this query returns 1 record. When multiple records are selected =
(when=20
points are close to eachother), the returned GML answer is invalid (it =
stops=20
after the first </Bunkerstations_feature> element in the GML =
answer). The=20
problem only occurs with PostGIS layer, not with other (shapefile)=20
layers.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>querystring:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://192.168.216.232/cgi-bin/mapserv?map=3D/home/htdocs/jjansen=
/imc.map&REQUEST=3DGetFeatureInfo&FEATURE_COUNT=3D10&query_la=
yers=3DBunkerstations&VERSION=3D1.1.0&width=3D500&height=3D30=
0&x=3D220&y=3D222&INFO_FORMAT=3Dgml&bbox=3D40000,402000,3=
00000,558000">http://192.168.216.232/cgi-bin/mapserv?map=3D/home/htdocs/j=
jansen/imc.map&REQUEST=3DGetFeatureInfo&FEATURE_COUNT=3D10&qu=
ery_layers=3DBunkerstations&VERSION=3D1.1.0&width=3D500&heigh=
t=3D300&x=3D220&y=3D222&INFO_FORMAT=3Dgml&bbox=3D40000,40=
2000,300000,558000</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>LAyer syntax in Mapfile:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR> =
CONNECTIONTYPE=20
postgis<BR> NAME =
"Bunkerstations"<BR> =20
CONNECTION "user=3Dpostgres dbname=3Dimc host=3D192.168.216.241 =
options=3D'-c=20
client_encoding=3Dlatin1'"<BR> DATA "lokatie from =
(SELECT=20
brancheinstelling.bezoekadres AS bezoekadres, infoeenheid.oid AS=20
oid, infoeenheid.link_detail =
AS=20
link_detail, brancheinstelling.bezoekplaats AS bezoekplaats, =
infoeenheid.titel=20
AS titel,infoeenheid.infoeenheid_id AS infoeenheid_id, =
infoeenheid.lokatie AS=20
lokatie<BR> FROM infoeenheid LEFT JOIN brancheinstelling ON=20
infoeenheid.volgnr =3D brancheinstelling.brancheinstelling_id WHERE=20
infoeenheid.gegevenstypenr =3D 18) AS infoeenheid_plat USING UNIQUE oid =
USING=20
SRID=3D-1;"<BR> STATUS ON<BR> TYPE=20
POINT<BR> DUMP TRUE # allow GML =
export<BR> =20
TEMPLATE "dummy.htm"<BR> TOLERANCE 10</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> CLASS<BR> =
NAME=20
'bunkerstation'<BR> SIZE 15<BR> COLOR =
0 0=20
255<BR> SYMBOL 'square'<BR> =
END<BR> <BR> =20
METADATA<BR> WMS_TITLE "bunkerstation"<BR> =
END #METADATA<BR> END #Layer<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Does anyone have any =
suggestions?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Best regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Jan Jansen</DIV></FONT></BODY></HTML>
------=_NextPart_000_005F_01C4642C.CFB39D10--
More information about the MapServer-users
mailing list