Hi,

Attribute names containing colons are not valid in XML.  Only right solution is 
to rename them to addr_housename or something.  Colons are widely used in OSM 
so it may feel bad. And if you wonder why it is OK to have addr:housename in 
OSM-XML documents, it is because they are not attribute names there, they are 
part of contents of "tag" attribute. Therefore the OSM document is valid XML.


-Jukka Rahkonen-




________________________________
Ákos Maróy wrote:

> Hi,

> I wonder what the proper way is to add a filter into SLD for a PostGIS column 
> that has a colon in the name of the column. For example, from the standard 
> Open Street Map attribute name, the following such columns are generated:

  *   addr:housename
  *   addr:housenumber
  *   addr:interpolation

and in Open Street Map, the attribute name of the form xx:yyy is usual to be 
used to denote a 'sub-attribute' of sorts.

In raw SQL when querying such columns (e.g. via psql), one has to escape the 
name of the column using parenthesis (e.g. SELECT * FROM ... WHERE 
"addr:housename" IS NOT NULL)

when I try to add such a column into an SLD filter expression, I get an 
exception from geoserver, something like:

org.geoserver.platform.ServiceException: The requested Style can not be used 
with this layer.  The style specifies an attribute of addr:housename and the 
layer is: xxxx
    at 
org.geoserver.wms.map.GetMapKvpRequestReader.checkStyle(GetMapKvpRequestReader.java:1130)


I tried escaping with simple parenthesis, but to no avail.

how would one make this work?

Akos


------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to