Saturday, 26 September 2015

postgis - Querying points inside and outside of polygons?


In PostGIS I have two tables:


Table that contains polygons:


table a.provinces


gid | geom | name |
------------------------------
1 | 010604 ... | Champagne |

Table that contains points:


table a.stations

gid | geom | province_short |
---------------------------------
1 | 0132 ... | ch |


They are not connected with foreign key!


I would like to get:



  1. Only points that are inside of the polygon

  2. Only points that are outside of the polygon


SRID: 3857


Something like this: enter image description here


Can it be done just like this or I have to modify database?





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...