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 shapefile with 250 points. Each point has a region attribute. In another shapefile I have all the possible regions with their names (it is polyline geometry).

Unfortunately the coordinates of the points are sometimes wrong.

I would like to query which points don't lie in the region specified by their region attribute.

share|improve this question
Polylines don't represent regions, can you convert them to polygons? Also what GIS software are you using? – blah238 Sep 5 '12 at 10:35

Are you working with ArcGIS? You could do a join of the 2 layers, then see which points dont have a coresponding region.

Another way would be to simply do an overlay of points over regions and again see which points are unchanged.

Oh, missed the part where you had polylines. You should convert these to polygons first!

share|improve this answer

if you have a point layer with region column and polygonal region layer, in qgis you can use Vector > Geoprocessing Tools > Union to merge point data and polygonal data then use SPIT tool to move your new merged file to postgis and you can do what you want.

enter image description here

if you want delete point which isnt in your region, you can use:

DELETE FROM point_poly_merged
       WHERE region <> pre_defined_region;

i hope it helps you....

share|improve this answer

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.