I'd like to find a way in QGIS (plugin, script) to query a WMS service (Italian cadastral Agency) with specific parameters (municipality, map sheet, parcel no.) and pan/zoom to the selected feature.

  1. Queryable WMS URL https://wms.cartografia.agenziaentrate.gov.it/inspire/wms/ows01.php

  2. Example output of a GetFeatureInfo query in HTML of a point in the CP.CadastralParcel layer

WMS query

Looking at the InspireId localId field, the parameters I'd like to input and process to build the query are:

  • Municipality code: in the example is the string G273
  • Cadastral map sheet number: in the example is the string 003400
  • Cadastral parcel number: in the example is the string 1298

Starting from these 3 parameters given by the user, I think it should be composed a string similar to the one in the example IT.AGE.PLA.G273_003400.1298 to be used to query the WMS layer and select the corresponding feature, then pan/zoom to it.

I've found on the web this AJAX request that I think it could be used to parse the service for this purpose https://wms.cartografia.agenziaentrate.gov.it/inspire/ajax/ajax.php?op=getGeomPart&prov=%7B0%7D&cod_com=%7B1%7D&foglio=%7B2%7D&num_part=%7B3%7D%2F&tkn=%7B4%7D

In this article it could be found some further specifications https://medium.com/tantotanto/le-mappa-castali-diventano-finalmente-utilizzabili-821db2f84533


1 Answer 1


You can't pan/zoom to a selected feature in a WMS, because a WMS doesn't expose any features, only an image representation of features.

A GetFeatureInfo request may retrieve multiple attributes, but only for those features that intersect the pixel point (x,y/i,j) in the retrieved image.

There is no way to go to any specific feature as part of a standard WMS request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.