GPSFileDepot.com
 

News:

Welcome to GPSFileDepot!

Main Menu

new raster converter, overlapping points?

Started by Dana, February 10, 2009, 07:39:18 PM

Previous topic - Next topic

Dana

I'm working on code for a new raster map converter for Garmin units.  I've tried MOAGU, Mapwel, and Bmap2mp, but none seem to work for my application.  MOAGU produces good quality images, but is very slow (and for some reason, in the wrong place).  The other two don't provide anywhere near the quality I need for aeronautical charts.  The main problem is that all three of these programs are optimized for larger scale maps like 24K topos, not 1:500000 or 1:1000000 aeronautical charts, and for much closer zoom settings on the unit.  These maps will be intended to never zoom closer than the 1.2 or 2 mile settings, with 3 or 5 miles more likely.

Anyway, I'm taking the same approach as MOAGU (custom points to simulate raster pixels), also using cgpsmapper to convert the polish file my program creates into the img file.  At this point I have the conversion of the bitmap image into points in the polish file fairly well in hand (using the freeware Image Magick to handle some of the image processing), though I'm still fiddling with the coordinate conversion from the aero chart's Lambert conformal conic projection.

Question:  What I'm not clear on, is how the GPS unit will handle overlapping points and/or map tiles.  IOW, if the points (which are single pixels) are more closely spaced than the GPS's pixel resolution (either due to a not exact scaling or if it's zoomed out), how does it handle this?  Also what happens if two adjacent map tiles overlap (or is that even allowed)?

-Dana

Stoaty

I would ask Leszek, author of MOAGU these questions.  He is probably in the best postion to give an accurate answer.  However, I think he is pretty busy for the next week or so and may not respond to emails immediately.

Dana

It's a 60CSx...

Another question:  What are the allowable types for custom points?  I was under the impresoin that if I defined a custom point in the TYP file, it would override any pre-existing definition of that type... but that doesn't seem to be happening.  In my case I'm trying to define up to 256 types, each a single pixel of a different color.  I tried 0x01 through 0xFF, no subtypes, but all I got was a variety of other point styles... and I tried oxB001 through 0xB0FF, and got nothing (lots of question marks in Mapedit).  I feel like I'm missing something obvious.

-Dana

Boyd

I have not worked with custom points, just custom lines and polygons. My experience is that what you see in mapedit and mapsource is very different from what you see on the GPS itself. What do these ppints look like on the 60csx when compiled/combined into a test .img and .typ file?

Dana

OK, more specifics:

I've tried 0xB000-OXB0FF, Ox00-0x100, and 0x011500-011600, all with a single line (instead of subtypes) declaration.  The 0x00 series gives me a jumble of existing point types on the screen, the 0x011500 series gives me a few generic green points, but nothing more.  Shouldn't I be able to redefine the existing point definitions?

In the .typ file:

[_point]
Type=0x0001
Xpm=1 1 1 1
"X c #FFFFFF"
"X"
[end]

[_point]
Type=0x0002
Xpm=1 1 1 1
"X c #B5CE94"
"X"
[end]



And in the .mp file:

[POI]
Type=0x0001
Endlevel=0
Data0=(41.9992801088252,-72.9825082407855)
[END]

[POI]
Type=0x0011
Endlevel=0
Data0=(41.999370319305,-72.9800926456079)
[END]

(This is the one with the jumble of standard POI types, where I should see lots of single pixel points in my defined colors).

The attachment shows what I'm getting, instead.

What am I missing?

-Dana

Dana

Yes, of course, what I posted is the source txt file I compiled into a typ file with cgpsmapper, then combined with the cgpsmapper-created img file into gmapsupp.img using sendmap. 

I'm hoping somebody will see something obvious wrong with the point definitions in either my typ data or the mp file.

-Dana

Dana

Hmmm, yes, well maybe that one was a bad example... I've tried so many different hex types that I'm losing track.  But mostly I've used types that I know to be point types... and still no joy... I either get standard icons or nothing (blank screen, just a background showing where the map supposedly is).

I thought extracting the color information from the bitmap file, converting from a conic projection, and establishing a precise lat/long for each pixel would be the hard part, but it's the custom point thing that has me stumped.

-Dana

Dana

Ah HA!

Such a simple thing... isn't it always?  I was missing the quotation marks on the XPM definition.

Xpm=1 1 1 1
should have been
Xpm="1 1 1 1"

I'm also using types 0x77 through 0xFF with subtypes 0x11-13 because that's the last thing I tried before noticing the missing quotes.

I still have a ways to go, but the map is on the screen, readable at at least one zoom level, and in the right place!  Yee Hah!

-Dana