Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I need to filter an OpenLayers layer using a CQL filter to an specific Bounding Box. Is it possible?

Something like this isn't working:

igh > 5000 AND bbox(igh,20786691,22051867,-305577260,-306370356)

Thanks!

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

Which mapserver are you running/requesting maps from?

According to Geoserver CQL Tutorial:

CQL provides a full set of geometric filter capabilities. Say, for example, you want to display only the states that do cross the (-90,40,-60,45) bounding box. The filter will be BBOX(the_geom, -90, 40, -60, 45)

share|improve this answer
    
Thanks for your response underdark. It's GeoServer 2.0.2 –  Fran Verona Jan 30 '11 at 15:48
    
Isn't 'igh' some random attribute and not the geometry? –  underdark Jan 30 '11 at 16:46
    
'igh' is just a variable associated to the maps –  Fran Verona Jan 30 '11 at 16:51
1  
Do you use PostGIS as a data source for that layer? Does the geometry column have a different name there? –  underdark Jan 31 '11 at 12:52
1  
I asked to my technical OGC this morning, and he told me that 'the_geom' is called 'location'. Using it instead of 'the_geom' now works. Thanks underdark! Problem solved –  Fran Verona Feb 2 '11 at 19:13
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.