[Geoserver-devel] [jira] Created: (GEOS-3843) KML output does not respect scale dependencies in SLD

KML output does not respect scale dependencies in SLD
-----------------------------------------------------

                 Key: GEOS-3843
                 URL: http://jira.codehaus.org/browse/GEOS-3843
             Project: GeoServer
          Issue Type: Bug
          Components: Google Earth KML Output
    Affects Versions: 2.0.0
         Environment: Geoserver 2.0 on Linux
Oracle 11GR2
            Reporter: Bruce E. Thelen
            Assignee: Andrea Aime

I have a very large table with 120M rows in Oracle Spatial 11GR2. They are relatively simple polygons representing land parcels.

All SLD's for this feature type show the polygons at a max scale of 25,000 to avoid taking up too many server resources. This works great for all image output types, however KML outputs are not respecting the scale dependencies.

Here is how I reproduce the error:
Click Layer Preview.
Choose KML output
Open file in Google Earth
Google Earth launches, then makes the call for that layer at its full extent.
The request then hangs -- I turned up logging and see the following in the logs:
05 Mar 10:39:46 DEBUG [wms.responses] - asking delegate for write to org.geoserver.ows.DispatcherOutputStream@anonymised.com
05 Mar 10:39:46 DEBUG [geoserver.kml] - scale denominator = 3.0050625951803163E7
05 Mar 10:39:46 DEBUG [geotools.styling] - number of fts set 1
05 Mar 10:39:46 DEBUG [geotools.jdbc] - CREATE CONNECTION
05 Mar 10:39:46 TRACE [geotools.core] - ENTRY 4
05 Mar 10:39:46 DEBUG [geotools.filter] - exporting PropertyName
05 Mar 10:39:46 DEBUG [geotools.jdbc] - SELECT count(*) FROM GIS_ENT.WMS_PARCEL_VW WHERE SDO_FILTER(GEOM, ?, 'mask=anyinteract querytype=WINDOW') = 'TRUE'
05 Mar 10:39:46 DEBUG [oracle.sdo] - Using layer SRID: 4326
05 Mar 10:39:46 DEBUG [geotools.jdbc] - Setting parameter 1 as MDSYS.SDO_GEOMETRY(2003,4326,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-180.0,-19.73528520964797,180.0,90.0))
05 Mar 10:39:46 DEBUG [geotools.jdbc] - 1 = POLYGON ((-180 -19.73528520964797, -180 90, 180 90, 180 -19.73528520964797, -180 -19.73528520964797))

GeoServer is trying to count the features in the layer even though the layer is way out of its scale dependency.

Thanks.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

Any workaround for this probelm?

Regards,
Baskar
--
View this message in context: http://old.nabble.com/-jira--Created%3A-(GEOS-3843)-KML-output-does-not-respect-scale-dependencies-in-SLD-tp27796644p28605645.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Baski@anonymised.com ha scritto:

Any workaround for this probelm?

I don't think so... GE does not tell us the actual scale, only a geographic bbox, I think we simply assume a 500x500 image as a reference to compute the scale but I'm not sure of the details.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.