Jody,
Thanks! And yeah bummer :(
Bigger questions.
1. Should/Could ECQL support white spaces in attribute names?
2. Even if ECQL could support this does it make sense in GeoServer to have an
attribute of a layer/featuretype with a space in the name? IE will a space in
an attribute name cause problems in other areas?
-Billy
> On Mar 9, 2017, at 11:53 AM, Jody Garnett <jody.garn...@gmail.com> wrote:
>
> I think you may need to quote it in square brackets, check the grammer:
> https://github.com/geotools/geotools/blob/master/modules/library/cql/ECQL.md
> <https://github.com/geotools/geotools/blob/master/modules/library/cql/ECQL.md>
>
> /*The following section is intended to give context for identifier and
> namespaces. It assumes that the default namespace is specified in the
> query request and does not allow any overrides of the namepace */
> <identifier> ::=
> <identifier start [ { <colon> | <identifier part> }... ]
> <identifier start> ::= <simple Latin letter>
> <identifier part> ::= <simple Latin letter> | <digit>
> <attribute name> ::= <simple attribute name> | <compound attribute name>
> <simple attribute name> ::= <identifier>
> <compound attribute name> ::= <identifier><period>
> [{<identifier><period>}...]
> <simple attribute name>
> Does not look like it supports whitepace :(
> --
> Jody Garnett
>
> On 9 March 2017 at 10:00, Billy Newman <newman...@gmail.com
> <mailto:newman...@gmail.com>> wrote:
> I am trying to use a Dynamic symbolizer
> (http://docs.geoserver.org/stable/en/user/styling/sld/extensions/pointsymbols.html#dynamic-symbolizers
>
> <http://docs.geoserver.org/stable/en/user/styling/sld/extensions/pointsymbols.html#dynamic-symbolizers>)
> with the following CQL:
>
> ${"property.Some Attribute"}
>
> The important part is that the attribute has a space in it.
>
> When I do this I get the following exception from geoserver:
>
> java.lang.IllegalArgumentException: Invalid cql expression
> '"property.Some Attribute"'
> at
> org.geotools.renderer.style.ExpressionExtractor.splitCqlExpressions(ExpressionExtractor.java:122)
> at
> org.geotools.renderer.style.ExpressionExtractor.extractCqlExpressions(ExpressionExtractor.java:162)
> at
> org.geotools.styling.StyleAttributeExtractor.visitCqlExpression(StyleAttributeExtractor.java:392)
> at
> org.geotools.styling.StyleAttributeExtractor.visit(StyleAttributeExtractor.java:406)
> at
> org.geotools.styling.ExternalGraphicImpl.accept(ExternalGraphicImpl.java:142)
> at
> org.geotools.styling.StyleAttributeExtractor.visit(StyleAttributeExtractor.java:342)
> at org.geotools.styling.GraphicImpl.accept(GraphicImpl.java:349)
> at
> org.geotools.styling.StyleAttributeExtractor.visit(StyleAttributeExtractor.java:232)
> at
> org.geotools.styling.PointSymbolizerImpl.accept(PointSymbolizerImpl.java:93)
>
> ...
>
> Caused by: org.geotools.filter.text.cql2.CQLException: Encountered "\""
> at line 1, column 1.
> Was expecting one of:
> <STRING_LITERAL> ...
> "true" ...
> "false" ...
> "point" ...
> "linestring" ...
> "polygon" ...
> "multipoint" ...
> "multilinestring" ...
> "multipolygon" ...
> "geometrycollection" ...
> "envelope" ...
> "(" ...
> "[" ...
> "-" ...
> <INTEGER_LITERAL> ...
> <FLOATING_LITERAL> ...
> <DATE> ...
> <DATE_TIME> ...
> <IDENTIFIER> ...
> Parsing : "property.Some Attribute".
> at
> org.geotools.filter.text.ecql.ECQLCompiler.compileExpression(ECQLCompiler.java:117)
> at
> org.geotools.filter.text.commons.CompilerUtil.parseExpression(CompilerUtil.java:175)
> at org.geotools.filter.text.ecql.ECQL.toExpression(ECQL.java:157)
> at org.geotools.filter.text.ecql.ECQL.toExpression(ECQL.java:136)
> at
> org.geotools.renderer.style.ExpressionExtractor.splitCqlExpressions(ExpressionExtractor.java:119)
> ... 105 more
>
> Looking here:
>
> http://docs.geoserver.org/stable/en/user/filter/ecql_reference.html#ecql-attr
> <http://docs.geoserver.org/stable/en/user/filter/ecql_reference.html#ecql-attr>
>
> It states:
> Attribute names quoted with double-quotes may be any sequence of characters.
> Does that include spaces?
>
> Thanks.
>
>
>
> ------------------------------------------------------------------------------
> Announcing the Oxford Dictionaries API! The API offers world-renowned
> dictionary content that is easy and intuitive to access. Sign up for an
> account today to start using our lexical data to power your apps and
> projects. Get started today and enter our developer competition.
> http://sdm.link/oxford <http://sdm.link/oxford>
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> <mailto:GeoTools-GT2-Users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> <https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users>
>
>
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users