The Following 2 Users Say Thank You to slamp For This Useful Post: | ||
|
2007-09-05
, 13:52
|
Posts: 28 |
Thanked: 1 time |
Joined on Jul 2007
|
#2
|
|
2007-09-06
, 01:17
|
Posts: 10 |
Thanked: 3 times |
Joined on Sep 2007
|
#3
|
|
2007-09-06
, 15:26
|
Posts: 11 |
Thanked: 1 time |
Joined on Jul 2007
|
#4
|
|
2007-11-30
, 12:40
|
Posts: 3 |
Thanked: 3 times |
Joined on Nov 2007
|
#5
|
Been using MMapper since January, what a great program, I have noticed in several treads, folks wonder how to get a custom map into MMapper, here is what worked for me.
The Following 3 Users Say Thank You to MarkW For This Useful Post: | ||
|
2007-11-30
, 23:16
|
Posts: 10 |
Thanked: 3 times |
Joined on Sep 2007
|
#6
|
|
2007-11-30
, 23:51
|
|
Posts: 574 |
Thanked: 166 times |
Joined on Oct 2007
@ BC, Canada
|
#7
|
|
2007-12-01
, 17:03
|
Posts: 10 |
Thanked: 3 times |
Joined on Sep 2007
|
#8
|
|
2008-06-25
, 05:40
|
Posts: 5 |
Thanked: 0 times |
Joined on Mar 2008
|
#9
|
You may have answered my only concern of moving on to v2.x of this great program, as new version did not appear to have a way to import custom map data, now that the maps are stored in the database.
What was missing was a method of putting these custom maps in into the new database structure. Renaming the tiles is a pain. I have some maps from 1895 of my home town that I need to try this with.
Thank you this appears to be the missing part of the puzzle.
Const OverwriteExisting = FALSE Set objFSO = CreateObject("Scripting.FileSystemObject") Set objBaseFolder = objFSO.GetFolder("C:\misc\GPS\CRUN12_ORIG") Set colSubfolders = objBaseFolder.Subfolders Dim strFilename, strLetter, varLength, strNewFileName, strNewFolderName Dim i, x, y, z, q 'Wscript.Echo "Start" q = 0 For Each objSubfolder in colSubfolders 'Wscript.Echo "Start 1" Set colFiles = objSubFolder.files For Each objFile in colFiles x = 0 y = 0 z = 17 strFilename = objFile.Name varLength = Len(strFilename) - 4 'Wscript.Echo "Length " & varLength If varLength < 19 Then For i = 1 To varLength strLetter = Mid(strFilename,i,1) 'Wscript.Echo "Letter " & strLetter Select Case strLetter Case "0" x = x * 2 y = y * 2 z = z - 1 Case "1" x = x * 2 + 1 y = y * 2 z = z - 1 Case "2" x = x * 2 y = y * 2 + 1 z = z - 1 Case "3" x = x * 2 + 1 y = y * 2 + 1 z = z - 1 End Select 'Wscript.Echo "X for " & strLetter & " = " & x 'Wscript.Echo "Y for " & strLetter & " = " & y 'Wscript.Echo "Zoom " & z Next 'Wscript.Echo "Zoom end " & z 'Wscript.Echo "X Dir " & x strNewFolderName = "C:\misc\GPS\MM_F_CRUN\" & z If Not objFSO.FolderExists(strNewFolderName) Then objFSO.CreateFolder(strNewFolderName) End If strNewFolderName = "C:\misc\GPS\MM_F_CRUN\" & z & "\" & x 'Wscript.Echo strNewFolderName If Not objFSO.FolderExists(strNewFolderName) Then objFSO.CreateFolder(strNewFolderName) End If strNewFileName = strNewFolderName & "\" & y & ".jpg" Set objOldFile = objFSO.GetFile(objSubfolder.Path & "\" & strFileName) If Not objFSO.FileExists(strNewFileName) Then objOldFile.Copy strNewFileName, OverwriteExisting q = q + 1 End If 'Wscript.Echo strFilename & " x=" & x & " y=" & y & " z=" & z 'Wscript.Echo strNewFileName 'Wscript.Echo objBaseFolder & "\" & strFileName End If Next Next Wscript.Echo q & " Tiles copied"
|
2008-06-25
, 09:03
|
Posts: 5 |
Thanked: 0 times |
Joined on Mar 2008
|
#10
|
Start with MapCruncher from MS
http://research.microsoft.com/mapcruncher/
Tutorial at:
http://research.microsoft.com/mapcru...#_Toc148418544
Started by scanning some high quality Topo maps that include hiking trails that are highlighted on the map. Tried several levels; the 600 DPI seems to work best.
Once you have your map source file, you can open it in MapCruncher, check the borders, and create the GPS Correspondences. The program will render the Individual map tiles for the map. MS level 14 = MM level 3 for zoom (worked well for my maps). I also set the max zoom to 14 for the maps in Cruncher (limits the number of output tiles). See tutorial for getting the correspondences more accurate as you may need to add numerous points and adjust them based on the points 'Error'. The best points seem to be North - South Street intersections.
When MapCruncher renders the tiles, it will create a large number of .png files in a directory. The naming convention for these tiles is as follows: the number of characters in the file name indicates zoom level. So if the file is named 0012.png it means that it is zoom level 4. MS VE coded these tiles so they only contain 0 thru 3 as valid characters in the file name. These represent grid that is overlays the tile, so a picture of the world would have North America in quadrant 0 Europe in Quad 1 South America in Quad 2 and India in Quad 3. In this way one can read the name of the file one character a a time that indicates the quadrant that one is to zoom to for that zoom level. In our earlier example '0021.png' would read 0 first quadrant (North America) then each successive zoom to the quadrant of the tile that is zoomed too, read the next number and zoom to that quadrant. In my case I took all of the files that were 14 characters long and copied them to another directory.
At this point I also batch renamed all of the files to a jpg extension.
As I do not have a program to 'rename' the file name itself, only the files extension. Each has to be renamed, started by creating a VE repository on my N800 that roughly contained the area of the map from an X - Y area that the map covered. I then moving the directory over to the computer opened the MS VE Streets directory and the MapCruncher files in another view. I then identified the tiles that represent the same place on the map. Using this I renamed the MS Cruncher files to the MMapper format. To keep these clear I appended a -# to the end of the file to help keep them straight. For example one of the files 03023221300332.png is re-named 6055-2.jpg in the MapCruncher directory. Once I was done renaming all of the files for the map I would then copy a 'set' 6054-2.jpg, 6055-2.jpg, 6056-2.jpg, 6057-2.jpg into the 4710 'Y' directory of MMapper. Once the files are copied they are renamed to loose the -2 part of the name as MMapper would not reconize it. Once you have the files renamed to this format you can simply view the thumbnails by name, without this you may need to view by 'creation date' or 'modified' in order to keep them straight order-wise.
I have found that the maps I have processed have the actual trail within a meter or so to the actual GPS Track in MMapper. MMapper is ok with the files being .png files that are renamed .jpg.
It takes about an hour to scan in the map, crunch it, and rename the tiles. I would be great to have a script to read the 03023221300332.png name and place it into a directory name 4710 with a file name of 6054.jpg. Cruncher allows for transparency’s of layers of maps. I have also taken some historic maps of the area and crunched them with success. Odd display artifacts are visible when the tile is not complete, MMapper trys to 'fill' in the space by duplicating part of the tile itself (best not to use partial tiles -- looks cleaner in MMapper).
Happy Mapping, ps the tutorial for MapCruncher is good, MMapper is great....