ich kämpfe gerade damit meine top50 karten (mpr format) linuxtauglich zu machen (also z.B. als hintergrundmap für gpsman).
dabei habe ich den mpr2png converter gefunden, läuft aber nur auf IDL
http://www.mfraenz.de/top50/index.html
im zipfile ist die unten angegebene formatbeschreibung von mpr (welches NICHT dem IIwis mpr format entspricht).
hat jemand einen mpr2xy für linux geschrieben, oder es schon mal probiert?
sollte ja nicht so schwer sein, ich hab nur gerade null zeit....
gruß
alex
Dornier MPH/MPR files describe scanned raster maps.
A map is divided into tiles of maximal size 256x256 pixels.
Dornier MPH file structure:
The MPH file contains all auxiliary information like sizes, scales, names and colors
BYTE # comment
0-3 string endian marker
4-43 long words
12 x tilesize
16 y tilesize
20 x tiles
24 y tiles
596 string name of map
..... read until lonword 1 and longword > 1000 is reached
spos 2 long words: scale
spos+8 2 long words ?
spos+16 double pixel per mm of scan
spos+24 long number of calibration points
for each point read:
4 long words pixel pair
2 double latitude/longitude of pixel
32 bytes unknown
9 shorts color table header: header[4] gives number of colors colors
numcol*3 short words RGB values.
Dornier MPR file structure:
The MPR file describes the scanned image only with 1 record per tile.
Tiles start in the upper left corner of map going from left to right then top to bottom.
2 long: 1st record start address and length
then read (start adress)/4-2 times address/length pairs for all records.
then read each record into byte array:
Record structure:
1 short: number N of unicolor segments in tile
X bytes of color/length information for each segment, 1<segment size<256
color values are always 8bit, for 4bit color tables, these are pairs of colors.
reading:
read 8 bit color
read next length value only if previous was larger than 2
if first bit of next length value is 1, stick with previous lenghth
read next length value bit by bit until larger than previous one then go back 1 bit
if length=2 only color values follow, but start at full byte boundary
Y bytes of LZW encoded image data, encoding uses alphabet of where codes 0-255 colors,
codes 256-(255+N) segment indices.
coding starts with 9 bit and increases up to 12bit, new code length starts at byte boundary.
Markus Fraenz mfraenz@xxxxx March 2004 for non-commercial use only.