GPSFileDepot Forums

General Category => Map Making Support => Topic started by: babj615 on October 22, 2013, 03:24:57 PM

Title: Comparing Shape Files
Post by: babj615 on October 22, 2013, 03:24:57 PM
Anyone here have an effective method of comparing two shape files for the same area to filter out duplicate data?

Purpose: After using OSM shape file data to create a map, and editing out unwanted data or correcting inaccurate data, one can not simply import a newer shape file with updated information without reintroducing previous errors and omissions. I wish to compare two shape files and determine what has been added to or changed in the new file and discard the remaining older data.

???
Title: Re: Comparing Shape Files
Post by: Seldom on October 22, 2013, 09:19:04 PM
If you have the patience you can probably do what you want using postgis and postgresql, but don't ask me how.
Title: Re: Comparing Shape Files
Post by: Boyd on October 23, 2013, 06:57:32 AM
There's a GlobalMapper script command to remove duplicates.
Title: Re: Comparing Shape Files
Post by: babj615 on October 24, 2013, 08:23:25 AM
I have been researching the scripting features of GlobalMapper, but I am unable to find any complete documentation that explains how to write the scripts. GM has a general reference page that describes some (but not all) scripting commands but does not provide proper usage information.

SO far I can see I will need to use the  EDIT_VECTOR script command with DELETE_DUPLICATES=YES, but I am unable to determine anything beyond that.

Perhaps my total lack of experience with scripting is holding me back here?
Title: Re: Comparing Shape Files
Post by: Boyd on October 24, 2013, 09:33:28 AM
I find GM scripts very useful, but they are rather limited IMO. For any "serious" processing, I export my data as a shapefile, then import the .dbf into FileMaker Pro, which is a powerful relational database that I have a lot of experience with.

I am still on GM 12 and I think they have introduced some newer functions recently. This is the reference for GM 12 scripts. There are similar pages for newer versions, but it sounds like you've already found these. They have generally provided me with all I need to know to write my scripts. http://www.globalmapper.com/helpv12/ScriptReference.html

You can visit their support forum for more info: http://www.globalmapperforum.com/forums/gm-script-language/
Title: Re: Comparing Shape Files
Post by: babj615 on October 24, 2013, 04:56:07 PM
Thank you Boyd! I need to set some time aside to experiement with the scripting function until I learn how to do exactly what I need.

My current work around is to import the first shape file, assign a typ style (trail, for example), then import the newer shape file and assign a custom typ style I have titled 'New Track'. The 'Trails' are small dashed red lines, while the 'New Track' style I created is a much wider black line that looks like RR tracks. The two style contrast well, and I can easily 'see' the polylines that do not match, but I have to manually find and select each of them, assign a third typ style, then eventually delete the original polyline styles from the map, leaving me with what amounts to the map delta.

Then I can apply this new data to my existing map file, and repeat the process for each new polyline, checking google maps etc for errors and making necessary corrections.

Mapping trails throughout the southwest USA, it ain't no simple task!