[Geoserver-devel] [JIRA] (GEOS-8202) KML GetMap place mark response outside scale range

Paul Austin created an issue

GeoServer / ImprovementGEOS-8202

KML GetMap place mark response outside scale range

Issue Type:

ImprovementImprovement

Affects Versions:

2.11.1

Assignee:

Unassigned

Components:

Google Earth KML Output

Created:

28/Jun/17 9:10 PM

Priority:

MediumMedium

Reporter:

Paul Austin

It looks like if you do a request to return KML data in a WMS request where there are no styles within the scale range it is still calculating the feature collection. It would be nice if there were no valid styles at that scale range then the response would short circuit and return an empty document rather than calculating the feature collection.

For example the following takes a long time to process and return an document with no KML placemarks.

http://test.openmaps.gov.bc.ca/geo/pub/wms?service=wms&request=GetMap&version=1.1.1&format=application/vnd.google-earth.kml+xml&layers=pub%3AWHSE_IMAGERY_AND_BASE_MAPS.AIMG_PHOTO_CENTROIDS_SP&styles=Airborne_Imagery_Air_Photo_Centres_2016&transparent=true&srs=EPSG%3A4326&format_options=AUTOFIT:true;KMATTR:true;KMPLACEMARK:true;KMSCORE:100;MODE:refresh;SUPEROVERLAY:false&BBOX=-130,49,-110,60&WIDTH=1000&HEIGHT=1000

Adding &maxFeatures=1000 it returns quicker, but it looks like it is still performing the query.

In org.geoserver.kml.sequence.FeatureSequenceFactory the following looks like if the simplified styles are null then it doesn’t create the feature iterator. I wonder if changing it to something like simplified!= null && ! simplified.isEmpty() would work. Or if the feature collection is also being created elsewhere.

@Override
public Sequence<Feature> newSequence()

{ return new FeatureGenerator(simplified != null ? context.openIterator(features) : null); }

I don’t know the code enough and the geoserver is running at a client site so I can verify In a debugger what is actually happening.

Add Comment

Add Comment

Get JIRA notifications on your phone! Download the JIRA Cloud app here.


This message was sent by Atlassian JIRA (v1000.1092.0#100053-sha1:6914530)

Atlassian logo