[Gdal-dev] writing to GRID
Frank Warmerdam
warmerdam at pobox.com
Thu Apr 20 10:04:40 EDT 2006
Prosperi, Paolo (SDRN) wrote:
> Hi all.
> I'm a newbie of GDAL and surely NOT a programmer.
> The standard executable of GDAL 1.3.1 works smoothly on my windows 2000
> platform until I try to write to esri grid formats.
>
> In particular, when I use the command gdal_merge and the AAIGrid output
> format:
>
> gdal_merge -o my-path\my-grid -of AAIGrid -n 0 my-image1 my-image2
>
> I get as error:
>
>
> ERROR 6: GDALDriver::Create() ... no create method implemented for this
> format.
>
> Traceback (most recent call last):
> File "C:\Programs\FWTools\bin\gdal_merge.py", line 450, in ?
> t_fh.SetGeoTransform( geotransform )
> AttributeError: 'NoneType' object has no attribute 'SetGeoTransform'
Paolo,
I have added some error checking in gdal_merge.py to report this failure
more nicely.
> Instead, if I try to use the GIO driver:
>
> gdal_merge -o %path%\my-image -of GIO -n 0 my-image1 my-image2
>
> I simply get:
>
> Format driver GIO not found, pick a supported driver.
Right. In fact the GIO driver has been removed since 1.3.1 since it hardly
ever works properly.
> The question is:
> given I haven't got a clue on how to compile GDAL from source, is anybody so
> kind to pass me a windows executable version of GDAL with working GIO/AAIGrid
> driver?
You will just need to merge the file to a format that supports
direct creation and random writing such as GeoTIFF (driver name GTIFF) or
Erdas Imagine (driver name HFA). Then use gdal_translate to convert to
AAIGRID. Some drivers, such as the AAIGRID driver can only operate by
copying from a preexisting file.
eg.
gdal_merge -o work.tif -n 0 my-image1 my-image2
gdal_translate -of AAIGRID work.tif my.grd
Best regards,
--
---------------------------------------+--------------------------------------
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 | President OSGF, http://osgeo.org
More information about the Gdal-dev
mailing list