GPSFileDepot.com
 

News:

Welcome to GPSFileDepot!

Main Menu

Comparing Shape Files

Started by babj615, October 22, 2013, 03:24:57 PM

Previous topic - Next topic

babj615

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.

???
Garmin GPSMap 60cs, Dakota 20, Colorado 400t, Oregon 300/400t/450/550t/650/650t, Montana 650, Lowrance Endura Sierra, nuvi 3790, iPhone 3G/4/4s
Geocaching ID: Atlas Cached
OpenCaching.com Ambassador

Seldom

If you have the patience you can probably do what you want using postgis and postgresql, but don't ask me how.

Boyd

There's a GlobalMapper script command to remove duplicates.

babj615

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?
Garmin GPSMap 60cs, Dakota 20, Colorado 400t, Oregon 300/400t/450/550t/650/650t, Montana 650, Lowrance Endura Sierra, nuvi 3790, iPhone 3G/4/4s
Geocaching ID: Atlas Cached
OpenCaching.com Ambassador

Boyd

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/

babj615

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!
Garmin GPSMap 60cs, Dakota 20, Colorado 400t, Oregon 300/400t/450/550t/650/650t, Montana 650, Lowrance Endura Sierra, nuvi 3790, iPhone 3G/4/4s
Geocaching ID: Atlas Cached
OpenCaching.com Ambassador