GPSFileDepot.com
 

News:

Welcome to GPSFileDepot!

Main Menu

BaseCamp - no oceans or large waters on custom Garmin IMG

Started by fo0bar, May 12, 2019, 01:34:50 PM

Previous topic - Next topic

fo0bar

Hi all,

[Firstly sorry if this is a double post, my initial post messed up with the captcha after I edited it and then said I'd already posted it but it never appeared. It was in the wrong board anyway so I hope it just didn't work ::) ]

I've been sending my hair grey and almost lost my mind over this one, testing all different parameters and stuff for the past week and a half...

I've created some simple IMG maps for my Etrex20x using QGIS, GPSMapEdit and mkgmap. I'm using the 'golf course' polygon type as fill, as well as a 'state boundary' polyline for the outlines. My TYP file has custom fill and lines for the type codes I've used, and matching PID & FID unique to this/these map/s.

Everything's working perfectly on the Etrex. All drawpriorities, textures, lines and (where applicable) POIs are displaying with their appropriate custom bitmaps, and nothing is conflicting with the basemap. Absolutely nothing wrong whatsoever on the Etrex. Good to go.

However when in BaseCamp, if I connect the Etrex and display ANY of my maps containing polygons, all oceans and 'major' waters disappear from the map completely, and my TYP files conflict with the basemap (golf courses now have my custom bitmap, state borders have my custom lines, and the ocean/major water thing)... I do still see smaller rivers, streams etc - just no large bodies of water.

I've attempted including the 'default' TYP into my IMG, which made a small area around my polygons show some localised waters and a corner of ocean a few hundred kilometers away on ONE singular zoom level in BaseCamp.  :o This area did not correspond to any "Area of map selection/coverage" polygons. Overall not really much improvement.

The map only covers a small section of my state, completely inland. I just don't understand why the ocean's disappeared! I'm sure I've got something conflicting here but I'm now at my wits end and need help from the pro's  :)

If anyone's experienced this and knows what the problem is, I thank you in advance for any assistance you can offer! :D

Boyd

I have a registered copy of GPSMapEdit but haven't really used it in years, and my experience with mkgmap is pretty limited. I use globalmapper and export directly as .mp files for cgpsmapper.

But a few questions come to mind. How are you creating .typ files? I have used many tools for this, but settled in with typviewer a number of years ago, and it's great.

https://sites.google.com/site/sherco40/

I rely very heavily on custom types, so that's an area I have some experience with. This map uses every available typ, and I have created raster imagery where each pixel is a separate polygon.

https://boydsmaps.com/lidar-in-the-pines-sd/

When you say "simple .img maps", what exactly do you mean? Are you creating a single .img file for a large map? I don't know if this is the problem, but I break my maps into tiles that correspond with the boundaries of USGS 7.5 minute quads (from the 24k USGS topo's). This gives me individual .img files anywhere in the range of 300KB up to 5MB depending on the map.

If you want the maps to work in Basecamp, you might also want to actually install them on your computer instead of using them on a USB storage device like the GPS. I use Mapsettoolkit for that. There are other ways, but I just got used to doing it this way

https://sites.google.com/site/cypherman1/

You mentioned ""Area of map selection/coverage" polygons". Are you using the types 0x4a and 0x4b? After years of doing this the wrong way, I have stopped using those polygons in my maps. They were causing problems on a new Garmin automotive device and when I actually read the cpgpmapper docs, it points out that these polygons aren't needed in most situations and can cause various problems. I wanted a white background on my map, instead of the putrid default Garmin background, and I always used 0x4b for that. Now I have just re-purposed another polygon for the same thing.

Not sure if any of this helps, but it shouldn't be hard to accomplish what you want if you set everything up properly. You might try removing the 0x4a and 0x4b polygons for starters and see if that helps. I also like to use Mapsource to check my maps, just as a "reality check". Also a lot faster to work with than Basecamp. You would have to install the map on your computer to do that however, it doesn't support maps on external devices.

fo0bar

Thanks for your reply, Boyd  :)

I think I may have just found a (somewhat hacky feeling) solution - Though I'll answer your questions first and get to that, as you might have a better solution ;)

I was initially using TypEdit to create my TYPs, however I've just found TypViewer which has less limitations, and a more code-based approach. I was initially using cgpsmapper to "build" the maps, however unfortunately the author is no longer around to sell me a non-watermarked copy, and so I hunted around and came across mkgmap which is perfect for me - as a developer I can inspect and debug to understand how it's behaving, and modify/recompile at will.

By "simple maps", I mean DEAD SIMPLE. Certainly not as complex as yours :) Most of these maps are a just single poly type, some are a single poly type and a single polyline type, and one is a single polyline type. The one I'm initially focusing on here is only a 12kb IMG - 7 (~12 hectare) polygons of a few rural properties and their boundaries. While the area covered spans about 1/4 of Queensland, there are only 14 items on the map. Other maps have a lot more polygons with a size of about 300kb, but behave perfectly other than the same issues as I'm mentioning here.

I was using the 0x4a and 0x4b tiles but I'm also no longer bothering with them as they didn't help one bit.

As BaseCamp appears to currently display the custom maps (albeit wierdly) without being installed to the system prior, I'm avoiding installing the maps to the system as this will add another layer of confusion where I feel I'm already so close -
Quoteit shouldn't be hard to accomplish what you want if you set everything up properly
- I'm sure I've just got something wrong, and my TYP is overriding the basemap in BaseCamp...
[edit] if I compile using the --gmapsupp option and NO TYP file at all, the basemap is fixed but I of course have no custom textures/lines.[end edit]
[another edit] Maps with only POI's and a custom TYP cause no problem on BaseCamp whatsoever. I can have as many custom POI's as I want, as long as I have "Show POI ZIP First" disabled (or I get 'ghosted' points at level 0) [end edit]


Through all my trial and error, I've found that it seems to come down to TYP files and drawpriorities. I tried experimenting with all sorts of drawpriorities from 0 to 40 on my own maps, with no luck.


Anyway, here's the solution I've come to in the meantime:

  • Find basemap and TYP files in Basecamp's program folder
  • Use GPSMapedit to find all polygons used in the basemap (only about 12)
  • Add only the relevant polygons' drawpriorities from the BaseCamp TYP to my custom TYP
  • Compile map using --gmapsupp option

After doing this, everything is looking fantastic in BaseCamp! I just don't reeaaaally like how it's achieved, as I'm sure I've got some kind of flag wrong in the IMG filesystem somewhere causing JUST the polygons to be overridden. As a developer I don't feel comfortable redefining things that I haven't overridden - I'd rather find the conflict (if that's the case) and fix my error.

If this is indeed the correct or only solution, this may be why some "premium" maps have a ridiculous number of semmingly unused drawpriorities - perhaps a standardised drawpriority set is required by Garmin to maintain compatibility with other mapsets and basemaps..

Would a custom TYP in your experience normally override BaseCamp's basemap TYP and drop the default drawpriorities? Is this expected behaviour?

Thanks again for your input and assistance!  :D

fo0bar

Additionally, after taking a look at your "LIDAR in the Pines" page, it looks like a lot of what you've done is going to be what I'm going to be moving on to next with these maps - rather than street and city mapping, these maps are all for geological purposes and I was wondering how I'd be able to achieve various survey imagery overlays very similar to your lidar map... Looks like I'll have some reading to do!

Boyd

Regarding that LIDAR map on my site, it was a fun hack I wanted to try so I built my own system for doing it. But it's really a dead end. It works well in Basecamp/Mapsource, but GPS devices just choke on that much data. It works on my DriveSmart 61 but did not work on any other devices I tested. So, I would not aspire to making maps like that. They are very limited and certainly won't work on an eTrex.

If you want to use raster imagery, your eTrex can handle that natively with .kmz files, but Garmin intentionally cripples it for regular users, so you can only make a very small map. But you can make your own .jnx (birsdeye) files that allow the creation of large maps. Then you can overlay your vector data (roads, poi's) on top of that. I have been doing this on my DriveTrack 71 and really like this kind of "hybrid" map. See my posts starting with #9 in this thread: https://forums.gpsfiledepot.com/index.php?topic=4615.0

Regarding your specific issues, what draw priority have you set for your map? I don't understand why you are getting conflicts with the basemap, have never seen that myself. Try setting a higher priority for the map, I think the basemap has a 0 priority.

And about the cgpsmapper watermark, removing that is trivial. Just create an blank custom typ with invisible text for the watermark point feature. IIRC, it is typ 0x0b.


fo0bar

Ah, yeah I might have to look into the jnx file thing when I get to that - the etrex really is limited. I'll probably give it a shot with some raster paper maps of some localised areas first before going large on the state surveys :)

I've now got my drawpriority set to 10 (renders it under the DEM shading) for this particular map. I did try 0 through 10 15, 20, 25, 30, 35 and more but it seemed to make zero difference. The basemap IMG does have a drawpriority of 0, and internally the ocean's drawpriority is 3. I also tried a few drawpriorities specific to the polygons within the TYP files between 0 and 35, but this also made no difference with the basemap.

I'll also add that I'm now using polygon 10f0a and polyline 10e0a, just to eliminate all conflicts as even though I'd fixed up the polygon/water thing, the state boundaries were still conflicting with my custom type and looking a bit fancy.

When using cgpsmapper, I was using a transparent single pixel extended with no label to replace the "small town" or whatever POI it placed at the bottom element, but still didn't like the fact that it was actually there, and the registration message would appear if you moved the cursor near it.. along with the unremovable shareware/copyright messages in the headers.

The no-basemap-polygon thing was also happening with the maps created with cgpsmapper, also MapTk (used just for testing this issue).. After a week of googling all kinds of phrases and coming up with nothing I'm in disbelief this could only be happening to me! ;D

Boyd

All I can say is that it never happened to me. ;)

Don't confuse draw priority with draw order in the .typ file. The priority affects how the map stacks with other maps that are enabled at the same time. The draw order only affects polygons within the same map.

The draw priority settings should only go from 0 to 31. A setting of 31 should cover up every other Garmin map.

fo0bar

sorry, I did mud up what I was saying - yeah I have been testing with all sorts of drawpriorities, and then tried setting the drawpriorities to 0, 1, 10, 15 and then experimenting with the draworders.

One thing you'll likely know that would save me a lot of time testing and I haven't been able to find a concrete answer for - are draw orders specific to maps, or drawprorities? For instance, if I have 3 separate maps loaded, each with drawpriority 15, and inside those individual maps are single typ's with draworders 1, 2, and 3, will each of those draworders get bundled in with the "drawpriority 15 render" and then sort each draworder within DP15, or does the GPSr just 'get to' drawpriority 15, and then process each IMG discretely (ordered by filename/id/otherVariable) ?

I ask because one of my maps is "permitted areas", and another one is "nonpermitted areas". Some of them overlap and I want to ensure the "nonpermitted areas" are always drawn on top of any "permitted areas" - but I need to keep them in separate maps.

Boyd

Sorry, I have always avoided using multiple maps with the same draw priority. Can't think of a situation where that would have been useful. But it should be simple enough for you to test though.

eaparks

Quote from: fo0bar on May 14, 2019, 12:05:54 AM
I ask because one of my maps is "permitted areas", and another one is "nonpermitted areas". Some of them overlap and I want to ensure the "nonpermitted areas" are always drawn on top of any "permitted areas" - but I need to keep them in separate maps.

Yes, you can do what your asking about above.  You might want to make the permitted areas and non-permitted areas appear as custom colored polygons and you can adjust the draw priority level to have which ever one you want to appear on top.  Maybe one be a colored "x" pattern and the other a colored "-" pattern.  Or just have them as a light solid color.  The example below is 4 custom polygons all with different draw levels with the blue polygon (water on top of the other 2 polygons.  It will take some trial and error to get it just like you want it.



 

fo0bar

Thanks eaparks, this is pretty much exactly what I'm doing!

Both the permitted and non-permitted areas are either red or green - semi-transparent by alternating pixels on every second row. They've also got 2px polyline perimeters. Right now I've got them using different drawpriorities (permitted=14, nonpermitted=15), but as they're both the same category of 'permit', I would like them to be the same drawpriority, but use different draworders - all while keeping them in separate IMG's.

I just need to keep the drawpriorities as condensed as possible due to the sheer number of separate maps I'll be creating/using. I have a feeling this is inherently impossible/unreliable due to the fact the TYP draworders will default to the next-lowest-available if a draworder is skipped within the typ. I think I'm going to have to settle with using different drawpriorities for that one. No biggie.

I've been having issues getting my polygons to display above the land of the basemap, but below its roads/points/water - I've resigned to the fact my polygons are stuck on top of the basemap due to my assumption of one-by-one nature of processing drawpriorities, but seeing your screenshot with the water on top, I was wondering if you might be familiar with doing this, or if the water is part of your own map?

Thanks!

eaparks

The screenshot I attached is just a small area of the map that I thought showed the type of things you were inquiring about. The water is part of my map, all of this map is mine with no base map.  I have used this/my custom transparent map on my Garmin GPS with Garmin's City Navigator or Garmin's Topo Map set to display at the same time and everything does display properly.

Boyd

fo0bar's specific question (if I understood...) was in regard to the effect of polygon draw order when multiple maps of the same draw priority were enabled at the same time. That is an unusal way to use Garmin maps, and I don't see where eaparks addressed that.

But - really - there's something weird with your maps if you are having these issues with basemap conflict. I think you need to sort that out first.

fo0bar

This is right, Boyd - multiple maps of the same drawpriority is the issue. Though after much experimentation, and reading about the TYP format, I've come to the conclusion that the draworders are not 'grouped' into drawpriorities, and it would probably just be bad practice to use the same drawpriorities across multiple IMG's. I'm just going to use unique drawpriorities per map to make sure it's reliable.

In regards to the basemap thing, it's only on basecamp, and nothing seems off on the etrex at all. Would it be possible to ask you (or anyone really) to generate a map, with a single polygon anywhere in the world and a custom TYP for that poly, and upload so that I can test it on my basecamp? This would help me figure out if it's something I'm doing wrong...

Boyd

Sorry, I don't do requests. ;) Too many of my own projects, too little time. But IMO, if you want to use maps on your computer in Basecamp, learn how to properly install them instead of accessing them over USB from the GPS.