[gdal-dev] Problem with gdalsrsinfo on some NOAA bsb/kap files

Robb Wright robbkwright at gmail.com
Fri Nov 9 14:24:43 PST 2012


I just tried it on another machine on a number of .kaps - and some were 
working and some were not - but they were different ones. Then I went 
back to my first machine and I got the proper result, then ran it again 
and got the error.  Something must be dodgy with my libraries/how I have 
it installed, but I can't imagine why it would work some times and not 
others on the same file.

If somebody else could try running it multiple times on the same file, 
I'd be curious about their result.  Below is a link to a set of 4.  
Right now I'm getting errors on _1, _2 - but getting results for 
_3,_4.    Nutty.
http://www.charts.noaa.gov/RNCs/11308.zip
gdalsrsinfo.exe -o proj4  11308_1.KAP
gdalsrsinfo.exe -o proj4  11308_2.KAP
gdalsrsinfo.exe -o proj4  11308_3.KAP
gdalsrsinfo.exe -o proj4  11308_4.KAP

BTW, I'm using gdalsrsinfo from today's 
http://www.gisinternals.com/sdk/PackageList.aspx?file=release-1600-x64-gdal-1-9-mapserver-6-0.zip

Robb


On 11/9/2012 3:29 PM, Even Rouault wrote:
> Le vendredi 09 novembre 2012 21:11:56, Robb K. Wright a écrit :
>> I'm trying to use gdalsrsinfo (1.9) to extract out WKT-formatted info
>> from NOAA's BSB/KAP files.  It works on many - but has problems with
>> others - and I can't find a pattern.  I'm not sure if it is a problem
>> with the BSB driver or with gdalsrsinfo, but I'm leaning toward
>> gdalsrsinfo as the problem because I'm not having problems on the files
>> when running the other gdal tools on them (translate/gdaladdo/etc).
>>
>> Any suggestions would be appreciated.
>>
>> The link below is an example of a file that is giving me problems:
>> http://www.charts.noaa.gov/RNCs/11532.zip
>>
>> Running:  gdalsrsinfo -V 11532_1.KAP
>> gives me:
>> Validate Fails - SRS is not well formed
>> PROJ.4 : ''
>> OGC WKT :
>> "!CRR/ThiselectronicchartwasproducedundertheauthorityofUSA-NOAA/NOS.Byusing
>> thischartyouacknowledgethatyouhaveread"
> Are you sure you are not confusing 11532.BSB and 11532_1.KAP ? I indeed get
> the error you had, but on 11532.BSB which is not a GDAL recognized dataset.
> 11532_1.KAP just works fine and gdalsrsinfo -V 11532_1.KAP output is :
> Validate Succeeds
>
> PROJ.4 : '+proj=merc +lon_0=-79 +lat_ts=0 +x_0=0 +y_0=0 +ellps=WGS84
> +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '
>
> OGC WKT :
> PROJCS["Global Mercator",
>      GEOGCS["WGS 84",
>          DATUM["WGS_1984",
>              SPHEROID["WGS 84",6378137,298.257223563,
>                  AUTHORITY["EPSG","7030"]],
>              TOWGS84[0,0,0,0,0,0,0],
>              AUTHORITY["EPSG","6326"]],
>          PRIMEM["Greenwich",0,
>              AUTHORITY["EPSG","8901"]],
>          UNIT["degree",0.0174532925199433,
>              AUTHORITY["EPSG","9108"]],
>          AUTHORITY["EPSG","4326"]],
>      PROJECTION["Mercator_2SP"],
>      PARAMETER["standard_parallel_1",0],
>      PARAMETER["latitude_of_origin",0],
>      PARAMETER["central_meridian",-79],
>      PARAMETER["false_easting",0],
>      PARAMETER["false_northing",0],
>      UNIT["Meter",1]]
>



More information about the gdal-dev mailing list