GPSFileDepot.com
 

How to generate .mp file content to create highway number signs

Started by staggart, May 29, 2019, 02:03:47 PM

Previous topic - Next topic

staggart

Hi,

I have software to convert .gpx files to .mp files and then to .img files using mkgmap (java app).  I generate free, easy to follow maps for off-road motorcycle riding and racing.

I want to generate the .mp requests to place a highway number sign at a given lat/lon (see example road number signs in attached graphic).  When I read the cgpsmapper docs, it's not obvious.  It seems like I should be able to use a [POI] container and then generate something like the following (I have created a custom _point for type 0x01 that's just a rectangle):

[POI]
Type=0X01
Label=~[0x01]10
Data2=(38.786783,-121.253079)
[END]

The above sort of works - it places a label NEXT to my custom rectangle (not in it).  Here are my questions:


  • I don't use cgpsmapper but rather mkgmap - does mkgmap support the special ~[0x01] sequences that cgpsmapper does?  This seems to be documented nowhere I can find.
  • And on the subject of mkgmap vs. cgpsmapper, why should I use one vs. the other?  All the online docs says to use mkgmap since it's newer and supported.  Can anyone please comment on this.
  • Rather than use a custom point like I am, is there a standard road sign TYPE that I can use.  If so, what is its TYPE code?
  • I am using ~[0x01] as the special text prefix but the cgpsmanual also says ~[0x2A] for an interstate sign symbol.  Which one should it be?  Very confusing in the doc

Thanks in advance for any help




Boyd

Look at section 4.2.7 at the bottom of page 32 and the table on page 33 of the cgpsmapper manual here, it documents this feature pretty well.

https://web.archive.org/web/20160317035905/http://cgpsmapper.com/download/cGPSmapper-UsrMan-v02.5.pdf

I am not familiar with mkgmap, but would *assume* it would work the same. Have you tried?

For the raster-based maps that I make, I actually created my own icons and generated points along the roads to display them. This was a lot of work, but gives me the control I like. My maps cover relatively small areas however. You can see examples in the screenshots here

https://boydsmaps.com/boyds-map-of-the-pines-hd/

This could also be done with Garmin maps if you really want to, but probably not worth the effort.

Regarding cgpsmapper vs mkgmap, I'm still very happy with cgpsmapper and have made some very complex maps with it (also on my website). I don't know what you're trying to do and whether mkgmap would have any advantage. Of course, cgpsmapper is "dead" software so it might make sense to use something that is actively under development. OTOH, Garmin's dedicated GPS devices are also "dying" with fewer models and fewer people purchasing them. ;)

staggart

Quote from: Boyd on May 29, 2019, 04:07:17 PM
Look at section 4.2.7 at the bottom of page 32 and the table on page 33 of the cgpsmapper manual here, it documents this feature pretty well.

https://web.archive.org/web/20160317035905/http://cgpsmapper.com/download/cGPSmapper-UsrMan-v02.5.pdf

I am not familiar with mkgmap, but would *assume* it would work the same. Have you tried?

For the raster-based maps that I make, I actually created my own icons and generated points along the roads to display them. This was a lot of work, but gives me the control I like. My maps cover relatively small areas however. You can see examples in the screenshots here

https://boydsmaps.com/boyds-map-of-the-pines-hd/

This could also be done with Garmin maps if you really want to, but probably not worth the effort.

Regarding cgpsmapper vs mkgmap, I'm still very happy with cgpsmapper and have made some very complex maps with it (also on my website). I don't know what you're trying to do and whether mkgmap would have any advantage. Of course, cgpsmapper is "dead" software so it might make sense to use something that is actively under development. OTOH, Garmin's dedicated GPS devices are also "dying" with fewer models and fewer people purchasing them. ;)

I have read that section of the manual many times and need a concrete example.  Yes, I have tried it with mkgmap and no luck.  I like your maps - nice.  Here's what I am doing: https://www.youtube.com/watch?v=H2JozGFAuuU&list=PLAfSC_jBvt8CuSCwiOnx18VdtpiI8gTrW&index=2&t=0s

For what I and my friends do, we need to stick with garmin stand-alone devices for many reasons.  Phones, etc. will not cut it (think extreme weather, underwater, crashes, etc.).  We go with garmin because as bad and as expensive as they are, at least you can make custom maps for them.  Not sure if that's possible with other manufacturers?  If so, let me know.

Boyd

Quote from: staggart on May 29, 2019, 04:41:37 PMNot sure if that's possible with other manufacturers?  If so, let me know.

There really aren't any "other manufacturers", Garmin is basically the last man standing if you want a dedicated GPS.

Sorry,I got bored and didn't watch much of that video. :)

This is how it works with cgpsmapper, maybe not with mkgmap? Don't know. The following road names in the MP file will create the route icons in the screenshot below.

[POLYLINE]
Type=0x02
Label=~[0x03]48

[POLYLINE]
Type=0x01
Label=~[0x01]295

[POLYLINE]
Type=0x03
Label=~[0x03]601

[POLYLINE]
Type=0x03
Label=~[0x03]629





popej


Boyd

That's true! Guess I'm confused about what the OP is trying to do. The icons are automatically generated when you name the roads correctly. But you will not have any control over where they appear on the road.

If you want them at specific places, you would create POI with bitmaps that contain the icon you want to use. That is something completely different however and would involve creating custom types.

sandersg

In case anyone else is using cgpsmapper to do this,  the easiest way I've found is to open the properties tab for the road of interest and the type of container (shield, square, round, etc ...) can be chosen from a drop down menu.  For multi section road there is a last button which will automatically fill in the last name and container used.