Hi all,
I am still facing this scale dependencies problem. I have been waiting for
long time to get help from anybody.Did anybody in developer list have time
to suggest on the patch that i pasted below to solve the problem.
Regards,
Baskar
Baskar Dhanapal wrote:
>
> Hi,
>
> I tried to fix this problem by adding the following code in
> "KMLTransformer.java", exactly next to scaleDenominator calculation.
>
> for(int i =0;i<layers.length;i++) {
> MapLayer layer = layers[i];
> FeatureSource <SimpleFeatureType, SimpleFeature>
> featureSource;
> featureSource = (FeatureSource<SimpleFeatureType,
> SimpleFeature>) layer.getFeatureSource();
> SimpleFeatureType featureType = featureSource.getSchema();
> FeatureTypeStyle[] featureTypeStyles =
> KMLUtils.filterFeatureTypeStyles(layer.getStyle(),
> featureType);
> if ((featureTypeStyles == null) ||
> (featureTypeStyles.length == 0)) {
> break;
> }
> for(int j=0;j<featureTypeStyles.length;j++){
> FeatureTypeStyle featureTypeStyle =
> featureTypeStyles[j];
> Rule[] rules = featureTypeStyle.getRules();
> if ((rules == null) || (rules.length == 0)) {
> break;
> }
> for(int k=0;k<rules.length;k++){
> Rule rule = rules[k];
>
> if(Math.round(scaleDenominator)>rule.getMaxScaleDenominator()){
> LOGGER.log(Level.FINE, "Scale goes out of
> Dependency");
> return;
> }
> }
> }
> }
>
> As per Andreas suggestion, I am checking the calculated value against
> <maxScaleDenominator> value specified in SLD file and if it goes out, then
> simply returning by ingnoring the rules.
>
> Before adding this code the request hangs up. After adding above code the
> execution completes.
>
> I am not sure wheather the approach is correct or not, and also
> "KMLTransformer.java" is a right place to keep the code.
>
> I am dealing with vector data in Geoserver 2.0.0.
>
> Any idea from anybody would be appreciated.
>
> Regards
> Baskar
>
>
--
View this message in context:
http://old.nabble.com/-jira--Created%3A-%28GEOS-3843%29-KML-output-does-not-respect-scale-dependencies-in-SLD-tp27796644p29785874.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel