Discussion:
[Geoserver-users] KML GetMap place mark response outside scale range
Paul Austin
2017-06-28 17:42:13 UTC
Permalink
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.
Andrea Aime
2017-06-28 18:52:51 UTC
Permalink
Hi Paul,
for starters I'd open a ticket:
https://osgeo-org.atlassian.net/projects/GEOS/issues

If you want to speed up the resolution I'd also consider making a pull
request, following this rules:
https://github.com/geoserver/geoserver/blob/master/CONTRIBUTING.md

Cheers
Andrea
Post by 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&
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.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo Ú consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
Paul Austin
2017-06-28 19:12:26 UTC
Permalink
Andrea,

I wasn’t sure if it was better to discuss on the mailing list first.

Anyway I’ve created an Improvement request in JIRA

https://osgeo-org.atlassian.net/browse/GEOS-8202 <https://osgeo-org.atlassian.net/browse/GEOS-8202>
Andrea Aime
2017-06-29 06:24:49 UTC
Permalink
Post by Paul Austin
Andrea,
I wasn’t sure if it was better to discuss on the mailing list first.
You did good, we expect (hope?) people would discuss issues before
reporting a ticket,
as we get a number of false positives, duplicates, "read the docs" and
general garbage from
newcomers hitting Jira directly
Post by Paul Austin
Anyway I’ve created an Improvement request in JIRA
https://osgeo-org.atlassian.net/browse/GEOS-8202
Thanks!
--
Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo Ú consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
Loading...