Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a set of x-coord and y-coord coordinates in separate columns in a PostGIS table. I also have a separate geometry column, named the_geom, of type Point. I've written an Intersects filter to filter points within a polygon. However, the WFS request that uses the filter returns nothing, even though I'm sure there's data within the selected polygon.

This brings me to the question: Should I use the x and y coordinates in an interiorPoint filter instead of the Intersects filter? I've never used an interiorPoint filter before. I've also gone through GeoServer manual for more details on the filter, but there appears to be none. So, an example on how to use the interiorPoint filter will be appreciated.

UPDATE: I figured this out:

  1. include srsName: "EPSG:4326" in the WFS protocol definition.
  2. transform the selection (polygon geometry) to the projection used by the WFS layer, i.e., event.feature.geometry.transform(map.getProjectionObject(), new OpenLayers.Projection("EPSG:4326")).

These two actions sorted out my issue.

share|improve this question

I have a simillar question. I would appreciate if you answer this. I have a table world_country in postgis db, having two columns "country_name" and "the_geom". "the_geom" is a shape file, special index column. All I want is how to fire a query from openlayer with the help of wfs/vector/other data layer, select the_geom from world_country where country_name = 'USA'


share|improve this answer
Here you should post answers to the main questions, not pose other questions. If you have another question, even if similar, you should state it separately – Andrea Aime Jul 29 '12 at 9:29

Your Answer


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.