>          err = gdal.Grid(dataset, ds, options=opts)
>          if err != 0:
>              print 'gdalGrid error: ', err
>              return
> 
> The above code is basically the same as what I use for
> gdal.RasterizeLayer() and that worked fine.

gdal.Grid() prototype is

def Grid(destName, srcDS, **kwargs):
    """ Create raster from the scattered data.
        Arguments are :
          destName --- Output dataset name
          srcDS --- a Dataset object or a filename
        Keyword arguments are :
          options --- return of gdal.GridOptions(), string or array of strings
          other keywords arguments of gdal.GridOptions()
        If options is provided as a gdal.GridOptions() object, other keywords 
are ignored. """

So the first argument must be a filename, not a dataset. Only a few utilities 
accept updating an existing dataset. gdal.Grid() will generate a new output 
dataset.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to