1

I'm very new to QGIS. I have a shape file of census blocks and want to use the data to plot points within each boundary using Google Maps api.

I figure the best way to do this is to find the extreme north, south, east and west lat/long for each polygon (so later I can plot points within those boundaries).

I'm wondering:

  • Is there a way to convert the poloygons into lat/lon coordinates and then find the 4 extreme boundary points?
  • Is there a better way to go about plotting points in boundaries that I'm missing?
6
  • Is the goal a random point within each polygon, or something like the centroid?
    – Erica
    Commented Sep 11, 2014 at 17:28
  • 1
    Terms that might help you, The "4 extreme boundary points" is also known as the 'bounding box'. When checking for points in polygons, the points out side of the polygons' bounding box should be discarded, (this is fast) and the remaining points are then tested against the polygon shape. This normally is a low level part of the library you are using. I'll have to leave more detailed help to people that know how to use google maps API in qgis Commented Sep 11, 2014 at 17:55
  • Yes, the goal is to place a random point within the boudaries. I am familiar with Google maps API, but not very familiar at all with qgis. I guess I am trying to find out how to find the bounding box, or at least all the coordinates of a polygon using qgis, if it's possible Commented Sep 11, 2014 at 22:18
  • Do you want a way to programmatically get the bounding box or do you want to know how to get it using the GUI?
    – underdark
    Commented Sep 12, 2014 at 10:54
  • If you want a code solution, it's here: gis.stackexchange.com/questions/79248/…
    – underdark
    Commented Sep 12, 2014 at 10:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.