[Gvsig_english] SLD grammar syntax

Antonio Falciano afalciano at yahoo.it
Fri Apr 27 11:31:50 CEST 2012


Archaic solution that works fine in gvSIG 1.12 devel too! ;) Although,
at least one among numerator and denominator has to be double.
So, instead of

[field]>=0.5

we have to type

[field]>=(1.0/2)

or

[field]>=(1/2.0)

Cheers,
Antonio

Il 27/04/2012 11.12, Francisco José Peñarrubia ha scritto:
> Brilliant! :-)
>
> El 27/04/2012 11:11, Juan Lucas Dominguez Rubio escribió:
>> Hello. Instead of the boring:
>> [Field] >= 3.14159
>> you can use Ancient Egypt's approximate fraction:
>> [Field] >= (256 / 81)
>>
>> Hope it helps ;-)
>> Juan Lucas Domínguez Rubio
>> ---
>> Prodevelop SL, Valencia (España)
>> Tlf.: 96.351.06.12 -- Fax: 96.351.09.68
>> http://www.prodevelop.es <http://www.prodevelop.es/>
>> ---
>>
>> ------------------------------------------------------------------------
>> *De:* gvsig_internacional-bounces at listserv.gva.es en nombre de Antonio
>> Falciano
>> *Enviado el:* vie 27/04/2012 10:50
>> *Para:* gvsig_internacional at listserv.gva.es
>> *Asunto:* Re: [Gvsig_english] SLD grammar syntax
>>
>> 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%20%3Cmailto: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
>> _______________________________________________
>> 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
>>
>> ------------------------------------------------------------------------
>> *CLÁUSULA DE PROTECCIÓN DE DATOS*
>> Este mensaje se dirige exclusivamente a su destinatario y puede
>> contener información privilegiada o confidencial. Si ha recibido este
>> mensaje por error, le rogamos que nos lo comunique inmediatamente por
>> esta misma vía y proceda a su destrucción.
>> De acuerdo con la nueva ley Ley de Servicios de la Sociedad de la
>> Información y Comercio Electrónico aprobada por el parlamento español
>> y de la vigente Ley Orgánica 15/1999 de Protección de Datos española,
>> le comunicamos que su dirección de Correo electrónico forma parte de
>> un fichero automatizado, teniendo usted derecho de oposición, acceso,
>> rectificación y cancelación de sus datos.
>>
>> *DATA PROTECTION CLAUSE*
>> This message is meant for its addressee only and may contain
>> privileged or confidential information. If you have received this
>> message by mistake please let us know immediately by e-mail prior to
>> destroying it.
>> In compliance with the new Information and Electronic Commerce Society
>> Services Law recently approved by the Spanish Parliament and with
>> Organic Law 15/1999 currently in force, your e-mail address has been
>> included in our computerised records in respect of which you may
>> exercise your right to oppose, access, amend and/or cancel your
>> personal data.
>> <#>
>>
>>
>> _______________________________________________
>> 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
>
> --
> Fran Peñarrubia
> Scolab
> www.scolab.es
>
> Asociación gvSIG
> www.gvsig.com
>
>
>
> _______________________________________________
> 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