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

This question already has an answer here:

I'm attempting to measure the distance of a series of points from a smaller number of polygons. As a first step, I've changed the polygons into points along their border, via the

Vector> Geometry Tools> Extract Nodes 

command. This gives me the following result, after I've manually deleted irrelevant borders.


It's now my intention to export these points' coordinates into R to do some rudimentary neighbor and distance calculations. But when I open the attribute table, all the points representing the borders of the separate regions share a single geographic coordinate (which appears to approximate the polygon's centroid, but that's a guess). It's like the following:


Is there a different way to convert a polygon's borders to points, and recover the points' coordinates themselves?


share|improve this question

marked as duplicate by Fezter, whuber Apr 21 '13 at 1:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Coordinates in the attribute table do not get updated automatically when the geometry of the feature changes. You need to update them manually:

  • Enable editing of the points layer
  • Open the attribute table
  • Open the field calculator
  • Update the INTPTLON and INTPTLAT fields using the expressions "$x" and "$y" respectively (they're in the Geometry group).

You may also be interested in the 'Hub Distance' tool in the mmqgis plugin:

share|improve this answer
brilliant, this worked perfectly. thanks! I had separately looked at the Hub Distance command, but (to my superficial understanding) it looked as if that measures distance between a point and a polygon's centroid, where I need the distance between a polygon and the closest border of a polygon. Is my understanding of this function faulty? – tomw Apr 21 '13 at 0:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.