Making sure centroid falls inside the polygon?

RobertRRobertR GlobalMapper Fan!Posts: 284Trusted User
edited October 2013 in Vector Data
Ok, I know in some cases, this is not working in GM because geometrically, the centroid would be outside (like in the eg: for the red polygon, the centriod will not be located on the polygon);

overlap.PNG

Is it possible to somehow make this happen? If I have many cases like this, it would help a lot if the created point would overlap the polygon. If not, the ability to copy features from point to area will not pass the correct value to the correct feature.

My workload is to create points so I can copy attr from another area feature, and then to send those values back to the initial area feature through the point feature.

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited October 2013
    Robert,

    Are those points from the option to create points at the centroid of selected areas? That option was updated a while back so if the centroid isn't in the area then an interior point is found that should be guaranteed to be in the area (it uses the center point of the longest segment along the vertical or horizontal intersector after clipping that to the area). I can't recall when that was smartened up to be more than just the centroid though.

    However is the issue actually that the point is in an island/hole in the area? It does look like that isn't checked for quite yet but I can make it be.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • RobertRRobertR GlobalMapper Fan! Posts: 284Trusted User
    edited October 2013
    Hello Mike,

    Yes, the points are created with the "create points at the centroid of selected areas" option. I use this option almost every day and I always get this type of problem.

    I should receive the latest v15 release next week so I can test it then again. But I am quite sure that it will be the same. I guess the thing with the island could be an issue indeed. Unfortunately, in the case mentioned quite at the top, it doesn't work well.

    Also I noticed one more thing (not sure if I should put this in another topic), when I load a shape with area feature with count ~2,400,000 and I make a search in the attribute table, If I have ~2,000,000 results and I try to click "select all" and then "edit"..it does not work. It updates 100 values and that's it. Furthermore, the areas selected do not appear as selected in the main window. I think it has something to do with the large number of values.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited October 2013
    Robert,

    The latest v15 installer at Global Mapper Downloads will now make sure the centroids are in the area and not inside any of its islands, so you will always get something in a covered location.

    I'll look at the other issue as that doesn't sound right.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited October 2013
    Robert,

    If you re-do your search after large edits are the updates displayed? There is a performance thing in there so the search isn't re-done automatically every time you change feature labels or attributes. You have to press New Search to refresh the actual search results.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
Sign In or Register to comment.