[mapserver-users] GetFeatureInfo

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Mon Oct 5 15:26:35 EDT 2009


Hi,

X and y in GetFeatureInfo request are image pixel coordinates, not geographic ones.  See how ESRI describes it
http://webhelp.esri.com/arcims/9.2/general/mergedProjects/wms_connect/wms_connector/get_featureinfo.htm

-Jukka Rahkonen-



Iratxe Lejarreta wrote:
 
Hi,

When I execute the following command, Postfix return the correct result:
select * from building where ST_INTERSECTS(geom,'SRID=23030;POINT(579389.40625 
4795144.78125)');

But when I execute GetFeatureInfo request in MapServer with the same 
point(x,y), the response doesn't return any result:
http://localhost/cgi-
bin/test?&SERVICE=wms&VERSION=1.1.1&REQUEST=getfeatureinfo&LAYERS=mylayer&QUERY_LAYERS=mylayer&x=579389.40625&y=479511.78125&INFO_FORMAT=text/html&SRS=EPSG:23030&BBOX=532666.0,4749720.0,603151.0,4805350.0&WIDTH=512&HEIGHT=512

My map file:

MAP
NAME "TEST"
STATUS ON
SIZE 400 300
SYMBOLSET symbols.sym
EXTENT 530000 4740000 610000 4820000
UNITS METERS
SHAPEPATH "data"
IMAGECOLOR 255 255 255
FONTSET fonts.txt

WEB
        IMAGEPATH "/tmp/"
        IMAGEURL "/tmp/"
        HEADER "../templates/test_header.html"
        FOOTER "../templates/test_footer.html"
        METADATA
                "wms_title"             "Test"
                "wms_onlineresource"    "http://localhost/cgi-bin/test?"
                "wms_srs"               "EPSG:23030"
                "wms_feature_info_mime_type"    "text/html"
        END
END

PROJECTION
        "init=epsg:23030"
END

LAYER
        NAME mylayer
        PROJECTION
                "init=epsg:23030"
        END
        TYPE POLYGON
        STATUS ON
        DUMP TRUE
        UNITS METERS
        TEMPLATE "../templates/mylayer_body.html"
        CONNECTIONTYPE postgis
        CONNECTION "host=localhost port=5432 dbname=mydb user=postgres 
password=******"
        DATA "the_geom from mylayer"
        METADATA
                "wms_title"             "mylayer"
                "wms_srs"               "EPSG:23030"
                "wms_extent"            "532666 4749720 603151 4805350"
                "wms_feature_info_mime_type"    "text/html"
                "wms_include_items"     "all"
        END
        TOLERANCE 5
        CLASS
                NAME "building"
                STYLE
                        COLOR 200 255 0
                        OUTLINECOLOR 120 120 120
                END
	END
END

END


I tried the same map configuration with another layer but with SRS:4326 and the 
result of GetFeatureInfo request is ok. 
If the difference is the projection and extent, where is the error?

Thanks in advance!

-- 
Iratxe Lejarreta
www.axios.es



More information about the mapserver-users mailing list