[gdal-dev] using GIO driver to create grids

Andrew.Loughhead at c... Andrew.Loughhead at c...
Fri Apr 5 02:12:45 EST 2002


Thanks for the suggestion Frank. The same thing does seem 
to happen in gdal_translate. Some details follow...

I have made a small test grid in Grid with demshd(), which is 
to say that its an integer grid, and that its values are in 
the range 52-248. This is called dshd. Then:

gdal_translate.exe -of GTiff -ot byte dshd dshd.tif
Size is 260, 237
0.Band 1 Type = 5
..10...20...30...40...50...60...70...80...90...100 - done.

and the result is good (loads in Photoshop, looks fine). 
Then to try the reverse:

gdal_translate.exe -of GIO -ot Float32 dshd.tif gdal_dshd
Size is 260, 237
0.Band 1 Type = 1
..10...20...30...40...50...60...70...80...90...100 - done.

and I end up with a grid, it lists in arcinfo, a describe in 
arcinfo shows it as having min=0.0, max=248.0, and of course 
its a Floating Point grid, as GDAL doesn't yet write Integer 
grids. However, when drawn or interrogated, the grid gdal_dshd 
is all nodata. If I make a new grid from it with 
Grid: gdal_dshd2 = int(gdal_dshd), Grid reports that all cells 
in the new grid are nodata. 

I'm using gdal-1.1.6, built with MSVC 6, avgridio.dll is from 
Arcview3.2. 

Anything more I can try to diagnose this? 

Andrew.

> -----Original Message-----
> From: Frank Warmerdam [mailto:warmerdam at p...]
> Sent: Friday, 5 April 2002 6:13 AM
> To: gdal-dev at yahoogroups.com
> Subject: Re: [gdal-dev] using GIO driver to create grids
> 
> 
> ------------------------ Yahoo! Groups Sponsor 
> ---------------------~-->
> Buy Stock for $4.
> No Minimums.
> FREE Money 2002.
> http://us.click.yahoo.com/k6cvND/n97DAA/ySSFAA/E5z3lB/TM
> --------------------------------------------------------------
> -------~->
> 
> Andrew.Loughhead at c... wrote:
> > 
> > Just wondering if anyone has a working example of using the 
> > GIO driver to create new ESRI grids, that they could share 
> > with me, either using the C++ or C interface. Along the lines 
> > of Franks tutorial is what I'm hoping for. I have code that 
> > creates a grid and apparently writes to it, but when looked 
> > at in Arc/Info, the results are entirely nodata. 
> 
> Andrew,
> 
> Any possibility you aren't closing the destination dataset properly?
> 
> Does gdal_translate to GIO format work?
> 
> Best regards,
> 
> -- 
> ---------------------------------------+----------------------
----------------
> I set the clouds in motion - turn up | Frank Warmerdam, 
> warmerdam at p...
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial 
> Programmer for Rent
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/ 
> 
> 




More information about the Gdal-dev mailing list