I’m having trouble in using CQL filter with my OpenLayers + Geoserver app
and I’m needing some help…
Maybe I’m making something wrong about the syntax, but I couldn’t find any
help searching for it…
My problem is: when I use a filter like: field = ‘this_value’ or also filed = ‘thisvalue’,
it works fine, but when I use field = ‘this value’ It doesn’t work!!
I tried the same syntax within the Geoserver’s preview page (with the same
layer) and I got the same problem…
Am I buiilding my queries wrong or is there some bug about this??
I'm having trouble in using CQL filter with my OpenLayers + Geoserver app
and I'm needing some help...
Maybe I'm making something wrong about the syntax, but I couldn't find any
help searching for it...
My problem is: when I use a filter like: field = 'this_value' or also filed = 'thisvalue',
it works fine, but when I use field = 'this value' It doesn't work!!
I tried the same syntax within the Geoserver's preview page (with the same
layer) and I got the same problem..
Am I buiilding my queries wrong or is there some bug about this??
I have just noticed that the example you gave me really works, what makes me more
confused!! Because I tried this STATE_NAME = ‘South Dakota’ in the geoserver preview
page at my localhost and it worked fine… then I tried again with the FeatureType I’ve created
and it didn’t work!
My FeatureType has a PostGis Store and one of it’s column is lito_evolt…
Some possible values for this column are: Vulcan_Mesoz, Terciario and
Zonas de Cisalhamento…
When I tried a filter like:
lito_evolt = ‘Vulcan_Mesoz’
it works…
Even a:
lito_evolt = ‘Vulcan_Mesoz’ or lito_evolt = ‘Terciario’
it works!
But when I try:
lito_evolt = ‘Zonas de Cisalhamento’
t doesn’t work!!
And so on… If I use any field value which contains a white space, it fails…
Is it possible to be some problem with the character encoding of my postgre/postgis
table??
I’m having trouble in using CQL filter with my OpenLayers + Geoserver app
and I’m needing some help…
Maybe I’m making something wrong about the syntax, but I couldn’t find any
help searching for it…
My problem is: when I use a filter like: field = ‘this_value’ or also filed = ‘thisvalue’,
it works fine, but when I use field = ‘this value’ It doesn’t work!!
I tried the same syntax within the Geoserver’s preview page (with the same
layer) and I got the same problem…
Am I buiilding my queries wrong or is there some bug about this??
Ing. Milan Antonovic
Institute of Earth Sciences
University of Applied Sciences of the South Switzerland - SUPSI
Trevano, C.P. 72, CH-6952 Canobbio, SWITZERLAND
Tel: +41(0)58 666 62 13
E-mail: milan.antonovic@anonymised.com
Skype: milan_antonovic
Web: http://www.ist.supsi.ch
Ing. Milan Antonovic
Institute of Earth Sciences
University of Applied Sciences of the South Switzerland - SUPSI
Trevano, C.P. 72, CH-6952 Canobbio, SWITZERLAND
Tel: +41(0)58 666 62 13
E-mail: milan.antonovic@anonymised.com
Skype: milan_antonovic
Web: http://www.ist.supsi.ch
A value called: “Depósitos do Quaternário” didn’t work because
the characters: ó and á… we changed these in the table and then
it worked fine… so, I believe that CQL doesn’t recognize accented
characters like á, é, ó… (that we have in Portuguese and I believe
that English doesn’t have)… Is this right??
Ing. Milan Antonovic
Institute of Earth Sciences
University of Applied Sciences of the South Switzerland - SUPSI
Trevano, C.P. 72, CH-6952 Canobbio, SWITZERLAND
Tel: +41(0)58 666 62 13
E-mail: milan.antonovic@anonymised.com
Skype: milan_antonovic
Web: http://www.ist.supsi.ch
A value called: "Depósitos do Quaternário" didn't work because
the characters: ó and á... we changed these in the table and then
it worked fine... so, I believe that CQL doesn't recognize accented
characters like á, é, ó... (that we have in Portuguese and I believe
that English doesn't have)... Is this right??
Actually the CQL module was created by a spanish developer, but
I'll have a look, I have some tables around with various kinds
of accents.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
A value called: “Depósitos do Quaternário” didn’t work because
the characters: ó and á… we changed these in the table and then
it worked fine… so, I believe that CQL doesn’t recognize accented
characters like á, é, ó… (that we have in Portuguese and I believe
that English doesn’t have)… Is this right??
Actually the CQL module was created by a spanish developer, but
I’ll have a look, I have some tables around with various kinds
of accents.
Cheers
Andrea
–
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
A value called: “Depósitos do Quaternário” didn’t work because
the characters: ó and á… we changed these in the table and then
it worked fine… so, I believe that CQL doesn’t recognize accented
characters like á, é, ó… (that we have in Portuguese and I believe
that English doesn’t have)… Is this right??
Actually the CQL module was created by a spanish developer, but
I’ll have a look, I have some tables around with various kinds
of accents.
Cheers
Andrea
–
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
A value called: "Depósitos do Quaternário" didn't work because
the characters: ó and á... we changed these in the table and then
it worked fine... so, I believe that CQL doesn't recognize accented
characters like á, é, ó... (that we have in Portuguese and I believe
that English doesn't have)... Is this right??
Actually the CQL module was created by a spanish developer, but
I'll have a look, I have some tables around with various kinds
of accents.
So I tried with a shapefile that I have around with lots of
Finnish words that do have various kinds of accents over the
character.
The shapefile worked fine the first time I tried. Then I
imported it into postgis, and found shp2pgsql did not work.
The thing is, the dbf was encoded in ISO-8859-15 and the database
was UTF-8, and the result was that accented chars were not
accepted by PostgreSQL on input.
All I had to do was to add a charset parameter to my import
statement:
After that the import went fine, and my sql queries from the
map preview worked just fine as well. Stuff like:
address = 'PÅLSBÖLEVÄGEN 247'
returned the expected records (note the three decorations
over the A and O and the space in the middle).
So I don't know, maybe you have some charset issue in the
setup of your database?
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.