[Gvsig_english] SLD grammar syntax
Antonio Falciano
afalciano at yahoo.it
Fri Apr 27 10:50:55 CEST 2012
Il 27/04/2012 10.13, Pablo Cuadrado ha scritto:
> Hi,
> In gvSIG 1.11 works with [field]>=0.5
Hi Pablo,
yes, I can confirm, so this is only a new bug in gvSIG 1.12 devel.
> Antonio, ¿Do you know a reference about this grammar?
About SLD syntax? Unfortunately not, but it's quite similar to SQL.
I suggest only to remember these basic rules:
1) use only the available operators in the right textbox;
2) use "text" instead of 'text' (differently from the Filter syntax);
3) wildcards are not allowed;
4) finally, check always if the expression is valid ...That's all! ;)
Cheers,
Antonio
> Regards.
> --------------------
> Pablo Cuadrado
>
> ------------------------------------------------------------------------
> *De:* Antonio Falciano
> *Para:* gvsig_internacional at listserv.gva.es
> *Enviado:* Viernes 27 de abril de 2012 9:57
> *Asunto:* Re: [Gvsig_english] SLD grammar syntax
>
> Hi all,
> there aren't dark secrets behind... It seems a bug: the parser of
> the Expression filter doesn't accept floating decimal, in fact:
>
> [Field]>= 5 ...works like a charm
>
> [Field]>= 0.5 ...returns a NumberFormatException
>
> From the gvsig.log of gvSIG 1.12 devel (build 1406):
>
> For input string: "[Field]" java.lang.NumberFormatException: For input
> string: "[Field]" sun.misc.FloatingDecimal.readJavaFormatString(Unknown
> Source) java.lang.Double.valueOf(Unknown Source) java.lang.Double.
> (Unknown Source)
> org.gvsig.symbology.fmap.rendering.filter.operations.GreaterThanOrEqualsOperator.evaluate(GreaterThanOrEqualsOperator.java:74)
>
>
> org.gvsig.symbology.fmap.rendering.VectorFilterExpressionLegend.getSymbolByFeature(VectorFilterExpressionLegend.java:178)
>
> com.iver.cit.gvsig.fmap.layers.FLyrVect._draw(FLyrVect.java:448)
> com.iver.cit.gvsig.fmap.layers.FLyrVect.draw(FLyrVect.java:627)
> com.iver.cit.gvsig.fmap.DefaultMapContextDrawer.draw(DefaultMapContextDrawer.java:209)
>
>
> com.iver.cit.gvsig.fmap.DefaultMapContextDrawer.draw(DefaultMapContextDrawer.java:175)
>
> com.iver.cit.gvsig.fmap.MapContext.draw(MapContext.java:1088)
> com.iver.cit.gvsig.fmap.MapControl$PaintingRequest.paint(MapControl.java:1043)
>
>
> com.iver.cit.gvsig.fmap.MapControl$Drawer2$Worker.run(MapControl.java:1234)
> java.lang.Thread.run(Unknown Source)
>
> Cheers,
> Antonio
>
> Il 26/04/2012 22.21, Pablo Cuadrado ha scritto:
> > Hi Benjamin,
> > For me is dark too....but trying it works.
> > With [field]>=0.5 works.... ¿=?
> > In more complex expressions I have a lot of errors and I donŽt locate a
> > good reference about this grammar.
> > Best regards.
> > --------------------
> > Pablo Cuadrado
> >
> > ------------------------------------------------------------------------
> > *De:* Benjamin Ducke <benducke at fastmail.fm <mailto:benducke at fastmail.fm>>
> > *Para:* Users and Developers mailing list
> > <gvsig_internacional at listserv.gva.es
> <mailto:gvsig_internacional at listserv.gva.es>>
> > *Enviado:* Jueves 26 de abril de 2012 17:29
> > *Asunto:* [Gvsig_english] SLD grammar syntax
> >
> > Dear All,
> >
> > could someone shed some light on this eternal dark
> > secret of gvSIG and provide some "SLD grammar" examples
> > that can be used with the "Expression" filter and the
> > advanced labeling?
> >
> > E.g. in the "Expression" filter (Symbology) I try to
> > simply filter out all features for which "Field" has a
> > value equal or greater than "0.5". I enter the following:
> >
> > [Field] >= 0.5
> >
> > And get an "Invalid expression" error.
> >
> > What would be the correct syntax?
> >
> > Thanks,
> >
> > Ben
> >
> > --
> > Benjamin Ducke
> > {*} Geospatial Consultant
> > {*} GIS Developer
> >
> > benducke at fastmail.fm <mailto:benducke at fastmail.fm>
> <mailto:benducke at fastmail.fm <mailto:benducke at fastmail.fm>>
> > _______________________________________________
> > Gvsig_internacional mailing list
> > Gvsig_internacional at listserv.gva.es
> <mailto:Gvsig_internacional at listserv.gva.es>
> > <mailto:Gvsig_internacional at listserv.gva.es
> <mailto:Gvsig_internacional at listserv.gva.es>>
> >
> > To see the archives, edit your preferences or unsubscribe from this
> > mailing list, please access this url:
> >
> > http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
> >
> >
> >
> >
> > _______________________________________________
> > Gvsig_internacional mailing list
> > Gvsig_internacional at listserv.gva.es
> <mailto:Gvsig_internacional at listserv.gva.es>
> >
> > To see the archives, edit your preferences or unsubscribe from this
> mailing list, please access this url:
> >
> > http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
> --
> Antonio Falciano
> http://www.linkedin.com/in/antoniofalciano
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
> <mailto:Gvsig_internacional at listserv.gva.es>
>
> To see the archives, edit your preferences or unsubscribe from this
> mailing list, please access this url:
>
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
>
>
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
>
> To see the archives, edit your preferences or unsubscribe from this mailing list, please access this url:
>
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
--
Antonio Falciano
http://www.linkedin.com/in/antoniofalciano
More information about the Gvsig_internacional
mailing list