Welcome, Guest. Please login or register.

Login with username, password and session length
Forums Search:  


Author Topic: Comparing Shape Files  (Read 4445 times)

babj615

  • Expert Advisor
  • *****
  • Posts: 266
  • Karma: -4
  • The cache is a lie!
    • View Profile
    • Garmin Oregon 6xx Wiki
Comparing Shape Files
« on: October 22, 2013, 02: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.

 ???
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

  • Expert Advisor
  • *****
  • Posts: 1852
  • Karma: 19
    • View Profile
Re: Comparing Shape Files
« Reply #1 on: October 22, 2013, 08: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.

Boyd

  • Expert Advisor
  • *****
  • Posts: 3808
  • Karma: 43
    • View Profile
Re: Comparing Shape Files
« Reply #2 on: October 23, 2013, 05:57:32 AM »
There's a GlobalMapper script command to remove duplicates.

babj615

  • Expert Advisor
  • *****
  • Posts: 266
  • Karma: -4
  • The cache is a lie!
    • View Profile
    • Garmin Oregon 6xx Wiki
Re: Comparing Shape Files
« Reply #3 on: October 24, 2013, 07: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?
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

  • Expert Advisor
  • *****
  • Posts: 3808
  • Karma: 43
    • View Profile
Re: Comparing Shape Files
« Reply #4 on: October 24, 2013, 08: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/

babj615

  • Expert Advisor
  • *****
  • Posts: 266
  • Karma: -4
  • The cache is a lie!
    • View Profile
    • Garmin Oregon 6xx Wiki
Re: Comparing Shape Files
« Reply #5 on: October 24, 2013, 03: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!
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

 

anything