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.

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.

Image

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:

Image2

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

Thanks

share|improve this question
add comment

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.

1 Answer

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: http://michaelminn.com/linux/mmqgis/

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
add comment

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