[Qgis-developer] Raster layer datasource
Mauricio
mauricio.dev at gmail.com
Wed Feb 27 16:28:16 EST 2008
Ok. I'll just use gdal the bindings then. But it is kind of breaking qgis'
software engineering as they already have a layer abstraction to this kind of
data. :/
Hum... Is there any known effort to make raster tools for qgis that i could
join?
Thanks for the replies!
Maurício de Paulo - Cartographer Engineer
Em Wednesday 27 February 2008 17:38:00 Frank Warmerdam escreveu:
> Peter Ersts wrote:
> > Maurício de Paulo,
> >
> > Currently there are no public methods in QgsRasterLayer class that
> > provide access to pixel level data; the class right now is really not
> > much more than a rendered. This is something that has been discussed but
> > will likely not be available in the immediate future. Your best approach
> > right now would be to open the image with GDAL yourself, process, write
> > our a new image, pass that to qgis to load; not idea but all possible
> > from within a plugin without too much hassle.
> >
> > One option that we may consider is to move the GDALDataSetH from private
> > to protected so that you could at least inherit QgsRasterLayer to extend
> > it yourself.
> >
> > Please keep us up to date with what you are working on. There are a
> > number of users who are interested in similar functionality and it would
> > be nice to see some joint effort putting together a nifty raster
> > manipulation plugin; components of which can be consider at a later time
> > for inclusion to the raster core.
>
> Folks,
>
> I would add there are mechanisms in GDAL to apply arbitrary processing
> algorithms to imagery as it is read using virtual files. For some
> applications this might be appropriate. I gather there is also some work
> going on for pixel processing functions within the qgis raster renderer
> that might be applicable for other purposes.
>
> However, for the particular one mentioned, I think Pete's suggestion of
> opening the file yourself is best. I would note that datasets are normally
> opened in readonly mode for the QgsRasterLayer, so it will be hard to use
> this dataset handle to update files. Opening an existing file for update
> access, when it is already open for read access in another part of QGIS
> could result in errors or even crashes in some circumstances. So if you
> want to do a sort of batch processing, writing the results to a new file
> is the most safe approach.
>
> Best regards,
More information about the Qgis-developer
mailing list