GPSFileDepot.com
 

Newbie help appreciated - problem loading into mapsource

Started by kzloy, July 04, 2011, 03:09:12 PM

Previous topic - Next topic

Seldom

#15
Quote from: maps4gps on July 05, 2011, 02:39:35 PM
'custom zoom levels' ??  By Garmin 'standards', GM is 'custom'.
Re: GM zoom levels:  I got the first four from Greg Ryker's template in the GM tutorial.  Only "customized" (added the fifth) when the map got big and crowded.  If I was doing a nationwide map, like CNNANT, I'd need a few more.

kzloy

Everything I have tried is beginning to bleed together as I am on a different machine at the moment, I can't say precisely the steps taken for the two images. 

I essentially created the contour lines using GM.  Didn't include anything else in there except the contour lines of a 100k size map with 20 foot detail (albeit most of it is beachfront so it pulled from only 2 dem files vs. 4). 

Then I processed it through gpsmapper.  I believe the map turned out fine in that stage as well, I do want to go back and check though as I am not sure the elevation levels translated over correctly, perhaps a different issue altogether.

I then ran through MSTK and loaded it into mapsource.  When in mapsource and even zooming in, all i get is what i think to be the preview map.  When I open the .img file in gpsmapedit, it only has the two levels.  That is the one that looks like it can't possibly contain much information at such a small file size.

I have since ran the whole thing again using Dem2Topo from the beginning instead of GM and after loading it into mapsource, I can retrieve the detail upon zooming, no problem seems to exist.  I need to double check the results, but it may be some setting i have selected or didn't select in GM.  ???

jbensman

Quote from: seldom_sn on July 05, 2011, 02:24:19 PM
jbensman, kzloy reports he specifies 4 levels in his MP file but only gets 2 levels in his output file.  My compiled IMG files always show the same number of levels as my MP files, but my compiled preview files only have 2 levels.  That's why I think kzloy is looking at a preview.IMG.

kzloy, what is the map ID in your MP file?  Also, what are the names of your MP files?  The map ID should be 8 digits.  As a convenience, I use the same map ID in the IMG file name.  Your map IMG file and your preview file names should NOT be the same.

Boyd, I didn't much bother with custom zoom levels until my last map got so big that I had to add a 5th one to reduce clutter.  Too many POI.

Yes I understand that.  I use gpsmapedit and mapsettoolkit.  When kzloy says:

The levels for the toolkit processed .img file are also as shown below:

Level0= | 17 | 305m | 12km | Zoom0=5 (50-120km)
Level1= | 16 | 610m | 20km-30km | Zoom1=6 (120 - 300km)

He is talking about the preview img created by mapsettoolkit.  This is exactly what it should be.  Also what he describes about transparency is exactly what the file is supposed to do.  So this is not the problem.  Mapsettoolkit creates a blank preview map so its not causing the lines as mapsettoolkit will not put contour lines in the preview map.

I've seen this before, its the zoom levels.

Here is what is happening:

The contour lines are drawn on a grid.  The spacing of the grid is based on the zoom settings.  What you see is that the spacing of the grid for that zoom level is to far apart.  The problem is there is not enough grid points for the zoom level he is viewing.  So the solution is to either delete the level if it is not needed or to get the zoom settings right.  


jbensman

kzloy

Take the img files and open them in gpsmapedit.  Then use ctl 0 ctrl 1 ctrl 2 crtl 3 etc until you have looked at all the levels.  Let me know which ones show smooth and what shows messed up.  I've seen this before, its your zoom level settings.

Ignore the files created by mapsettoolkit, they are NOT the problem. 

Seldom

Why is he seeing the preview.IMG instead of the main map? 

Ctrl-G clears the image buffer in MapSource.  Also,kzloy, what's your MapSource detail level set for?

kzloy

seldom_sn - my mapsource detail is set to highest, I have messed with that for a bit with no noticeable change.

jbensman I reran my whole scenario with two different variations tonight.

I went through the tutorial using GM and had the same results of what I guess to be only loading the preview map into mapsource.  I also went through the whole thing using Dem2Topo and it loaded both, I had to do ctrl+g to clear the preview and see the underlying map.  The different layers seem to show up at the correct zoom levels too. 

Below are the steps I took for anyone who wants to figure out what on earth could be the setting that would allow GM to process correctly.  I am only assuming that it is something to do with GM.  I may revisit when I am not as tired.

Thanks for all the posts and help on this.

FYI I am running Windows 7

With GM:

1. Downloaded the ArcGrid files for my 100k area
2. Processed in Globalmapper with tutorial settings to generate contours
3. Created a file: map_catalog.gmc and loaded the generated contour file in
4. Exported using Export to Vector Data -> Export Polish MP (cGPSMapper) File,
   - did not use a dictionary header, not sure but had some issues with that
   - left default checked - make all point features searchable
   - did not check create as marine map or create transparent map
   - Did not set any gridding or export bounds as this is just a fraction of a 100k map
   - Image ID was left to 0 on this step
   - This created MP_Map.MP; copy placed in GM Export folder
5. Copied over gpsmapper.exe, cpreview.exe, process.bat, sendg.dll, sort.img, transcode.bat and TranscodeQ.txt
6. Changed TranscodeQ.txt to read MP_Map.MP
7. Ran Transcode.bat and it created 68326280.img and active_transcode.txt
   - When I open this .img file in gpsmapedit, and press ctrl+0 I shows all contour lines, ctrl+1 shows more major ones with slight loss of curvature, ctrl+2 shows only the thickest with more loss of curvature
   - It also appears that i have levels 0-4 when I examine it in map properties
8. Followed tutorial on mapsettoolkit
   - selected 68326280.img under Source IMG files: and moved to Selected IMG files:
   - Set Mapset directory to point to where 68326278.img was found
   - Set Mapset name: to be GM_Map
   - Set Family ID to be 1234
   - left Draw priority and Transparent to default
   - pointed cgpsmapper/cpreview folder to the folder where 68326280.img was found as that is where I copied cpsmapper.exe to
   - Checked the box for Install in Mapsource
   - Nothing entered in TYP files
   - Nothing entered in gmaptool program
9. After running MSTK I now have the following files GM_Map.img, GM_Map.MDX, GM_Map.MP, GM_Map.reg, GM_Map.TDB
   - When I open the newly created .img file in GPSMapEdit, it is highly angular and no difference between ctrl+0,1,2 etc
   - When the map is viewed in mapsource, same appearance, angular with no fine contouring lines even when zoomed in and changing the detail to highest

With Dem2Topo

1. Downloaded the .tif file
2. processed in Dem2Topo with tutorial settings
   - this created 00732189.mp
3. Copied over gpsmapper.exe, cpreview.exe, process.bat, sendg.dll, sort.img, transcode.bat and TranscodeQ.txt
4. Changed TranscodeQ.txt to read 00732189.mp
5. Ran Transcode.bat and came back with an error about the map ID
6. Opened .mp in GPSMapEdit and changed map ID from 00000000 to 12345678
7. Re-ran Transocde.bat
   - this created 12345678.img
   - When opened in gpsmapedit it appears fine
8. Followed tutorial on mapsettoolkit
   - selected 12345678.img under Source IMG files: and moved to Selected IMG files:
   - Set Mapset directory to point to where 12345678.img was found
   - Set Mapset name: to be DEM2
   - Set Family ID to be 4321
   - left Draw priority and Transparent to default
   - pointed cgpsmapper/cpreview folder to the folder where 12345678.img was found as that is where I copied cpsmapper.exe to
   - Checked the box for Install in Mapsource
   - Nothing entered in TYP files
   - Nothing entered in gmaptool program
9. After running MSTK I now have the following files: DEM2.img, DEM2.MDX, DEM2.mp, DEM2.reg, DEM2.TDB
   - When I open the newly created .img file in GPSMapEdit, it is highly angular and no difference between ctrl+0,1,2 etc
   - When opened in mapsource, the same appearance as above even zoomed in, however, when I use ctrl+G, my contour map appears in all its glory


maps4gps

As has been said before, your GM_map.img and DEM2.img are preview images.  When you view this file, it will display as yours does - very coarsely. 

Contour lines can be put into the preview map.  I have recently done so and it was obviously done here. 

The highest level specifies when the mapset switches to the basemap on the GPSr (if it is enabled).  The next most detailed level is used to build the peview map - if contours lines are in it, they will be in the preview map.

From your second post:
Level3 = 18 - the display level the GPSr will switch to the built-in basemap
Level2 = 20 - featues in this level will display on the GPSr and be used to build the overview map
  GM puts the major contours in level 20 ('intermediate' in level 22, and 'minor' in level 24).
  I have not used DEM2TOPO - it may only build two levels of contours (detail/major).

Adding another level will keep the contour lines out of the preview map.

The detailed contour lines are NOT in the GM_map.img - that is the preview map.  The actual data is in the 68.... img file. 
You may not have zoomed in enough in MapSource to switch from the preview map to the actual data. 
Leave the settings at NORMAL, not doing so makes it harder to determine if everything is as it should be.

Seldom

Quote from: kzloy on July 06, 2011, 01:04:12 AM
9. After running MSTK I now have the following files GM_Map.img, GM_Map.MDX, GM_Map.MP, GM_Map.reg, GM_Map.TDB
   - When I open the newly created .img file in GPSMapEdit, it is highly angular and no difference between ctrl+0,1,2 etc
   - When the map is viewed in mapsource, same appearance, angular with no fine contouring lines even when zoomed in and changing the detail to highest

What happened to 68326280.img?  It should be in the folder with all the GM_Map stuff.

kzloy

Seldom_sn - the 68326280.img is still in that folder.  Sorry, that list of files were the newly created files from MSTK.  Total list of files still in that folder are:

68326280.img
active_transcode.txt
cgpsmapper.exe
cpreview.exe
GM_Map.img
GM_Map.MDX
GM_Map.MP
GM_Map.reg
GM_Map.TDB
process.bat
sendg.dll
sort.img
transcode.bat
transcode_log.txt

Shouldn't the GM_Map.img and DEM2.img be referenced to the 8 digit .img file.  I get the feeling that with GM Map that is not occurring, but rather all I have is a preview with no connection to the real file, therefore no switch from the coarse preview .img to a more refined .img when zooming or ctrl+g in mapsource.  I don't disagree (with my vast map program knowledge ;D) it is very likely a level issue because the MSTK process is identical in the two different maps.

When I try to install the GM map in mapsource/basecamp, I am unable to select a map at all (no happy yellow outline, no option to do so).  I am able to select and install the DEM2 map though (used basecamp) and upon zooming in/out in mapsource/basecamp and GPSr, I get different detail.

maps4gps - when you say leave the settings to NORMAL, are you referring to mapsource?  I tried to process this with as little variation as possible from the tutorial to try to keep it simple.  The only major difference is not using a dictionary header as that seemed to yield no map whatsoever for preview files.  Thanks for further clarifying the levels, I will go do some messing with those for kicks.

Seldom

Quote from: kzloy on July 06, 2011, 08:25:49 AM
When I try to install the GM map in mapsource/basecamp, I am unable to select a map at all (no happy yellow outline, no option to do so).  I am able to select and install the DEM2 map though (used basecamp) and upon zooming in/out in mapsource/basecamp and GPSr, I get different detail.

If you can't get the yellow outline you don't have an 0x4b map selection polygon on your map.
Also, try doing MSTK with Transparent set to No.

kzloy

Both the GM generated map that doesn't work and the Dem2topo map that did work have the same polygons present when opened in GPSMapEdit:

The main 8-digit .img has: Area of map coverage (0x4b, polygon)
The preview .img has both: Area of map selection (in Mapsource)(0x4a polygon) and Area of map coverage (0x4b, polygon)

I ran the scenario again with MSTK transparent set to No with same results.

Have not had a chance to extensively manipulate levels yet though.

jbensman

I use dem2topo and gpsmapedit to create transparnt topo maps.  They only display at the .5 mile zoom level and below.  (As I said, topo lines on your GPS above the .5 mile zoom to not give you useful info and just clutter the map.) They are also set to show all the contour lines 500 feet and below.  Only the major contour lines show from 800 feet to .5 mile.

Here is what I do:

Run the geotiff through dem2topo and create a *.mp

Open the .mp file in gpsmapedit.

Set it to transparent, give it a name and 8 digit ID

In map properties select levels

click on level 2 and delete it

Then click on the highest level and select "insert before"

Then you should have 4 levels

Adjust the levels as follows:

Level 0 24 bits zoom 0
level 1 22 bits zoom 1
level 2 17 bits zoom 2
level 3 16 bits zoom 3

select OK

Then select ctl 2 and you should have a black screen
In the middle of the screen (dont need to be exact) use the create object tool to create a point, you can use unknown type and no label.  This step is extremely important as if you do not add the point, the topo lines will show forever when you are zooming out.

Save the file, compile the img file, then use mapsettool kit to install it in Mapsource.

I'm not sure what you are doing with the batch file and splitting it to multiple imgs.  For a 100K area it is extremely rare to need more than one img for the 100K area.  Only when you have an extremly high number of topo lines do you need to break it up. 

jbensman

"I had to do ctrl+g to clear the preview and see the underlying map.  The different layers seem to show up at the correct zoom levels too."

In MapSource CTR G does NOT clear the preview.

MapSource caches the maps.  So when you update a map, sometimes mapsource will show the map based on the cache.  CTR G twice clears the cache and redraws the map.  So every time after you run mapset toolkit to install the map ctr g twice and then you see the updated map instead of a cached viewed of the previous map.

Seldom

kzloy,
I just experienced something like you described (for the first time) in one tile of a set of 6.  That tile had two 0x4b polygons sitting on top of each other.  When I selected and deleted one of the 0x4b polygons, and re-compiled and reinstalled, the map showd correctlly in MapSource.

kzloy

What do I use to go in and edit the .img file?  When I try to do so in GPSMapEdit, it won't allow me to save it, it tells me that I cannot do direct saving to Garmin IMG and that I need to do File>Export>Garmin IMG/gpsmapper.exe.  Understandably, when I follow that instruction, I receive an error telling me "Please save the map in Polish format before export." If I export a map again from polish format, I get the double-poly again, ah a fun endless loop.  Hmmm.  When I open in GM, I have a dialogue that pops up to prompt me to select overlay type, and I have no clue what to select or if it even supports opening .img files.  Also, which poly did you delete, does it matter?