GetFeatureInfo returns information about the layers in a map and the queryable attributes of each layer. Before using GetFeatureInfo, you must use GetMap to get the X/Y pixel coordinate of a point on the specified map.
For more information about the Web Mapping Service OGC Specification, see (http://www.opengeospatial.org/standards/).
Request Format
https://api.cloud.precisely.com/v1/spatial/wms?VERSION={version}&SERVICE=WMS&REQUEST=GetFeatureInfo&CRS={SRSCRS}={namespace}:{identifier}&BBOX={min_x},{min_y},{max_x},{max_y}&WIDTH={output_width}&HEIGHT={output_height}&Layers={layer1},...,{layerX}&INFO_FORMAT={output_format}&QUERY_LAYERS={layer1},...,{layerX}&FEATURE_COUNT={number}&[X={pixel_column}&y={pixel_row}] [I={pixel_column}&J={pixel_row}]&PIXELSEARCHRADIUS={radius}Example: WMS version 1.1.1:
https://api.cloud.precisely.com/v1/spatial/wms?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetFeatureInfo&CRS=EPSG:4326&BBOX=29.19367847889249035,-98.56156199862394374,29.35037762857998089,-98.33146912069426548&WIDTH=400&HEIGHT=300&LAYERS=wfr_usa_fireriskpro_layer&INFO_FORMAT=application/json&QUERY_LAYERS=wfr_usa_fireriskpro_layer&I=1&J=1&PIXELSEARCHRADIUS=10Example: WMS version 1.3.0:
https://api.cloud.precisely.com/v1/spatial/wms?VERSION=1.3.0&SERVICE=WMS&REQUEST=GetFeatureInfo&CRS=EPSG:4326&BBOX=29.19367847889249035,-98.56156199862394374,29.35037762857998089,-98.33146912069426548&WIDTH=400&HEIGHT=300&LAYERS=wfr_usa_fireriskpro_layer&INFO_FORMAT=application/json&QUERY_LAYERS=wfr_usa_fireriskpro_layer&I=1&J=1&PIXELSEARCHRADIUS=10 Input Parameters
The request parameters are always sent as an HTTP query string.
| Input | Type | Required | Description |
|---|---|---|---|
| VERSION=version | String | Required | Request version. Private Spatial APIs WMS supports both version 1.1.1 and 1.3.0 of the OGC specification. |
| SERVICE=WMS | String | Required | Service type. This is always WMS. |
| REQUEST=GetFeatureInfo | String | Required | Request name. For a GetFeatureInfo request, this is always
GetFeatureInfo. |
| <map_request_copy> | String | Required | Partial copy of the GetMap request parameters that generated the map for which information is desired. The spatial reference system, bounding box, width, height, and layers of the GetMap request are required parameters. See the sample request below. |
| QUERY_LAYERS=layer_list | String | Required | Comma-separated list of one or more layers to be queried. It is not necessary to include all layers from the initial GetMap request. |
| INFO_FORMAT=output_format | String | YES for 1.3 (optional for 1.1.1) | Return format of feature information (MIME type). Current supported values are text/xml and application/json (for a GeoJSON output). |
| FEATURE_COUNT=number | Integer | Optional | The maximum number of features you want information for. |
| X=pixel_column | Integer | Required for 1.1.1 | The X-coordinate of the feature, in pixels, measured from the upper left corner which is 0. This parameter is only used for 1.1.1 versions of the OGC specification. |
| Y=pixel_row | Integer | Required for 1.1.1 | The Y-coordinate of the feature, in pixels, measured from the upper left corner which is 0. This parameter is only used for 1.1.1 versions of the OGC specification. |
| I=pixel_column | Integer | Required for 1.3.0 | The I-coordinate of the feature, in pixels, measured from the upper left corner which is 0. This parameter is only used for 1.3.0 versions of the OGC specification. |
| J=pixel_row | Integer | Required for 1.3.0 | The J-coordinate of the feature, in pixels, measured from the upper left corner which is 0. This parameter is only used for 1.3.0 versions of the OGC specification. |
| PIXELSEARCHRADIUS=radius | Integer | Optional | The distance in pixels within which a GetFeatureInfo operation will search all features in the layer. This value overrides the DefaultPixelSearchRadius that may be set at the service or layer levels. If PIXELSEARCHRADIUS is not present in the request and it is not specified for the service or layer levels, a pixel radius value of 3 is used. |
Example
Request:
https://api.cloud.precisely.com/v1/spatial/wms?VERSION=1.3.0&SERVICE=WMS&REQUEST=GetFeatureInfo&CRS=EPSG:4326&BBOX=29.19367847889249035,-98.56156199862394374,29.35037762857998089,-98.33146912069426548&WIDTH=400&HEIGHT=300&LAYERS=wfr_usa_fireriskpro_layer&INFO_FORMAT=application/json&QUERY_LAYERS=wfr_usa_fireriskpro_layer&I=1&J=1&PIXELSEARCHRADIUS=10{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"state": "TX",
"noharm_id": "CW0001098058",
"noharmcls": "W",
"noharmodel": "Wildland",
"riskdesc": "Low",
"risk50": 8,
"severity": 7,
"frequency": 9,
"community": -9999,
"damage": 0,
"mitigation": 5,
"intensity": 5,
"crown_fire": 0,
"wind_spd": 25,
"ember_cast": 0,
"burn_prob": 2,
"hist_perim": 12,
"prob_ignit": 10,
"line_dist": 35,
"structure": -9999,
"w_align_rd": -9999,
"acc_egress": -9999,
"veg_cover": -9999,
"hist_loss": 0,
"i_and_d": 0,
"f_stn_dist": 10,
"water_dist": 19,
"topo_pos": 11,
"burnable": 0,
"wkt": "POLYGON ((-98.566516 29.329436, -98.566825 29.329429, -98.56685 29.330241, -98.566233 29.330255, -98.566266 29.331338, -98.5669 29.331865, -98.568143 29.332106, -98.568468 29.33264, -98.568176 29.333189, -98.568519 29.334264, -98.57037 29.33422, -98.570704 29.335025, -98.57193 29.334725, -98.572882 29.335515, -98.572898 29.336056, -98.575109 29.337629, -98.57636 29.338141, -98.578221 29.338367, -98.57918 29.339428, -98.580115 29.339676, -98.579823 29.340225, -98.578597 29.340525, -98.578613 29.341066, -98.577103 29.342186, -98.576211 29.34329, -98.575602 29.343576, -98.575619 29.344117, -98.573458 29.344168, -98.572557 29.345002, -98.572573 29.345544, -98.570463 29.347219, -98.569904 29.349128, -98.568076 29.349984, -98.567492 29.351081, -98.566283 29.351922, -98.565048 29.351951, -98.564105 29.351432, -98.563462 29.350635, -98.563429 29.349552, -98.562194 29.349581, -98.561902 29.35013, -98.559741 29.350181, -98.557563 29.349691, -98.557539 29.348879, -98.558723 29.347226, -98.559641 29.346933, -98.559616 29.346121, -98.560225 29.345836, -98.5602 29.345024, -98.561093 29.34392, -98.561377 29.3431, -98.562261 29.341725, -98.562228 29.340643, -98.562529 29.340365, -98.563163 29.340891, -98.56378 29.340877, -98.563772 29.340606, -98.564981 29.339765, -98.564965 29.339224, -98.567067 29.337278, -98.568302 29.337249, -98.568569 29.335888, -98.567935 29.335361, -98.566692 29.33512, -98.565148 29.335156, -98.562662 29.334673, -98.562637 29.333862, -98.563538 29.333028, -98.565082 29.332991, -98.565691 29.332706, -98.565332 29.331089, -98.566516 29.329436))"
},
"geometry": null
}
],
"Metadata": [
{
"name": "state",
"type": "String"
},
{
"name": "noharm_id",
"type": "String"
},
{
"name": "noharmcls",
"type": "String"
},
{
"name": "noharmodel",
"type": "String"
},
{
"name": "riskdesc",
"type": "String"
},
{
"name": "risk50",
"type": "Integer"
},
{
"name": "severity",
"type": "Integer"
},
{
"name": "frequency",
"type": "Integer"
},
{
"name": "community",
"type": "Integer"
},
{
"name": "damage",
"type": "Integer"
},
{
"name": "mitigation",
"type": "Integer"
},
{
"name": "intensity",
"type": "Integer"
},
{
"name": "crown_fire",
"type": "Integer"
},
{
"name": "wind_spd",
"type": "Integer"
},
{
"name": "ember_cast",
"type": "Integer"
},
{
"name": "burn_prob",
"type": "Integer"
},
{
"name": "hist_perim",
"type": "Integer"
},
{
"name": "prob_ignit",
"type": "Integer"
},
{
"name": "line_dist",
"type": "Integer"
},
{
"name": "structure",
"type": "Integer"
},
{
"name": "w_align_rd",
"type": "Integer"
},
{
"name": "acc_egress",
"type": "Integer"
},
{
"name": "veg_cover",
"type": "Integer"
},
{
"name": "hist_loss",
"type": "Integer"
},
{
"name": "i_and_d",
"type": "Integer"
},
{
"name": "f_stn_dist",
"type": "Integer"
},
{
"name": "water_dist",
"type": "Integer"
},
{
"name": "topo_pos",
"type": "Integer"
},
{
"name": "burnable",
"type": "Integer"
},
{
"name": "wkt",
"type": "String"
}
]
}