Hi,
In an attempt to filter a layer containing contour lines, showing only lines with an elevation divisible by 1000, I tried using:
<ogc:Filter>
<ogc:PropertyIsLike wildCard='*' singleChar='.' escape='!'>
<ogc:PropertyName>elevation</ogc:PropertyName>
<ogc:Literal>*000.0</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
But this approach fails with "org.postgresql.util.PSQLException: ERROR: function upper(numeric) does not exist".
Obviously it is failing because the attribute is numeric and it's trying to do a string conversion on it.
The same Filter actually works with a shapefile as the datasource.
I can write the filter differently, but, I wonder if this is the expected result or not - as the filter encoding spec doesn't mention that the Literal in question must be a string?
Here is the exception:
Caused by: org.postgresql.util.PSQLException: ERROR: function upper(numeric) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Position: 174
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.geotools.jdbc.JDBCFeatureReader.<init>(JDBCFeatureReader.java:156)
at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:556)
Regards,
Miles Jordan
Applications Developer
Australian Antarctic Division
___________________________________________________________________________
Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not the
intended recipient, you are notified that use or dissemination of this communication is
strictly prohibited by Commonwealth law. If you have received this transmission in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and
DELETE the message.
Visit our web site at
http://www.antarctica.gov.au/___________________________________________________________________________
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users