[ gpsdrive ] noaa charts 11466_1

Hamish hamish_b at yahoo.com
Thu Nov 20 15:18:26 AKST 2008


Chris h wrote:
> > Downloaded the chart and updates from NOAA service
> > http://www.nauticalcharts.noaa.gov/index.html

downloading it now...


> Not sure whats going on here as gdalinfo reports:

good; gdalinfo is your friend.

> -----------------------------------------------------------
> Driver: BSB/Maptech BSB Nautical Charts
> Files: 11466_1.KAP
> Size is 8732, 12349
> Coordinate System is `'

                      ^^^ 

The map's projection is undefined.


> GCP Projection = 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]],AXIS["Lat",NORTH],AXIS["Long",EAST],AUTHORITY["EPSG",4326]]

But it has embedded Ground Control Points. These tie sparse pixel
positions in the image to a particular geographic coordinate, in this
case those coords are in lat/lon WGS84. -- what we want for GPS work.


> GCP[  0]: Id=GCP_1, Info=
>           (3407,11331) ->
> (-80.3331027778,25.5836972222,0)
....

pixel 3407,11331 in image is 80d20'W, 25d30'N

> Corner Coordinates:
> Upper Left  (    0.0,    0.0)
> Lower Left  (    0.0,12349.0)
> Upper Right ( 8732.0,    0.0)
> Lower Right ( 8732.0,12349.0)
> Center      ( 4366.0, 6174.5)

if georeferenced these would be geographic coords, not pixel coords.


> So clearly the charts should work fine. Will start with re-installing
> qgis to see if I can get that to work first. Then move back to
> gpsdrive. Using gdal version svn 1.6 to do the translations.


you need to run gdalwarp to convert flat image + GCPs into a GeoTiff,

"gdalwarp 11466_1.KAP 11466_1.tif"


automated:

for NUM in 1 2 3 ; do
   gdalwarp -q 11466_$NUM.KAP 11466_$NUM.tif
done


then gdalinfo reports full coord system info and corner coords:

Driver: GTiff/GeoTIFF
Files: 11466_1.tif
Size is 9318, 11913
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.2572235629972,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-80.605327517622371,26.401578458594592)
Pixel Size = (0.000074846880438,-0.000074846880438)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -80.6053275,  26.4015785) ( 80d36'19.18"W, 26d24'5.68"N)
Lower Left  ( -80.6053275,  25.5099276) ( 80d36'19.18"W, 25d30'35.74"N)
Upper Right ( -79.9079043,  26.4015785) ( 79d54'28.46"W, 26d24'5.68"N)
Lower Right ( -79.9079043,  25.5099276) ( 79d54'28.46"W, 25d30'35.74"N)
Center      ( -80.2566159,  25.9557530) ( 80d15'23.82"W, 25d57'20.71"N)



Hamish



      



More information about the GPSdrive mailing list