Welcome, Guest. Please login or register.

Login with username, password and session length
Forums Search:  


Author Topic: Merge two split maps into one mapset?  (Read 3012 times)

93ToyTruck

  • Jr. Member
  • **
  • Posts: 44
  • Karma: 0
    • View Profile
    • California Trail Map
Merge two split maps into one mapset?
« on: December 19, 2014, 09:20:53 AM »
I've got a topo map that has grown larger than GpsMapEdit can handle in a single file. I'm trying to solve the problem by using two source map files then merging them together into a single mapset. It almost works but there's a region of the map on a segment of the merge line that doesn't render correctly and sometimes crashes BaseCamp when I zoom into it.

The Steps
Trail data is in one map file and size isn't an issue with it.
Trail data map is copied into two files then programatically trimmed into east and west.
Topo data for east and west are kept in a separate files and merged into the respective trail map.
"Split Map to Files" is used on east and west. Output files are placed into separate directories.
[This is where I discovered that the Trim feature isn't perfect. It doesn't cut all lines on the trim boundary. The result is a few overlapping split files. The correct split file is large and full of data while the file with the extra data is small because it only contains a few lines. The split feature itself is cuts the same lines correctly but I end up with overlapping files]
Programatically copy the split files out of east/west into a common directory. If a duplicate file exists, it uses the larger file.
All of the steps to build the mapset after this are the same as I've been doing previously.

It seems like this should work but I'm obviously getting something wrong.

Based on observation, the Split Map to Files names the output files based on geographic coordinates. The west and east boundaries of my two maps are on whole number longitude lines to make sure that the split files line up. When I trim the map I wasn't sure if there should be any sort of gap between east and west or if they should actually share the line. (ex. Setting them both to 117 or one to 117 and the other to 117.00001).

This is what it looks like. The merge line is the left side of the white rectangle. When I zoom in it renders correctly once I get to levels 0-3.





Any ideas? Has anybody merged two split maps?


 
« Last Edit: December 19, 2014, 09:29:50 AM by 93ToyTruck »

popej

  • Expert Advisor
  • *****
  • Posts: 329
  • Karma: 30
    • View Profile
Re: Merge two split maps into one mapset?
« Reply #1 on: December 19, 2014, 11:46:12 AM »
I've got a topo map that has grown larger than GpsMapEdit can handle in a single file.
Do you use Windows x64? If yes, then you can easy extend memory available to GPSMapEdit form 2GB to 4GB. Find program "editbin.exe", it is a part of free Microsoft compilers. And run following command:
editbin.exe /LARGEADDRESSAWARE mapedit.exe

Trail data map is copied into two files then programatically trimmed into east and west.
I prefer to split data by layers, not by area. I have for example layers with roads, land cover, contours, etc. Then I split each layer with "Split map to files" and merge tiles. Note, that "Split map to files" is quite buggy for routable maps.

Programatically copy the split files out of east/west into a common directory. If a duplicate file exists, it uses the larger file.
Are you sure, that you don't get duplicated map ID?

When I trim the map I wasn't sure if there should be any sort of gap between east and west or if they should actually share the line. (ex. Setting them both to 117 or one to 117 and the other to 117.00001).
IMO should be exactly the same.

This is what it looks like. The merge line is the left side of the white rectangle. When I zoom in it renders correctly once I get to levels 0-3.
I think you can get better fit if you use background object 4B with precise dimension.

93ToyTruck

  • Jr. Member
  • **
  • Posts: 44
  • Karma: 0
    • View Profile
    • California Trail Map
Re: Merge two split maps into one mapset?
« Reply #2 on: December 19, 2014, 03:04:27 PM »
I think LARGEADDRESSAWARE is the nugget of gold that I've needed for a while. It explains a lot of the behavior I've been observing. I was just able to complete an esri export operation that it previously locked up on as it approached 2gb in task manager. It will probably fix my current problem but I'd like to figure out how to merge maps because I'll likely hit the 4gb within the next year.

I split the data by area because it was too large to compile after I added the topo data. The solution that I found was to Split Map to Files then compile them individually. I'm not sure what you mean split the data by layers. I keep my trail, topo and other data in separate files then merge them into a single file via c#. I then open in GpsMapEdit to split into files. Then start up the second half of my c# build that does all of the compile steps.

I think you hit the nail on the head with the duplicate map IDs. I was thinking that I changed them in the build but it's only the filename that I'm changing. It's obviously seeding the split map ID based on the parent map ID. Is here any correlation or do they just need to be unique? Changing the ID of one of my maps before the split will make it unique but out of sequence with the other map files.

Thanks for your help!

I use 4b with precise dimensions to trim the map. The white line is from me processing the topo data in two different batches.
« Last Edit: December 19, 2014, 03:06:01 PM by 93ToyTruck »

popej

  • Expert Advisor
  • *****
  • Posts: 329
  • Karma: 30
    • View Profile
Re: Merge two split maps into one mapset?
« Reply #3 on: December 19, 2014, 03:41:58 PM »
I keep my trail, topo and other data in separate files then merge them into a single file via c#. I then open in GpsMapEdit to split into files.
I would split trail alone, then topo alone and other data alone. Then I would merge small tiles, one tile from trails, one form topo and one from data. I would do it for all triplets of tiles. In the end I would get the same files as you, but for each split in GPSMapEdit I would have to load smaller file, which meas that I could process bigger area.

Is here any correlation or do they just need to be unique? Changing the ID of one of my maps before the split will make it unique but out of sequence with the other map files.
Usually mapset consist of tiles with sequential values of ID, but I don't think it is required. For my maps I simply run a script with sed command to correct ID.
« Last Edit: December 19, 2014, 03:48:05 PM by popej »