Closest distance between 2 features

CorsabrinCorsabrin Global Mapper UserPosts: 29
Hi all

I am trying to find the spatial error between two sets of point feature data (one truth, one measured). I have 500 number of points in each set.

To explain further, for example in the 'measured' set of data, one particular point may be slightly offset from the point that is represented in the truth data. So the spatial error I'm referring to is the spatial distance between two supposedly same points. I need to do this for the entire 500 points.

May I know how can I do that in GM? Using GM 16.1

Regards
Corse

Best Answer

  • MykleMykle Global Mapper User Posts: 446
    Answer ✓
    Corse,

    I'd do a lot of the work in a spreadsheet, not immediately knowing how to get it done in Global Mapper.

    Unless your two data sets are in a spreadsheet-compatible format, like CSV, you would need to export the data from GM. We assume that each point has a label that is included with each point, and an attribute for each point that identifies truth or measured (or add it in the spreadsheet).

    Both data sets can be imported into the spreadsheet, if they are not already in one file. We want all of the data to be included on one spreadsheet.

    Sort on the label column, and the attribute (truth/measured).

    Copy-and-paste the results into a new CSV file (the file will be tab-delimited if done in Excel, for example).

    Import into GM as line data, on the tab for "Text File Import Options" set the "Break Line/Area Features on Change in Field" to the column number for your labels. You should wind up with a set of individual lines between each pair of points (truth/measured).

    In the Overlay Control Center, turn off all layers except your new layer with lines. (you may not need to do this, but it makes the explanation simple)

    Using the digitizer tool, select all of your lines (draw a box around them),
    then right-click and select "Attribute/Style Functions",
    then select "Add/Update the Measure Attributes of Selected Feature(s)".

    Select one of your lines, right-click and choose Edit (or double-click on a line), and note the attributes that have been added that include length and bearing.

    Use | Search | Search by Attributes, Name, and Description
    to display your lines and attributes.

    In the Search window, you can use the "Select All" button at the bottom, then right-click on the marked data and select "Copy the Selected Results to the Clipboard as Text" and paste the content into a spreadsheet. The results may not be parsed into separate columns (the first column contains the entire data record). In Excel you can select the first column, then use the Text to Columns function to parse on commas.

    The lines and attributes can be exported to a file for further work. Note that since these are now lines and not points, CSV is not a suitable format. Simple ASCII Text File will work, but there may be another text file format that may work better for you. The simple file will have a set of records for each of your lines, while it may be easier to work with a format with one record for each line and attributes that are comma- or tab-delimited. (the search window method may be the easiest way to extract the data for further work)

    Many picky details have been omitted in this long-enough description, so feel free to ask for more detail.

    As usual, Global Mapper is one tool that you have available, along with other programs (spreadsheet). Use them together, and use the strengths of each program to work with your data.

    Mykle
Sign In or Register to comment.