<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">On Monday 05 October 2009 09:26:35 pm Rahkonen Jukka wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; X and y in GetFeatureInfo request are image pixel coordinates, not<br>
&gt; geographic ones.  See how ESRI describes it<br>
&gt; http://webhelp.esri.com/arcims/9.2/general/mergedProjects/wms_connect/wms_c<br>
&gt;onnector/get_featureinfo.htm<br>
&gt;<br>
&gt; -Jukka Rahkonen-<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Iratxe Lejarreta wrote:<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; When I execute the following command, Postfix return the correct result:<br>
&gt; select * from building where<br>
&gt; ST_INTERSECTS(geom,'SRID=23030;POINT(579389.40625 4795144.78125)');<br>
&gt;<br>
&gt; But when I execute GetFeatureInfo request in MapServer with the same<br>
&gt; point(x,y), the response doesn't return any result:<br>
&gt; http://localhost/cgi-<br>
&gt; bin/test?&amp;SERVICE=wms&amp;VERSION=1.1.1&amp;REQUEST=getfeatureinfo&amp;LAYERS=mylayer&amp;Q<br>
&gt;UERY_LAYERS=mylayer&amp;x=579389.40625&amp;y=479511.78125&amp;INFO_FORMAT=text/html&amp;SRS=<br>
&gt;EPSG:23030&amp;BBOX=532666.0,4749720.0,603151.0,4805350.0&amp;WIDTH=512&amp;HEIGHT=512<br>
&gt;<br>
&gt; My map file:<br>
&gt;<br>
&gt; MAP<br>
&gt; NAME "TEST"<br>
&gt; STATUS ON<br>
&gt; SIZE 400 300<br>
&gt; SYMBOLSET symbols.sym<br>
&gt; EXTENT 530000 4740000 610000 4820000<br>
&gt; UNITS METERS<br>
&gt; SHAPEPATH "data"<br>
&gt; IMAGECOLOR 255 255 255<br>
&gt; FONTSET fonts.txt<br>
&gt;<br>
&gt; WEB<br>
&gt;         IMAGEPATH "/tmp/"<br>
&gt;         IMAGEURL "/tmp/"<br>
&gt;         HEADER "../templates/test_header.html"<br>
&gt;         FOOTER "../templates/test_footer.html"<br>
&gt;         METADATA<br>
&gt;                 "wms_title"             "Test"<br>
&gt;                 "wms_onlineresource"    "http://localhost/cgi-bin/test?"<br>
&gt;                 "wms_srs"               "EPSG:23030"<br>
&gt;                 "wms_feature_info_mime_type"    "text/html"<br>
&gt;         END<br>
&gt; END<br>
&gt;<br>
&gt; PROJECTION<br>
&gt;         "init=epsg:23030"<br>
&gt; END<br>
&gt;<br>
&gt; LAYER<br>
&gt;         NAME mylayer<br>
&gt;         PROJECTION<br>
&gt;                 "init=epsg:23030"<br>
&gt;         END<br>
&gt;         TYPE POLYGON<br>
&gt;         STATUS ON<br>
&gt;         DUMP TRUE<br>
&gt;         UNITS METERS<br>
&gt;         TEMPLATE "../templates/mylayer_body.html"<br>
&gt;         CONNECTIONTYPE postgis<br>
&gt;         CONNECTION "host=localhost port=5432 dbname=mydb user=postgres<br>
&gt; password=******"<br>
&gt;         DATA "the_geom from mylayer"<br>
&gt;         METADATA<br>
&gt;                 "wms_title"             "mylayer"<br>
&gt;                 "wms_srs"               "EPSG:23030"<br>
&gt;                 "wms_extent"            "532666 4749720 603151 4805350"<br>
&gt;                 "wms_feature_info_mime_type"    "text/html"<br>
&gt;                 "wms_include_items"     "all"<br>
&gt;         END<br>
&gt;         TOLERANCE 5<br>
&gt;         CLASS<br>
&gt;                 NAME "building"<br>
&gt;                 STYLE<br>
&gt;                         COLOR 200 255 0<br>
&gt;                         OUTLINECOLOR 120 120 120<br>
&gt;                 END<br>
&gt;         END<br>
&gt; END<br>
&gt;<br>
&gt; END<br>
&gt;<br>
&gt;<br>
&gt; I tried the same map configuration with another layer but with SRS:4326 and<br>
&gt; the result of GetFeatureInfo request is ok.<br>
&gt; If the difference is the projection and extent, where is the error?<br>
&gt;<br>
&gt; Thanks in advance!<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Ok, I changed X and Y but the result is null.<br>
The same request with shapefile gives me the result that I want, but with postgis I don't receive any result.<br>
Is there any bug with MapServer and Postgis in a different projection than 4326?<br>
Thanks!<br>
-- <br>
Iratxe Lejarreta<br>
www.axios.es</p></body></html>