Skip to main content
10 votes
Accepted

How to view URL of GetFeatureInfo request in QGIS?

Simple Right click your feature in your "Identify Results" right pane and select "Copy GetFeatureInfo requests URL": Advanced You can also go with PyQGIS. For example, with a single layer loaded ...
swiss_knight's user avatar
  • 10.9k
8 votes

Why doesn't Leaflet have cross-origin error when adding WMS layer from GeoServer, but GetFeatureInfo using ajax does

Because that is the way CORS works! loading images is always (mostly) a safe operation so the browser doesn't care where you get them from. Loading a script (javascript or xml) is potentially ...
Ian Turton's user avatar
  • 83.2k
7 votes

How to view URL of GetFeatureInfo request in QGIS?

A nice way to see all remote requests such as GetFeatureInfo is to use the "QGIS Network Logger", which is available in all QGIS installations by default since since QGIS Pi / 3.14, by just ...
mapserving's user avatar
6 votes
Accepted

How does GetFeatureInfo work on a WMS?

What I know is that WMS is a tiled image of the layer What you know isn't quite correct, a WMS provides images on request based on some data source. The data source can be either a raster data set, ...
nmtoken's user avatar
  • 13.6k
5 votes

Is it possible to do a GetFeatureInfo request using WMTS?

Is it possible to do a GetFeatureInfo request using WMTS? It depends on what is supported by your service implementation, but in theory it is possible, by which I mean the OpenGIS® Web Map Tile ...
nmtoken's user avatar
  • 13.6k
5 votes

GetFeatureInfo returns "no layers queryable"

As is explained in the documentation getFeatureInfo requests are only supported if the remote server supports application/vnd.ogc.gml as the info format. WMS GetFeatureInfo requests will be passed ...
Ian Turton's user avatar
  • 83.2k
5 votes
Accepted

GetFeatureInfo on mouse hover on feature in OpenLayers 3

You could simply reuse your click code and change it pointermove/hover, although I presume you only want the popup visible when over a feature, so there's an else clause to hide it. var ...
Mike's user avatar
  • 12.9k
5 votes
Accepted

How to define propertynames for GetFeatureInfo

You can by using the GeoJSON featureinfo templates (recent addition mind, should be available in 2.20.x, not sure about 2.19.x): https://docs.geoserver.org/latest/en/user/tutorials/GetFeatureInfo/...
Andrea Aime's user avatar
  • 17.7k
4 votes

Date format in GeoServer WMS requests strange

Start your Goserver with this Java option: -Dorg.geotools.localDateTimeHandling=true It will tell Geotools to not modify date objects (http://docs.geotools.org/latest/javadocs/org/geotools/factory/...
Kresinho's user avatar
4 votes
Accepted

GeoServer GetFeatureInfo - how to get only one result per layer

Yes, you have to generate one request per layer with FEATURE_COUNT=1 in each.
Andrea Aime's user avatar
  • 17.7k
4 votes
Accepted

Popups in Leaflet through Geoserver wms active layers only

Create a variable that consists of geoserver layer names for layers that are currently drawn on the map, then pass the variable into the URL string. To do this its really beneficial to organize your ...
Owen J Lamb's user avatar
4 votes
Accepted

Replace a character in the GetFeatureInfo response

The formatting of a GetFeatureInfo response is controlled by a FreeMarker template rather than GeoServer directly. The FreeMarker documentation suggests that number formats are determined by the ...
Ian Turton's user avatar
  • 83.2k
4 votes
Accepted

Width and Height of GetFeatureInfoUrl request with Openlayers 4.x and Geoserver

Width and Height in a GetFeatureInfo request relate to the width and height of the Map (product of a GetMap request) to which you are supplying your I/J pixel coordinate. This has nothing to do with ...
nmtoken's user avatar
  • 13.6k
4 votes

Capture click while drawing a LineString in openlayers and query GeoServer WMS

Doesn't seem that OpenLayers provide any event to handle the clicks while drawing, but it can be done. The map 'click' event recives all the clicks made on the map, so the problem is to distinguish ...
César Argul García's user avatar
4 votes
Accepted

Getting FeatureCollection id in Google Earth Engine

Even though "id" is listed, it's actually "system:id" internally // import points as FC var myPoints = ee.FeatureCollection("users/me/important/myFC"); // ...
ThrushJacket's user avatar
4 votes
Accepted

Enable WMS GetFeatureInfo request in Leaflet using R?

It is now possible to get the GetFeatureInfo feature out-of-the-box with the leaflet.extras2 package by calling the leaflet.extras2::addWMS() function. See here below an example from the package ...
trevi's user avatar
  • 156
4 votes
Accepted

GeoServer WMS GetFeatureInfo only returning one Feature?

The problem was at the generation of the GetFeatureInfo URL. I didn't set the Feature_Count parameter, which sets the maximum number of features that can be returned. As seen here it is set to 1 by ...
Iñigo's user avatar
  • 449
4 votes
Accepted

Show all data of the WMS GeoServer layer on single click at web page using OpenLayers 6 WMS GetFeatureInfo (Tile Layer)

A GetFeatureInfo request will return only one feature unless you specify FEATURE_COUNT as a parameter. For example to allow a maximum of 10 features use var url = indialayersource....
Mike's user avatar
  • 12.9k
4 votes
Accepted

How to identify features from WMS in QField?

According to the OPENGIS.ch GitHub issues for QField, this is not currently possible. Reference: Feature suggestion: Identify WMS layers
nmtoken's user avatar
  • 13.6k
4 votes
Accepted

Changing size of leaflet.wms plugin popup in Leaflet?

What you have to do is to define your own showFeatureInfo option/method where you can set width of the popup like @Ziggy suggested. To do this you can use include method to modify L.WMS.Source class (...
TomazicM's user avatar
  • 27k
4 votes
Accepted

Getting WMS GetFeatureInfo response with MapServer in JSON format

There is a working example of a raster layer with a GetFeatureInfo query returning GeoJSON at https://app.mapserverstudio.net/#fXO3XBRn No templates are required, just the OUTPUTFORMAT: ...
geographika's user avatar
  • 14.4k
4 votes

QGIS identify tool is not aware of all available INFO_FORMAT parameters in the WMS GetFeatureInfo capabilities

The WMS Provider qgswmscapabilities.cpp loops through the supported GetFeatureInfo formats and categorises them into "text", "html" and "feature" types. I think (but am ...
user2856's user avatar
  • 69.6k
4 votes

QGIS identify tool is not aware of all available INFO_FORMAT parameters in the WMS GetFeatureInfo capabilities

Probably only the one who has coded the QGIS WMS provider can tell for sure but we may try to guess. The code is at https://github.com/qgis/QGIS/blob/06b5c5112726b9d29a35fdc5d4bb0e428cf25061/src/...
user30184's user avatar
  • 69k
3 votes

Calculate a field in a GetFeatureInfo request with MapServer 7.0.4

I think in principle it should be possible with JavaScript, for example if you consider the following GetFeatureInfo request: http://ogc.bgs.ac.uk/cgi-bin/TFL-PSI/ows?language=eng&REQUEST=...
nmtoken's user avatar
  • 13.6k
3 votes
Accepted

Openlayers 3 getGetFeatureInfoUrl geoserver problem

You are misunderstanding how GetFeatureInfo works, I'm afraid. You can only ask for information at a single point (X,Y) which is passed to the WMS server as pixel coordinates on the map image. The WMS ...
Ian Turton's user avatar
  • 83.2k
3 votes

How to add application/json as GetFeatureInfo format in a WMS with QGIS Server?

Yes, you can. I'd suggest you to start from the XML or the text format and turn it into json. Here is an example of how to proceed (this example does something different but you get the idea): http://...
elpaso66's user avatar
  • 346
3 votes

How to get GetFeatureInfoUrl from multiple layers in OpenLayers 3

As mentioned by @user30184 in comments the important parameter here is QUERY_LAYERS& To do a GetFeatureInfo request for multiple layers you need to list all those layers you want information on ...
nmtoken's user avatar
  • 13.6k
3 votes

Lat/long values in a WMS GetFeatureInfo request

Yes, see this answer: https://gis.stackexchange.com/a/211562/3399 This is the JavaScript implementation: var parameters = { service: 'WMS', version: '1.1.1', request: 'GetFeatureInfo', ...
Alex Leith's user avatar
  • 13.5k
3 votes

WMS GetFeatureInfo request in Leaflet/Geoserver

The layers to be queried is controlled by the query_layers parameter, in your code it is QUERY_LAYERS=test_layer:Imm_Coll_Lot_ALHOUDA_wgs84,test_layer:Villa_Lot_ALHOUDA_wgs84,test_layer:...
Ian Turton's user avatar
  • 83.2k
3 votes

Width and Height of GetFeatureInfoUrl request with Openlayers 4.x and Geoserver

I don't think there is any way to work out the size of the html returned from a getfeatureinfo request before it returned. If the sizing and presentation of the information is important to you then ...
Ian Turton's user avatar
  • 83.2k

Only top scored, non community-wiki answers of a minimum length are eligible