Ticket #3634 (new bug)

Opened 2 years ago

Last modified 2 years ago

WMSGetFeatureInfo does work across the 180 line.

Reported by: scaddenp Owned by:
Priority: major Milestone: 2.13 Release
Component: general Version: 2.11
Keywords: Cc:
State:

Change History

Changed 2 years ago by ahocevar

  • state set to Awaiting User Feedback

The bbox that OpenLayers uses for the GetFeatureInfo request should be the same as for the GetMap request. In the example above, the llbbox is 150.30,-50.17,190.69,-30.78. Now two interesting questions: what is your layer's maxExtent in the GetCapabilities response? And does the url below return a feature info?

 http://maps.gns.cri.nz/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=gns%3APETROLEUM.NZ_2D_SEIS_LINES&QUERY_LAYERS=gns%3APETROLEUM.NZ_2D_SEIS_LINES&STYLES=&BBOX=16731556.455300998%2C-6475305.631310003%2C1189768.3702969998%2C-3603719.353092&FEATURE_COUNT=1&HEIGHT=587&WIDTH=919&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A900913&X=754&Y=363

Note that this is the same url as your original one, but with the right edge at 10.69 instead of 190.69.

Changed 2 years ago by ahocevar

  • state Awaiting User Feedback deleted

Well, since this is a public server, I can answer the questions myself: 1) The maximum extent of the layer as advertised in GetCapabilities is -180.0,-86.63,180.0,90.0 2) The request that OpenLayers sends is correct. The modified url raises an exception ("org.geoserver.platform.ServiceException: illegal bbox, minX: 1.6731556455300998E7 is greater than maxX: 1189768.3702969998").

Especially 2) makes me think that this issue should be fixed on the GeoServer side. The only other option would be to split the map extent at the dateline and send two GetFeatureInfo requests.

I'm leaving this ticket open. @scaddenp, please report any progress here and close when resolved.

Changed 2 years ago by scaddenp

Okay, thanks very much for that clarification. I have posted on geoserver list. (GEOS-4991)

I'm prepared to consider a hack meantime though. It should possible to tell whether the position is left or right of 180, so surely only one getfeatureInfo is required? The trick though is splitting the mapextent to create a properly formed URL. Given the URL above generated an error, what would a correct URL look like? If I know that, I can probably hack away from there.

Changed 2 years ago by ahocevar

As far as I can tell from the above error message, the only requirement is that the left value of the BBOX is smaller than the right value.

Changed 2 years ago by scaddenp

Yes, that stops the error - I'll need to dig into the code though to see what the bbox value should be to actually find something but then I needed to do that anyway. Thanks.

Note: See TracTickets for help on using tickets.