Double quote (") around attribute name should work?
On Friday, 10 March 2017, 2:27, Jody Garnett <jody.garn...@gmail.com> wrote:
One final thing to check Billy - the test cases.
-
https://github.com/geotools/geotools/blob/master/modules/library/cql/src/test/java/org/geotools/filter/text/cql2/CQLAttributeNameTest.java
Sigh - I thought [property.Some Attribute] would work.
--Jody Garnett
On 9 March 2017 at 11:10, Billy Newman <newman...@gmail.com> wrote:
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
/*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> wrote:
I am trying to use a Dynamic symbolizer (http://docs.geoserver.org/sta
ble/en/user/styling/sld/extens ions/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.IllegalArgumentExcep tion: Invalid cql expression '"property.Some
Attribute"' at org.geotools.renderer.style.Ex
pressionExtractor.splitCqlExpr essions(ExpressionExtractor. java:122) at
org.geotools.renderer.style.Ex pressionExtractor.extractCqlEx
pressions(ExpressionExtractor. java:162) at org.geotools.styling.StyleAttr
ibuteExtractor.visitCqlExpress ion(StyleAttributeExtractor. java:392) at
org.geotools.styling.StyleAttr ibuteExtractor.visit(StyleAttr
ibuteExtractor.java:406) at org.geotools.styling.ExternalG
raphicImpl.accept(ExternalGrap hicImpl.java:142) at
org.geotools.styling.StyleAttr ibuteExtractor.visit(StyleAttr
ibuteExtractor.java:342) at org.geotools.styling.GraphicIm
pl.accept(GraphicImpl.java: 349) at org.geotools.styling.StyleAttr
ibuteExtractor.visit(StyleAttr ibuteExtractor.java:232) at
org.geotools.styling.PointSymb olizerImpl.accept(PointSymboli zerImpl.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.commo
ns.CompilerUtil.parseExpressio n(CompilerUtil.java:175) at
org.geotools.filter.text.ecql. ECQL.toExpression(ECQL.java:15 7) at
org.geotools.filter.text.ecql. ECQL.toExpression(ECQL.java:13 6) at
org.geotools.renderer.style.Ex pressionExtractor.splitCqlExpr
essions(ExpressionExtractor. java:119) ... 105 more
Looking here:
http://docs.geoserver.org/stab le/en/user/filter/ecql_referen ce.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
______________________________ _________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourc eforge.net
https://lists.sourceforge.net/ lists/listinfo/geotools-gt2-us ers
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------
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