I am stumped on how to correctly encode a CQL filter for a text attribute for
a GetMap request using the OpenLayers format.
The following CQL Filter works for a GetFeatureInfo request...
http://optiplexa.mtri.org:8086/geoserver/wms?HEIGHT=622&WIDTH=800&LAYERS=mtri%3At_temp_imps_for_geoserver&STYLES=&SRS=EPSG%3A4326&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=-89.616239%2C39.84385%2C-82.814186%2C45.132447&X=613&Y=342&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=mtri%3At_temp_imps_for_geoserver&FEATURE_COUNT=50&layers=mtri%3At_temp_imps_for_geoserver&styles=&srs=EPSG%3A4326
&CQL_FILTER=(practice='ALL PRACTICES')
but the same filter fails to work for a GetMap request in the OpenLayers
format (nothing is returned)
http://optiplexa.mtri.org:8086/geoserver/wms?bbox=-90.81403812808064,41.36778930444964,-82.10740979957625,48.59101185391105&styles=&Format=application/openlayers&request=GetMap&layers=mtri:v_implementation_by_county_contractyear_practice_spatial&width=800&height=622&srs=EPSG:4326
&CQL_FILTER=(practice='ALL PRACTICES')
Here is a snippet of the page that is returned...
// setup tiled layer
tiled = new OpenLayers.Layer.WMS(
"mtri:v_implementation_by_county_contractyear_practice_spatial - Tiled",
"http://optiplexa.mtri.org:8086/geoserver/wms",
{
CQL_FILTER: '(practice='ALL PRACTICES')',
height: '622',
width: '800',
layers:
'mtri:v_implementation_by_county_contractyear_practice_spatial',
styles: '',
srs: 'EPSG:4326',
format: 'image/png',
tiled: 'true',
tilesOrigin : "-90.81403812808064,41.36778930444964"
},
{buffer: 0}
);
Am I encoding the text string incorrectly in the URL, or is this a bug in
the OpenLayers output format?
- Tyler
--
View this message in context: http://www.nabble.com/problem-using-OpenLayers-format-with-CQL-filter-on-a-text-attribute-tp14887170p14887170.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
You will probably get a more authoritative answer, but did you try
ALL%20PRACTICES ?
On Jan 16, 2008 7:02 PM, Tyler Erickson <tyler.erickson@anonymised.com> wrote:
I am stumped on how to correctly encode a CQL filter for a text attribute for
a GetMap request using the OpenLayers format.
The following CQL Filter works for a GetFeatureInfo request...
http://optiplexa.mtri.org:8086/geoserver/wms?HEIGHT=622&WIDTH=800&LAYERS=mtri%3At_temp_imps_for_geoserver&STYLES=&SRS=EPSG%3A4326&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=-89.616239%2C39.84385%2C-82.814186%2C45.132447&X=613&Y=342&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=mtri%3At_temp_imps_for_geoserver&FEATURE_COUNT=50&layers=mtri%3At_temp_imps_for_geoserver&styles=&srs=EPSG%3A4326
&CQL_FILTER=(practice='ALL PRACTICES')
but the same filter fails to work for a GetMap request in the OpenLayers
format (nothing is returned)
http://optiplexa.mtri.org:8086/geoserver/wms?bbox=-90.81403812808064,41.36778930444964,-82.10740979957625,48.59101185391105&styles=&Format=application/openlayers&request=GetMap&layers=mtri:v_implementation_by_county_contractyear_practice_spatial&width=800&height=622&srs=EPSG:4326
&CQL_FILTER=(practice='ALL PRACTICES')
Here is a snippet of the page that is returned...
// setup tiled layer
tiled = new OpenLayers.Layer.WMS(
"mtri:v_implementation_by_county_contractyear_practice_spatial - Tiled",
"http://optiplexa.mtri.org:8086/geoserver/wms",
{
CQL_FILTER: '(practice='ALL PRACTICES')',
height: '622',
width: '800',
layers:
'mtri:v_implementation_by_county_contractyear_practice_spatial',
styles: '',
srs: 'EPSG:4326',
format: 'image/png',
tiled: 'true',
tilesOrigin : "-90.81403812808064,41.36778930444964"
},
{buffer: 0}
);
Am I encoding the text string incorrectly in the URL, or is this a bug in
the OpenLayers output format?
- Tyler
--
View this message in context: http://www.nabble.com/problem-using-OpenLayers-format-with-CQL-filter-on-a-text-attribute-tp14887170p14887170.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Yes, I tried that too. My issue doesn't seem to be specific to strings with the space character, since the following filter has the same problem...
This filter in the URL
&CQL_FILTER=(practice='528A')
results in this text in the openlayers page
CQL_FILTER: '(practice='528A')',
Jason Pickering wrote:
You will probably get a more authoritative answer, but did you try
ALL%20PRACTICES ?
On Jan 16, 2008 7:02 PM, Tyler Erickson <tyler.erickson@anonymised.com> wrote:
I am stumped on how to correctly encode a CQL filter for a text attribute for
a GetMap request using the OpenLayers format.
The following CQL Filter works for a GetFeatureInfo request...
http://optiplexa.mtri.org:8086/geoserver/wms?HEIGHT=622&WIDTH=800&LAYERS=mtri%3At_temp_imps_for_geoserver&STYLES=&SRS=EPSG%3A4326&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=-89.616239%2C39.84385%2C-82.814186%2C45.132447&X=613&Y=342&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=mtri%3At_temp_imps_for_geoserver&FEATURE_COUNT=50&layers=mtri%3At_temp_imps_for_geoserver&styles=&srs=EPSG%3A4326
&CQL_FILTER=(practice='ALL PRACTICES')
but the same filter fails to work for a GetMap request in the OpenLayers
format (nothing is returned)
http://optiplexa.mtri.org:8086/geoserver/wms?bbox=-90.81403812808064,41.36778930444964,-82.10740979957625,48.59101185391105&styles=&Format=application/openlayers&request=GetMap&layers=mtri:v_implementation_by_county_contractyear_practice_spatial&width=800&height=622&srs=EPSG:4326
&CQL_FILTER=(practice='ALL PRACTICES')
Here is a snippet of the page that is returned...
// setup tiled layer
tiled = new OpenLayers.Layer.WMS(
"mtri:v_implementation_by_county_contractyear_practice_spatial - Tiled",
"http://optiplexa.mtri.org:8086/geoserver/wms",
{
CQL_FILTER: '(practice='ALL PRACTICES')',
height: '622',
width: '800',
layers:
'mtri:v_implementation_by_county_contractyear_practice_spatial',
styles: '',
srs: 'EPSG:4326',
format: 'image/png',
tiled: 'true',
tilesOrigin : "-90.81403812808064,41.36778930444964"
},
{buffer: 0}
);
Am I encoding the text string incorrectly in the URL, or is this a bug in
the OpenLayers output format?
- Tyler
--
View this message in context: http://www.nabble.com/problem-using-OpenLayers-format-with-CQL-filter-on-a-text-attribute-tp14887170p14887170.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Tyler A. Erickson, Ph.D.
Research Scientist
Michigan Tech Research Institute
3600 Green Court, Suite 100
Ann Arbor, MI 48105
tyler.erickson@anonymised.com
www.mtri.org
www.michiganview.org
Hi Tyler,
I definitley think this is a bug in the openlayers output format. It
seems to pop up with any text attribute. Can you open a jira for this?
Tyler Erickson wrote:
Yes, I tried that too. My issue doesn't seem to be specific to strings
with the space character, since the following filter has the same problem...
This filter in the URL
&CQL_FILTER=(practice='528A')
results in this text in the openlayers page
CQL_FILTER: '(practice='528A')',
Jason Pickering wrote:
You will probably get a more authoritative answer, but did you try
ALL%20PRACTICES ?
On Jan 16, 2008 7:02 PM, Tyler Erickson <tyler.erickson@anonymised.com> wrote:
I am stumped on how to correctly encode a CQL filter for a text attribute for
a GetMap request using the OpenLayers format.
The following CQL Filter works for a GetFeatureInfo request...
http://optiplexa.mtri.org:8086/geoserver/wms?HEIGHT=622&WIDTH=800&LAYERS=mtri%3At_temp_imps_for_geoserver&STYLES=&SRS=EPSG%3A4326&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=-89.616239%2C39.84385%2C-82.814186%2C45.132447&X=613&Y=342&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=mtri%3At_temp_imps_for_geoserver&FEATURE_COUNT=50&layers=mtri%3At_temp_imps_for_geoserver&styles=&srs=EPSG%3A4326
&CQL_FILTER=(practice='ALL PRACTICES')
but the same filter fails to work for a GetMap request in the OpenLayers
format (nothing is returned)
http://optiplexa.mtri.org:8086/geoserver/wms?bbox=-90.81403812808064,41.36778930444964,-82.10740979957625,48.59101185391105&styles=&Format=application/openlayers&request=GetMap&layers=mtri:v_implementation_by_county_contractyear_practice_spatial&width=800&height=622&srs=EPSG:4326
&CQL_FILTER=(practice='ALL PRACTICES')
Here is a snippet of the page that is returned...
// setup tiled layer
tiled = new OpenLayers.Layer.WMS(
"mtri:v_implementation_by_county_contractyear_practice_spatial - Tiled",
"http://optiplexa.mtri.org:8086/geoserver/wms",
{
CQL_FILTER: '(practice='ALL PRACTICES')',
height: '622',
width: '800',
layers:
'mtri:v_implementation_by_county_contractyear_practice_spatial',
styles: '',
srs: 'EPSG:4326',
format: 'image/png',
tiled: 'true',
tilesOrigin : "-90.81403812808064,41.36778930444964"
},
{buffer: 0}
);
Am I encoding the text string incorrectly in the URL, or is this a bug in
the OpenLayers output format?
- Tyler
--
View this message in context: http://www.nabble.com/problem-using-OpenLayers-format-with-CQL-filter-on-a-text-attribute-tp14887170p14887170.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
On Wednesday 16 January 2008, Tyler Erickson wrote:
Yes, I tried that too. My issue doesn't seem to be specific to strings
with the space character, since the following filter has the same
problem...
This filter in the URL
&CQL_FILTER=(practice='528A')
results in this text in the openlayers page
CQL_FILTER: '(practice='528A')',
Hi boys, today I add the following unit test in CQL
Filter filter = CQL.toFilter("practice='ALL PRACTICES'");
It produce the following filter
[ practice = ALL PRACTICES ]
Then, the CQL expression is OK and the CQL builder makes a correct filter
cheers
--
Mauricio Pazos
www.axios.es
tel-:+34 94 441 63 84
Here is the JIRA…
http://jira.codehaus.org/browse/GEOS-1683
Justin Deoliveira wrote:
···
--
Tyler A. Erickson, Ph.D.
Research Scientist
Michigan Tech Research Institute
3600 Green Court, Suite 100
Ann Arbor, MI 48105
[tyler.erickson@anonymised.com](mailto:tyler.erickson@anonymised.com)
[www.mtri.org](http://www.mtri.org)
[www.michiganview.org](http://www.michiganview.org)