Opened 14 years ago
Closed 11 years ago
#3380 closed enhancement (fixed)
OziExplorer .MAP file should be useable with all file formats, not only GIF
Reported by: | jcrepetto | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.0 |
Component: | GDAL_Raster | Version: | 1.7.0 |
Severity: | normal | Keywords: | |
Cc: | dron, Even Rouault |
Description
OziExplorer can read many standard and proprietary file formats : TIFF, BMP, JPG, PNG, BSB, BSB 4, BSB 5, ECW, MrSID, OZF2, OZFX3, Maptech Terrain Navigator maps (.024,.100,.250) and Maptech Aeronautical charts (.AER), RIK, Kompass
Not all of these formats are supported by GDAL, but it should be possible to use .MAP files with other formats than GIF.
Attachments (3)
Change History (13)
comment:1 by , 14 years ago
Version: | unspecified → 1.7.0 |
---|
follow-up: 3 comment:2 by , 14 years ago
Cc: | added |
---|
comment:3 by , 14 years ago
Replying to rouault:
I see that there is a GDALReadOziMapFile() function that could be
utilized in other drivers too. I presume in 1.7 Andrey implemented use of it in the GIF driver because that is where he needed it.
That is true. I needed it for GIF files, also I've seen its usage with JPEG and BMP files, so these ones could be added first.
I am agree that some consistency is needed in this area. In first of all we need to secure an order of external georeferencing lookup to ensure that all drivers will read external files in the same way. What about adding the special function GDALReadExternalGeoref() which in turn will call functions to read world files, mapinfo and ozi files? Individual drivers will call that function instead of sequence of GDALReadWorldFile(), GDALReadTabFile() etc. That function can take the list of possible external georeferencing file formats to search, so we can avoid reading everything if we don't want to. Something like:
GDALReadExternalGeoref(int nGeoFormats) where nGeoFormats is a combination of flags READ_ALL --- try all possible external formats, READ_WORLD --- read world file only, READ_MAPINFO_TAB --- read Mapinfo .TAB file only, READ_OZI --- read Ozi Explorer .MAP file.
Performance issue remains though.
comment:4 by , 14 years ago
Replying to jcrepetto:
it should be possible to use .MAP files with other formats than GIF.
I think there is another way of getting this functionality. You may think of .MAP file as another virtual format, something like .VRT. It contains a link to an image file, projection, datum, so why not.
I've made a sample script for converting .MAP into .VRT. Perhaps someone would be interested to have a look, so I'll attach it here.
BTW: It seems there is a bug with a current implementation of .MAP projections. At least for Mercator it produces +k=0 by default, then the PROJ is not happy about it.
follow-up: 6 comment:5 by , 14 years ago
Hi,
with python 2.4.4 I get this error from ozi2vtr.py:
File "./ozi2vrt.py", line 30 return out[0] if out else default ^ SyntaxError: invalid syntax
?
thanks, Hamish
comment:6 by , 14 years ago
Replying to hamish:
Hi,
with python 2.4.4 I get this error from ozi2vtr.py:
File "./ozi2vrt.py", line 30 return out[0] if out else default ^ SyntaxError: invalid syntax
Hi! That was fine with python 2.6.4, but hdr_subparm() were not needed at all as it was mere leftover from my kap2vrt.py script. I'll upload a "trimmed" version
comment:7 by , 13 years ago
Hello, I'm posting a newer version of my ozi reader script. It supports more projections/datums, so have a look if interested.
by , 13 years ago
Attachment: | ozi2gdal.py added |
---|
an enhanced version of the script to convert .MAP file into .VRT
comment:8 by , 13 years ago
for ones interested in, the latest version of the ozi2gdal.py can be found here http://talk.maemo.org/showthread.php?t=57469
comment:9 by , 11 years ago
Cc: | added |
---|
To fix this ticket, I am submitting a new driver for OziExplorer .MAP files. With this driver, every image file format supported by GDAL will be supported in .map files. It won't be necessary to add a new autotest script, because the current OZI driver test will test both OZF2 files and MAP files.
comment:10 by , 11 years ago
Component: | default → GDAL_Raster |
---|---|
Milestone: | → 1.10.0 |
Resolution: | → fixed |
Status: | new → closed |
Committed in r25287 (with a few minor fixes). Thanks
Quoting Frank on http://lists.osgeo.org/pipermail/gdal-dev/2010-January/023328.html :