[Mapserver-users] GetFeatureInfo PostGIS problem

Jan Jansen jansen at nieuwland.nl
Wed Jul 7 08:15:09 EDT 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>&nbsp;</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&nbsp;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 &lt;/Bunkerstations_feature&gt; 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>&nbsp;</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&amp;REQUEST=3DGetFeatureInfo&amp;FEATURE_COUNT=3D10&amp;query_la=
yers=3DBunkerstations&amp;VERSION=3D1.1.0&amp;width=3D500&amp;height=3D30=
0&amp;x=3D220&amp;y=3D222&amp;INFO_FORMAT=3Dgml&amp;bbox=3D40000,402000,3=
00000,558000">http://192.168.216.232/cgi-bin/mapserv?map=3D/home/htdocs/j=
jansen/imc.map&amp;REQUEST=3DGetFeatureInfo&amp;FEATURE_COUNT=3D10&amp;qu=
ery_layers=3DBunkerstations&amp;VERSION=3D1.1.0&amp;width=3D500&amp;heigh=
t=3D300&amp;x=3D220&amp;y=3D222&amp;INFO_FORMAT=3Dgml&amp;bbox=3D40000,40=
2000,300000,558000</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAyer syntax in Mapfile:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp;&nbsp;&nbsp; =
CONNECTIONTYPE=20
postgis<BR>&nbsp;&nbsp;&nbsp; NAME =
"Bunkerstations"<BR>&nbsp;&nbsp;&nbsp;=20
CONNECTION "user=3Dpostgres dbname=3Dimc host=3D192.168.216.241 =
options=3D'-c=20
client_encoding=3Dlatin1'"<BR>&nbsp;&nbsp;&nbsp; DATA "lokatie from =
(SELECT=20
brancheinstelling.bezoekadres AS bezoekadres, infoeenheid.oid AS=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; oid,&nbsp;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>&nbsp;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>&nbsp;&nbsp;&nbsp; STATUS ON<BR>&nbsp;&nbsp;&nbsp; TYPE=20
POINT<BR>&nbsp;&nbsp;&nbsp; DUMP TRUE # allow GML =
export<BR>&nbsp;&nbsp;&nbsp;=20
TEMPLATE "dummy.htm"<BR>&nbsp;&nbsp;&nbsp; TOLERANCE 10</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;NAME=20
'bunkerstation'<BR>&nbsp;&nbsp;&nbsp; &nbsp;SIZE 15<BR>&nbsp;&nbsp;COLOR =
0 0=20
255<BR>&nbsp;&nbsp;SYMBOL 'square'<BR>&nbsp;&nbsp;&nbsp; =
END<BR>&nbsp;<BR>&nbsp;=20
METADATA<BR>&nbsp;&nbsp;&nbsp; &nbsp;WMS_TITLE "bunkerstation"<BR>&nbsp; =

&nbsp;END #METADATA<BR>&nbsp; END #Layer<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Does anyone have any =
suggestions?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Best regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</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