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 work out the distance between a table of polygons and a table of points.

The table of polygons has different site boundaries, and the point table has points relating to each of the site boundaries.

I need to work out the distance between each point and the site it relates to.

What is the best way to do this? Is this best done with a PostGIS query or is there a way to do it in QGIS (I notice there is distance matrix tool in QGIS but it doesn't support polygons). Ideally I would like a way to do this in QGIS as its something my users do quite regularly.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

I would create a view in the database with the distance calculated.

Then you can open that view in QGIS and get your distances. When the tables changes the view will be updated.

/Nicklas

share|improve this answer

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.