Detecting and deleting duplicate areas
Hunter Geophysics
Global Mapper UserTrusted User
in Vector Data
Hello.
As per the attached screenshot, I have created two points (one at either end) of 158 rectangular areas. As shown in the control centre, though, there are only 312 points.
As there are 158 areas, and two points per area, there should be (158*2=316) 316 points.
As you can also seen in the screenshot, though, every area that is visible has the two points.
So I suspect there two of the areas have been duplicated somehow.
Is there a way of easily detecting which areas have been duplicated, and then deleting them?
(I'm still on GM v16.2, by the way... I understand the solution may require an upgrade.)
Thanks in advance.
As per the attached screenshot, I have created two points (one at either end) of 158 rectangular areas. As shown in the control centre, though, there are only 312 points.
As there are 158 areas, and two points per area, there should be (158*2=316) 316 points.
As you can also seen in the screenshot, though, every area that is visible has the two points.
So I suspect there two of the areas have been duplicated somehow.
Is there a way of easily detecting which areas have been duplicated, and then deleting them?
(I'm still on GM v16.2, by the way... I understand the solution may require an upgrade.)
Thanks in advance.
David
Answers
-
Hello again David,There is a "find features with duplicate attributes" function under the Search menu. If any attributes that can be automatically created by GM for your rectangles (like area or perimeter length or coordinates), or ones you could think up and add (rotation angle?), were unique; you could possibly use that function to find your duplicates.Hope that works.Best regards,Mark
-
Thanks, Mark. How would I get GM to automatically create such attributes? Or would they be created when the areas is created?(the areas I have now don't seem to have any attributes...)
-
Hello David,I created half a dozen random rectangles, then used copy and paste to duplicate two of them. I was then able to use this method to find the duplicates:Select ALL of the rectangles (by whatever way works best for you), right click, and go to Advanced Feature Creation. From that menu choose to "Create point at the centroid of each area".The points will be selected when created, so move them to a seperate layer for easy selection and later disposal. (Right click, edit, etc.)Select ALL of the new centroid points (by whatever way works best for you), right click, and go to Search. From that menu choose "Find all points within ??? meters..." Put in a very small distance, and GM should find the duplicate centroids and highlight them with blue circles. These are also the rectangles that are duplicates. (First you will get an option to save the duplicates as a CSV file, just cancel that and you will see the duplicate centroids circled in blue. Escape unselects the duplicates.)That should work for you. If you have problems, let me know.Once again, cool and fascinating surveying/geophysics niche !Mark
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website