[Geomoose-users] Identify Attributes on a WMS

Brent Fraser bfraser at geoanalytic.com
Mon Jun 21 13:06:00 EDT 2010


I've created a couple of tickets:
  http://www.geomoose.org/trac/ticket/97
  http://www.geomoose.org/trac/ticket/98

Brent


Len Kne wrote:
> Hi Liesa
> 
>  
> 
> I looked further into the Identify tool using a WMS layer.  It just 
> didn’t make sense that the WMS service was returning feature info only 
> when using Lat/Lon when it displays the image using UTM.  Looking 
> through the WMS specification, page 38 talks about GetFeatureInfo and 
> states:
> 
>  
> 
> “The actual semantics of how a WMS decides what to return more 
> information about, or what exactly to return, are left up to the WMS 
> provider.”
> 
>  
> 
> So GeoMOOSE is expecting the returned data to come back with the 
> attributes as nodes, but the service is returning the attributes as 
> attributes of a node named “FIELDS”.  Change identify.php to parse the 
> GML as it is returned and the identify works, see 
> http://dev.houstoneng.net/geomoose.html.  In the long run, I’m not sure 
> how we make GeoMOOSE capable of handling the GetFeatureInfo response 
> when it can be configured in many ways, but maybe a couple common 
> formats can be added.
> 
>  
> 
> If anyone is interested, here’s how the map-source looks in the mapbook:
> 
>  
> 
>                 <map-source name="bikeways" type="wms" tiled="false" 
> projection='EPSG:26915'  queryable="true">
> 
>                                 
> <url>http://www.datafinder.org/wmsconnector/com.esri.wms.Esrimap/MN_MetroGIS_DataFinder_WMS_Recreation_Tourism?</url>
> 
>                                 <layer name="bikeways" queryable="true" />
> 
>                                 <param name="format" value="image/jpeg"/>
> 
>                                 <param name="TRANSPARENT" value="TRUE"/>
> 
>                 </map-source>               
> 
> Attached are identify.php and the templates used for the example.
> 
>  
> 
> Len
> 
>  
> 
> *From:* Miller, Elizabeth (DOT) [mailto:Elizabeth.Miller at state.mn.us]
> *Sent:* Friday, June 18, 2010 9:58 AM
> *To:* Len Kne; Brian Fischer; geomoose-users at lists.sourceforge.net
> *Subject:* RE: Identify Attributes on a WMS
> 
>  
> 
> Thanks for the insight! It looks like the identify.php is getting the x 
> and y (for the clicked point) as well as the 26915 from the 
> configuration of the map. I tried defining the projection of the wms 
> layer in the mapbook (projection="EPSG:4326") but that doesn’t seem to 
> override how identify.php is getting the point location and the projection.
> 
>  
> 
> I wonder if I should go back to trying to describe the layer with a 
> mapfile? Any thoughts?
> 
>  
> 
> (By the way, this problem is handled successfully in ArcMap, where the 
> identify tool is able to get the correct attribute response even when 
> the wms is reprojected.)
> 
>  
> 
> Thanks again,
> 
>  
> 
> Liesa
> 
>  
> 
>  
> 
> *From:* Len Kne [mailto:lkne at houstoneng.com]
> *Sent:* Thursday, June 17, 2010 11:15 AM
> *To:* Miller, Elizabeth (DOT); Brian Fischer; 
> geomoose-users at lists.sourceforge.net
> *Subject:* RE: Identify Attributes on a WMS
> 
>  
> 
> This works…
> 
>  
> 
> http://www.datafinder.org/wmsconnector/com.esri.wms.Esrimap/MN_MetroGIS_DataFinder_WMS_Recreation_Tourism?&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&WIDTH=100&HEIGHT=100&X=50&Y=50&EXCEPTIONS=application/vnd.ogc.se_xml&LAYERS=bikeways&QUERY_LAYERS=bikeways&BBOX=-94,44.5,-92,45.6&SRS=EPSG:4326&INFO_FORMAT=text/html&FEATURE_COUNT=100 
> <http://www.datafinder.org/wmsconnector/com.esri.wms.Esrimap/MN_MetroGIS_DataFinder_WMS_Recreation_Tourism?&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&WIDTH=100&HEIGHT=100&X=50&Y=50&EXCEPTIONS=application/vnd.ogc.se_xml&LAYERS=bikeways&QUERY_LAYERS=bikeways&BBOX=-94,44.5,-92,45.6&SRS=EPSG:4326&INFO_FORMAT=text/html&FEATURE_COUNT=100>
> 
>  
> 
> Strange, because in the GetFeatureInfo it looks like 26915 is supported.
> 
>  
> 
> Len
> 
>  
> 
> *From:* Miller, Elizabeth (DOT) [mailto:Elizabeth.Miller at state.mn.us]
> *Sent:* Thursday, June 17, 2010 9:56 AM
> *To:* Brian Fischer; geomoose-users at lists.sourceforge.net
> *Subject:* Re: [Geomoose-users] Identify Attributes on a WMS
> 
>  
> 
> So, I’ve been working on this for a couple months now – still no luck! 
> I’ve stopped using a mapfile and I now have my wms only as a source in 
> my mapbook file. I am hitting the wms on the map with the identify tool 
> and I am trying to get the identify.php to send the proper 
> GetFeatureInfo request so that it can populate the wms_record.html. As 
> an example, I am using the wms services at www.datafinder.org 
> <http://www.datafinder.org>. The url that the identify.php is building 
> for my request is this:
> 
>  
> 
> http://www.datafinder.org/wmsconnector/com.esri.wms.Esrimap/MN_MetroGIS_DataFinder_WMS_Recreation_Tourism?&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&WIDTH=100&HEIGHT=100&X=50&Y=50&EXCEPTIONS=application/vnd.ogc.se_xml&LAYERS=bikeways&QUERY_LAYERS=bikeways&BBOX=508702.025,4993206.245,508902.025,4993406.245&SRS=EPSG:26915&STYLES=&INFO_FORMAT=application/vnd.ogc.gml 
> <http://www.datafinder.org/wmsconnector/com.esri.wms.Esrimap/MN_MetroGIS_DataFinder_WMS_Recreation_Tourism?&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&WIDTH=100&HEIGHT=100&X=50&Y=50&EXCEPTIONS=application/vnd.ogc.se_xml&LAYERS=bikeways&QUERY_LAYERS=bikeways&BBOX=508702.025,4993206.245,508902.025,4993406.245&SRS=EPSG:26915&STYLES=&INFO_FORMAT=application/vnd.ogc.gml>
> 
> As you can see if you hit this url, I am not getting any attribute 
> information back. Any ideas why? Is there something missing from my request?
> 
>  
> 
> (Yes, the wms layer is queryable.)
> 
>  
> 
> Thanks for your help!
> 
>  
> 
> Liesa Miller
> 
> MnDOT Metro District
> 
>  
> 
>  
> 
> *From:* Brian Fischer [mailto:bfischer at houstoneng.com]
> *Sent:* Thursday, April 22, 2010 12:17 PM
> *To:* Miller, Elizabeth (DOT); geomoose-users at lists.sourceforge.net
> *Subject:* Re: [Geomoose-users] Identify Attributes on a WMS
> 
>  
> 
> In your mapfile that you are trying to identify on are you using?
> 
>                                 METADATA
> 
>                                                 'wms_record'    
> 'identify_parcel.html'
> 
>                                 END
> 
>  
> 
> I believe that is what tells the GeoMOOSE code to make a WMS identify 
> request versus a MapServer identify request.  Have you look to see what 
> firebug is return for results?  When I look through the identify.php 
> code it appears to all be in there, but it is looking for the wms_record 
> parmater in the mapfile.
> 
>  
> 
> Like I said I have not tried to use this feature myself but it is 
> suppose to be supported.  Hope this helps you debug it a little bit more.
> 
>  
> 
> *Brian Fischer,* CFM  GIS Project Manager
> *Houston Engineering, Inc.*
> Phone: Direct: 763-493-6664 / W: 763.493.4522 / M: 763.229.2734
> 
>  
> 
> *From:* Miller, Elizabeth (DOT) [mailto:Elizabeth.Miller at state.mn.us]
> *Sent:* Thursday, April 22, 2010 11:52 AM
> *To:* Brian Fischer; geomoose-users at lists.sourceforge.net
> *Subject:* RE: Identify Attributes on a WMS
> 
>  
> 
> Thanks Brian,
> 
>  
> 
> Yep, the WMS source should have attributes available for request. Here’s 
> my current METADATA code. As you can see, I think I’ve thrown everything 
> but the kitchen sink in there. If you have any ideas or see any glaring 
> errors let me know.
> 
>  
> 
> LAYER...
> 
>    METADATA   
> 
>       "wms_identify" "identify_data.html"
> 
>       "wms_record" "identify_data.html"
> 
>       "wms_title" "layertitle"          
> 
>       "wms_srs" "EPSG:26915"
> 
>       "wms_name" "layername"
> 
>       "wms_server_version" "1.1.1"
> 
>       "wms_format" "image/gif"
> 
>       "wms_styles" ""
> 
>       "wms_exceptions" "application/vnd.ogc.se_inimage"
> 
>       "wms_request" "GetMap"
> 
>       "wms_request" "GetFeatureInfo"
> 
>       "wms_include_items" "all"
> 
>       "wms_feature_info_mime_type" "text/html"    
> 
>     END
> 
>     DUMP TRUE
> 
>     TEMPLATE '/ms4w/.../identify_data.html'   
> 
>     TOLERANCE 3
> 
> ...END
> 
>    
> 
>  
> 
> *From:* Brian Fischer [mailto:bfischer at houstoneng.com]
> *Sent:* Wednesday, April 21, 2010 3:43 PM
> *To:* Miller, Elizabeth (DOT); geomoose-users at lists.sourceforge.net
> *Subject:* RE: Identify Attributes on a WMS
> 
>  
> 
> Liesa,
> 
> First thing you will have to figure out is if the WMS source has setup 
> any attributes to return with a getinfo wms request.  It should be 
> published in the GetCapbilities if it is.  Not all WMS servers are setup 
> by default to return all attributes.
> 
>  
> 
> I have never tried to use the identify with a WMS data source, but I 
> believe Dan added support for it.  I have seen there are configuration 
> settings for the html templates in settings.ini file.
> 
>  
> 
> *Brian Fischer,* CFM  GIS Project Manager
> *Houston Engineering, Inc.*
> Phone: Direct: 763-493-6664 / W: 763.493.4522 / M: 763.229.2734
> 
>  
> 
> *From:* Miller, Elizabeth (DOT) [mailto:Elizabeth.Miller at state.mn.us]
> *Sent:* Wednesday, April 21, 2010 3:07 PM
> *To:* geomoose-users at lists.sourceforge.net
> *Subject:* [Geomoose-users] Identify Attributes on a WMS
> 
>  
> 
> I’m looking for help in setting up an identify on a wms layer. I am 
> using a mapfile to bring in the layer rather than setting up the 
> connection in the mapbook. Does anyone have an example of how to do 
> this? I would like to be able to click with the identify tool on the 
> layer and return attributes in an html template.
> 
>  
> 
> Thanks!
> 
>  
> 
> Liesa Miller
> 
> MnDOT Metro District
> 
>  
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit.  See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geomoose-users





More information about the Geomoose-users mailing list