[Gdal-dev] gdalwarp on CADRG / gltp: maps

Frank Warmerdam fwarmerdam at gmail.com
Fri May 20 12:54:34 EDT 2005


On 5/20/05, Leibold, David <leibold at lsec.dnd.ca> wrote:
> Also tried pre-processing with gdal_translate - even trying -b switches to try different image bands than #4 Alpha. Still got black maps.

David, 

I think the first step is to get gdal_translate working on the dataset. 
If that isn't working, then the issue is likely a problem with the ADRG
driver in OGDI (or possibly the GDAL OGDI driver).  

To be honest I get confused about this to.  I tried it out with a 
1:1M CADRG dataset I have here.  When I do a gdalinfo on the dataset
I get alot of subdatasets:


Subdatasets:
  SUBDATASET_1_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:50K at 1@CADRG at DMAAC@3":Matrix
  SUBDATASET_1_DESC=1:50K at 1@CADRG at DMAAC@3 as Matrix
  SUBDATASET_2_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:50K at 2@CADRG at DMAAC@4":Matrix
  SUBDATASET_2_DESC=1:50K at 2@CADRG at DMAAC@4 as Matrix
  SUBDATASET_3_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:1M at 1@CADRG at DMAAC@5":Matrix
  SUBDATASET_3_DESC=1:1M at 1@CADRG at DMAAC@5 as Matrix
  SUBDATASET_4_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:1M at 2@CADRG at DMAAC@6":Matrix
  SUBDATASET_4_DESC=1:1M at 2@CADRG at DMAAC@6 as Matrix
  SUBDATASET_5_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:250K at 1@CADRG at DMAAC@7":Matrix
  SUBDATASET_5_DESC=1:250K at 1@CADRG at DMAAC@7 as Matrix
  SUBDATASET_6_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:250K at 2@CADRG at DMAAC@8":Matrix
  SUBDATASET_6_DESC=1:250K at 2@CADRG at DMAAC@8 as Matrix
  SUBDATASET_7_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:50K at 1@CADRG at DMAAC@3":Image
  SUBDATASET_7_DESC=1:50K at 1@CADRG at DMAAC@3 as Image
  SUBDATASET_8_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:50K at 2@CADRG at DMAAC@4":Image
  SUBDATASET_8_DESC=1:50K at 2@CADRG at DMAAC@4 as Image
  SUBDATASET_9_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:1M at 1@CADRG at DMAAC@5":Image
  SUBDATASET_9_DESC=1:1M at 1@CADRG at DMAAC@5 as Image
  SUBDATASET_10_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:1M at 2@CADRG at DMAAC@6":Image
  SUBDATASET_10_DESC=1:1M at 2@CADRG at DMAAC@6 as Image
  SUBDATASET_11_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:250K at 1@CADRG at DMAAC@7":Image
  SUBDATASET_11_DESC=1:250K at 1@CADRG at DMAAC@7 as Image
  SUBDATASET_12_NAME=gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:250K at 2@CADRG at DMAAC@8":Image
  SUBDATASET_12_DESC=1:250K at 2@CADRG at DMAAC@8 as Image

I tried accessing these individual subdatasets, and it seems the first
two were just all black at "full res" and show a coarse grid at reduced
resolutions.  But the third one was a respectible dataset.   Furthermore,
the command: 

 gdalwarp -t_srs '+proj=utm +zone=12 +datum=WGS84'
'gltp:/rpf/gdal/usr2/data/rpf/cadrg1M/rpf:"1:1M at 1@CADRG at DMAAC@5":Matrix'
~/out.tif

Turn it into a decent reprojected image. 

So, I think the key is to try each of the subdatasets and discover
which are "real" images of interest.  Then warp those. 

The good news is that it does work with CADRG in at least some 
situations. 

Good luck,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Gdal-dev mailing list