[gdal-dev] Creating a KAP/BSB

Paul Higgins phigginsca at yahoo.com
Thu Aug 27 19:07:19 PDT 2020


 Please cancel this.  I found the problem. Nothing to do with GDAL.
Thanks
    On Friday, August 28, 2020, 03:57:55 a.m. GMT+8, Paul Higgins <phigginsca at yahoo.com> wrote:  
 
 I have a process to create a KAP/BSB file as follows:- 1. Create a GIF- 2. From the GIF Create a TIF- 3. From the TIF create a KAP- 4. Read the KAP into a Navigation program.
For the 2nd process I use a image processing routine called CXIMAGE which works well except if the GIF is very large then it fails trying to load it. So I decided to use "gdal_Translate input.gif ouput.tif". This seems to work except the resulting KAP is unreadable by the navigation program.  So there must be a difference in the TIF created by the CXIMAGE and gdal_translate.
Here is gdalinfo of the input GIF:C:\SAT2CHART\SAT2CHART.Testing\temp>gdalinfo _temp_SP_KAP_1598583387_.gifDriver: GTiff/GeoTIFFFiles: _temp_SP_KAP_1598583387_.gifSize is 2303, 2047Coordinate System is:LOCAL_CS["WGS 84 / Pseudo-Mercator",    UNIT["metre",1,        AUTHORITY["EPSG","9001"]]]GeoTransform =  1.262783522530797e+93, 3.8435366748478e-57, 8.467125104458958e+175  3.983892464727202e+252, 3.247326554715089e+35, 5.751476576395799e-153Metadata:  AREA_OR_POINT=AreaImage Structure Metadata:  INTERLEAVE=BANDCorner Coordinates:Upper Left  (1262783522530796746737479706828132315251220510125960098188045561858895670625330307346101960704.000,3983892464727202554888960554269713030196205758904239846941521902545445025437834361819163746941457672362766848308926612078115418501685410889087779378869932632608114241119219770776413111973463633846695245205724734052201855595075165452848877534656742817792.000)Lower Left  (173322050888274871313974395830280214368407169322874580391539706268399546036028454145435710880656476220319189266728520997656174731970960279022450462303754875301100115619306276913152.000,3983892464727202554888960554269713030196205758904239846941521902545445025437834361819163746941457672362766848308926612078115418501685410889087779378869932632608114241119219770776413111973463633846695245205724734052201855595075165452848877534656742817792.000)Upper Right (1262783522530796746737479706828132315251220510125960098188045561858895670625330307346101960704.000,3983892464727202554888960554269713030196205758904239846941521902545445025437834361819163746941457672362766848308926612078115418501685410889087779378869932632608114241119219770776413111973463633846695245205724734052201855595075165452848877534656742817792.000)Lower Right (173322050888274871313974395830280214368407169322874580391539706268399546036028454145435710880656476220319189266728520997656174731970960279022450462303754875301100115619306276913152.000,3983892464727202554888960554269713030196205758904239846941521902545445025437834361819163746941457672362766848308926612078115418501685410889087779378869932632608114241119219770776413111973463633846695245205724734052201855595075165452848877534656742817792.000)Center      (86661025444137435656987197915140107184203584661437290195769853134199773018014227072717855440328238110159594633364260498828087365985480139511225231151877437650550057809653138456576.000,3983892464727202554888960554269713030196205758904239846941521902545445025437834361819163746941457672362766848308926612078115418501685410889087779378869932632608114241119219770776413111973463633846695245205724734052201855595075165452848877534656742817792.000)Band 1 Block=2303x3 Type=Byte, ColorInterp=Palette  Color Table (RGB with 256 entries)    0: 100,96,52,255    1: 136,152,136,255    2: 60,120,96,255    3: 80,60,56,255

I did a gdalinfo of the tif created by the CXIMAGE program:C:\SAT2CHART\SAT2CHART.Testing\temp>gdalinfo "USING CXIMAGE_SP_KAP_1598534936_.tif"Driver: GTiff/GeoTIFFFiles: USING CXIMAGE_SP_KAP_1598534936_.tifSize is 2303, 2047Coordinate System is `'Metadata:  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)  TIFFTAG_XRESOLUTION=96  TIFFTAG_YRESOLUTION=96Image Structure Metadata:  INTERLEAVE=BANDCorner Coordinates:Upper Left  (    0.0,    0.0)Lower Left  (    0.0, 2047.0)Upper Right ( 2303.0,    0.0)Lower Right ( 2303.0, 2047.0)Center      ( 1151.5, 1023.5)Band 1 Block=2303x3 Type=Byte, ColorInterp=Palette  Color Table (RGB with 256 entries)    0: 8,0,8,255    1: 8,8,12,255
and a gdalinfo of the TIF created by gdal_translate:C:\SAT2CHART\SAT2CHART.Testing\temp>gdalinfo "USING GDAL_SP_KAP_1598538217_.tif"Driver: GTiff/GeoTIFFFiles: USING GDAL_SP_KAP_1598538217_.tifSize is 2303, 2047Coordinate System is:LOCAL_CS["WGS 84 / Pseudo-Mercator",    UNIT["metre",1,        AUTHORITY["EPSG","9001"]]]GeoTransform =  1.262783522530797e+93, 3.8435366748478e-57, 8.467125104458958e+175  3.983892464727202e+252, 3.247326554715089e+35, 5.751476576395799e-153Metadata:  AREA_OR_POINT=AreaImage Structure Metadata:  INTERLEAVE=BANDCorner Coordinates:Upper Left  (1262783522530796746737479706828132315251220510125960098188045561858895670625330307346101960704.000,3983892464727202554888960554269713030196205758904239846941521902545445025437834361819163746941457672362766848308926612078115418501685410889087779378869932632608114241119219770776413111973463633846695245205724734052201855595075165452848877534656742817792.000)Lower Left  (173322050888274871313974395830280214368407169322874580391539706268399546036028454145435710880656476220319189266728520997656174731970960279022450462303754875301100115619306276913152.000,3983892464727202554888960554269713030196205758904239846941521902545445025437834361819163746941457672362766848308926612078115418501685410889087779378869932632608114241119219770776413111973463633846695245205724734052201855595075165452848877534656742817792.000)Upper Right (1262783522530796746737479706828132315251220510125960098188045561858895670625330307346101960704.000,3983892464727202554888960554269713030196205758904239846941521902545445025437834361819163746941457672362766848308926612078115418501685410889087779378869932632608114241119219770776413111973463633846695245205724734052201855595075165452848877534656742817792.000)Lower Right (173322050888274871313974395830280214368407169322874580391539706268399546036028454145435710880656476220319189266728520997656174731970960279022450462303754875301100115619306276913152.000,3983892464727202554888960554269713030196205758904239846941521902545445025437834361819163746941457672362766848308926612078115418501685410889087779378869932632608114241119219770776413111973463633846695245205724734052201855595075165452848877534656742817792.000)Center      (86661025444137435656987197915140107184203584661437290195769853134199773018014227072717855440328238110159594633364260498828087365985480139511225231151877437650550057809653138456576.000,3983892464727202554888960554269713030196205758904239846941521902545445025437834361819163746941457672362766848308926612078115418501685410889087779378869932632608114241119219770776413111973463633846695245205724734052201855595075165452848877534656742817792.000)Band 1 Block=2303x3 Type=Byte, ColorInterp=Palette  Color Table (RGB with 256 entries)    0: 100,96,52,255    1: 136,152,136,255    2: 60,120,96,255    3: 80,60,56,255    4: 212,180,204,255
 have tried the following options to gdal_translate with no success:-- options = '-co PROFILE=BASELINE'-- options = '-b 1 -b 2 -b 3'-- options = '-co PHOTOMETRIC=CMYK'    -- options = '-co PHOTOMETRIC=MINISBLACK'   -- options = '-co PHOTOMETRIC=YCBCR'   CIELAB -- options = '-co PHOTOMETRIC=CIELAB'
Any help would be appreciate,






  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200828/2a6a6481/attachment-0001.html>


More information about the gdal-dev mailing list