When viewing a region mapped dataset like a CSV file or ABS data and the user clicks on a region, a GetFeatureInfo request is made to the region mapping Geoserver instance. If the clicked region has complex geometry then the response can be very large as the entire geometry is returned as part of the JSON response.
E.g. this request where the ABS Census Age layer was enabled, and the NW area of Tasmania was clicked, the downloaded data is 8.5Mb (which when gzipped for transport is 2.3Mb):
That is a large amount of data to transfer for every click, and can add significant.
When the regions are by State and Tasmania is clicked, then 21.3Mb (5.9Mb gzipped) is transferred.
It is possible to not transfer the geometry data, but to do so it is necessary to name all the individual properties we do want to have returned like this &propertyname=FID,SA4_CODE11,SA4_NAME11,GCC_CODE11,GCC_NAME11,STE_CODE11,STE_NAME11,ALBERS_SQM:
We then get a "geometry": null in the returned JSON.
However, the geometry can be useful to us since it will be needed if we want to highlight the clicked region. In that case we should perform some form of level of detail reduction on the region to try to keep the returned geometry small.
@kring maybe you can expand further on this since you are more familiar with what is possible and how we want to use the geometry?
When viewing a region mapped dataset like a CSV file or ABS data and the user clicks on a region, a
GetFeatureInfo
request is made to the region mapping Geoserver instance. If the clicked region has complex geometry then the response can be very large as the entire geometry is returned as part of the JSON response.E.g. this request where the ABS Census Age layer was enabled, and the NW area of Tasmania was clicked, the downloaded data is 8.5Mb (which when gzipped for transport is 2.3Mb):
http://geoserver.nationalmap.nicta.com.au/region_map/ows?service=WMS&request=GetFeatureInfo&layers=region_map%3AFID_SA4_2011_AUST&query_layers=region_map%3AFID_SA4_2011_AUST&srs=EPSG%3A3857&bbox=15967389.460660178%2C-5322463.153553393%2C16280475.528516259%2C-5009377.085697312&x=180&y=39&width=256&height=256&info_format=application%2Fjson
That is a large amount of data to transfer for every click, and can add significant.
When the regions are by State and Tasmania is clicked, then 21.3Mb (5.9Mb gzipped) is transferred.
It is possible to not transfer the geometry data, but to do so it is necessary to name all the individual properties we do want to have returned like this
&propertyname=FID,SA4_CODE11,SA4_NAME11,GCC_CODE11,GCC_NAME11,STE_CODE11,STE_NAME11,ALBERS_SQM
:http://geoserver.nationalmap.nicta.com.au/region_map/ows?service=WMS&request=GetFeatureInfo&layers=region_map%3AFID_SA4_2011_AUST&query_layers=region_map%3AFID_SA4_2011_AUST&srs=EPSG%3A3857&bbox=15967389.460660178%2C-5322463.153553393%2C16280475.528516259%2C-5009377.085697312&x=180&y=39&width=256&height=256&info_format=application%2Fjson&propertyname=FID,SA4_CODE11,SA4_NAME11,GCC_CODE11,GCC_NAME11,STE_CODE11,STE_NAME11,ALBERS_SQM
We then get a
"geometry": null
in the returned JSON.However, the geometry can be useful to us since it will be needed if we want to highlight the clicked region. In that case we should perform some form of level of detail reduction on the region to try to keep the returned
geometry
small.@kring maybe you can expand further on this since you are more familiar with what is possible and how we want to use the geometry?
Also see #922 about highlighting geometries.