GPSFileDepot Forums

General Category => Map Making Support => Topic started by: hntr on October 19, 2009, 03:40:52 PM

Title: Dictionary problem with leveling - EndLevel
Post by: hntr on October 19, 2009, 03:40:52 PM
I am having a problem with leveling on one of my maps.

I want all my polygons with mp_type of 0x2e and 0x2f to show up at a further in zoom level than level=19, but on the GPS the polygons are loading at all levels.  These are the only polygons on the map - and the only data on the map.

I believe my problem lies within the dictionary header but have spent all day trying to figure out where.  Can anybody take a look at the attached dictionary and try to steer me in the right direction?

The only thing I can think of now is it might be because its a transparent map???

Title: Re: Dictionary problem with leveling - EndLevel
Post by: Seldom on October 20, 2009, 02:19:40 AM
I just checked the cgpsmapper manual, and neither 0x2e and 0x2f are listed as polygon types.  Do you know something I don't?  Also, the dictionary examples in the manual don't show a bitmask for Level0, as you have done, but do show one for Level4.

By the way, Christmas in October.  cgpsmapper version 0099 just got posted yesterday.  It comes with a new manual.
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 20, 2009, 04:48:21 AM
Ooh, new manual!  Hope it has more examples.  Thank you!

I guess I do know something you don't know if you don't know about custom types.  I have defined custom types for these mp_types

yeah, you don't need to define the bitmap for level0, all data is displayed by default.  So I guess I don't need that, but that can't be the problem.

Guess I'll try going back to my 4 level scheme that I know works and do a test run with that today
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 20, 2009, 05:28:34 AM
just tried my level scheme that worked on a similar map with more data, but it didn't work  ???
Title: Re: Dictionary problem with leveling - EndLevel
Post by: Seldom on October 20, 2009, 09:20:30 AM
I'm new to custom types, but from what I understood from reading the manual you could customize the appearance of a specific type, but not create a new type.

In other words, I understand you can make polygon type 0x28 (ocean) look like it has red fish in it, but you couldn'd create polygon type 0x2e and have it mean anything.  I assumed that the hex types meanings were defined by the hardware.

If you can point me to a source that can get around this, I'd appreciate it.
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 20, 2009, 09:26:02 AM
you must have misunderstood.  I have used these types successfully on other maps.

Certain hex values are available for repurposing (not defined by default on Garmin GPSr). 

See the table on page 3 of this manual

http://www.cgpsmapper.com/download/Creating%20custom%20types%20to%20represent%20elevation%20data.pdf
Title: Re: Dictionary problem with leveling - EndLevel
Post by: Seldom on October 20, 2009, 09:32:15 AM
Thanks for the tips.
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 20, 2009, 09:49:15 AM
Quote
It looks like your EndLevel=3 might be the problem as that is undefined.

Changed to EndLevel=2 and the preview in MapSource works according to the correct levels but on the GPS it still loads on any zoom.  I'm pretty sure I tried that before (I changed endlevel to 0, 1, & 2) with no success.

Any ideas given that information?
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 20, 2009, 11:54:10 AM
That new setup didn't work, good idea though.  I see what you were doing.  Here is what I have:

Code: [Select]
Levels=4
Level0=23
Level1=21
Level2=19
Level3=18
Zoom0=0
Zoom1=1
Zoom2=2
Zoom3=3

Transparent=Y
[END-IMG ID]

[DICTIONARY]
EndLevel=2


Note:  I am using cpreview from the command line and a mypv.mp file

I am going to try it on some different data.
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 20, 2009, 02:03:48 PM
I tried it with Transparent=N and it works fine, so can somebody explain that?
Title: Re: Dictionary problem with leveling - EndLevel
Post by: maps4gps on October 21, 2009, 09:56:05 AM
I have never used the dictionary method, however I do see a number of issues.
1.  Your file has 3 levels (0,1,2) - The highest is used to indicate where a mapset is no longer shown and is 'replaced' by the built-in basemap.
2.  As the cgpsmapper manual indicates - level0 is not used in the dictionary file as everything is normally displayed at the most detailed defined level.  Perhaps cgpsmapper does not look at the level 'number' but simply assumes the first entry is the next level above '0'.
3.  Level2 in the dictionary should be all '0's - as this is the basemap level.  Your two polygon types may not have a '1' at your 'leve1' and 'level2' entries, but perhaps having something with '1' here is confusing cgpsmapper.  As may the extra entry (0,1,2 - where only 1,2 is 'needed).
4.  You have 'Zoom0=0' etc.; as in the cgpsmapper manual.  The 'Getting started with GM8 and cgpsmapper' uses Zoom0=1, Zoom1=2, etc., and GM creates .mp files this way.  I have always used 0=1 etc without a problem.

----
Some things using overlay(transparency=y) work somewhat differently.  I believe the contour overlay mapset I did last Fall did kept showing the major contour lines at more zoomed out levels than they were supposed to.  Perhaps if the mapset is 'overlay' it ignores not showing at the basemap level and above.  I believe I 'fixed' this by including another level between the last level of data and the basemap level (level2=20 and level3=19 for your example) with no data defined at this level.  Or maybe this was for use in gpsmapedit.  I will revisit this shortly as the new overlay contour mapset is about to be processed to .mp and .img files.
I also remember that basemap 'hide or show' had some effect on a mapset, but do not now remember if it was the overlay contours.
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 21, 2009, 07:21:53 PM
I just noticed something that could provide some insight.  On my GPSr, the scale says 'basemap' at the furthest out zoom - 500mi scale.  As I zoom in it continues to say basemap until the zoom scale of 3mi where it switches to 'overzoom' 

I checked my GPS map detail setting and it is still at 'Normal'

Thanks for the input maps4gps.  I implemented all the changes you mentioned, but it resulted in the map not even showing up in MapSource.  Could of been something I messed up, maybe you'll have the same thing happen during your experimentation.

???
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 22, 2009, 05:17:42 AM
Just reading through the cgps manual AGAIN this morning. 

Maybe I will try Transparent=S
Title: Re: Dictionary problem with leveling - EndLevel
Post by: maps4gps on October 22, 2009, 06:45:04 AM
That is one of the problems/issues in overlay/transparency maps - there is nothing to show up in MapSource at overview scales (except quad boundaries).  You need to zoom in until the actual data begins to show (which is not much help if the overlay consists of contour lines).

What program are you using to create the .mp file(s)?
Could you attach a portion of the an .mp with a 2 or 3 small polygon features?

I believe the 'overzoom' is refering to zooming-in more than the resolution of the mapset; therefore 'empty magnification'.
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 22, 2009, 06:57:18 AM
Transparent=S doesn't help

I went back to a very basic img header:

Code: [Select]
[IMG ID]
ID=
Name=
DrawPriority=31
LBLcoding=6
Codepage=0
Marine=N
Elevation=f
Preprocess=F
POIIndex=Y

TreSize=1000
RgnLimit=1024
Levels=2
Level0=19
Level1=18

Transparent=Y

[END-IMG ID]

still no luck
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 22, 2009, 07:25:27 AM
What program are you using to create the .mp file(s)?
Could you attach a portion of the an .mp with a 2 or 3 small polygon features?

using GlobalMapper
see attached file from one of the trials
Title: Re: Dictionary problem with leveling - EndLevel
Post by: maps4gps on October 22, 2009, 03:28:37 PM
Your ex.mp file looks OK to me.  The three polygon types should display at about 3 mi and continue to display all the way in (20 feet).
I compiled it with cgpsmapper versions 9.6a and 9.8g
Interesting results in mapedit : you ex.mp file begins to display at 0.28 mi; however, both    
         compiled .img files begin to display at 3 mi.  I have never seen a discrepency before, but
         have never made a .mp file with a directory.
Opened your ex.mp file in GM and exported it as a .mp file,  Also used the 'header' data in your
         file as a template .mp file and exported a .mp file.  Compiled both of these and both the .mp
         and .img files begin to display 3 miles.
Tried all the .img files on my 76csx by transfering each .img file and renaming it gmapsupp.img.
         All polygons showed as solid blue (a Garmin default for undefined/custom types ?? ) and
         first display at 3 miles and remained displaying to 20 feet.
Used MapSetToolKit to install an .img file to MapSource.  Bounding rectangle displayed and  
         some 'created by cgpsmapper.......'  With further zoom, nothing additional.  This might be
         normal as you used custom type definitions and I did not have that file when using  
         MapSetTookKit.  Selected the quad and sent it to the GPSr.  At 3 mile zoom the polygons  
         displayed as blue and remained displayed through 20 feet.

Perhaps MapSource does not support custom type information, or that info has to be put into MapSource other than in the mapset.  ---  Just noticed in the cgpsmanual that custom types have to be installed in MapSource.  ---

I was hoping Boyd would have something to say as he may be the groups most experienced person with custom type files.  

Might also be some incompatibilty between the versions of the various software packages being used.


Attached are two of the .mp and .img files I construceted.
Title: Re: Dictionary problem with leveling - EndLevel
Post by: maps4gps on October 23, 2009, 06:42:06 AM
Since you are using GM, output the .mp file without a directory section.  If GM does not know what something is, it will default it to level(endlevel) 2, which will be the '19' in your level2.  Either edit the default GM .mp output file for Transparency+Y and add the 5th zoom level etc., or take the 'img id' portion of the zzzz.mp file and refer to it as a template file when GM writes the data.  I have not done a custom type, so not sure where that might come in.
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 23, 2009, 06:49:11 AM
I did a test with just letting GM export the mp file with it's default img header the other day.  It still did the same loading the data at all levels.

i will try some of your other suggestions above
Title: Re: Dictionary problem with leveling - EndLevel
Post by: hntr on October 23, 2009, 10:45:26 AM
Here is what cgps has to say:

"Transparent maps are VERY specific - best - create only 2 layers (one empty) - otherwise it might behave strange a little bit.."