Saturday 24 August 2019

postgis - PostgreSQL : finding all lines intersecting with a polygon


I am totally new in the world of GIS but as a student surveyor I am working on a project using postgreSQL and PostGIS.


I have one database with all the roads of my country (lines), and one database with a lot of area's (polygons). And for every polygon, I need to find all the roads (lines) that intersect with it (contain in partially or fully).


I do know the ST_Intersects function, but is this the best function to use ? right now I am trying to make a loop function where I loop all the roads to see if they intersect, but there must be a quicker way..


If anybody could get me started, that would be great!


Thanks




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...