[Gdal-dev] Several questions

Frank Warmerdam warmerdam at pobox.com
Tue Apr 13 13:26:10 EDT 2004


Romano J M Silva wrote:
> Hello all,
> 
> I have several questions to ask I tought it would be better to stick
> them all in one message,
> 
> 1) This one I've already sent to the list, but I will try it again Does
> anyone know a GUI software to georeference a TIFF image. I have
> (pixel,line) and (X,Y) relationship and I want to georeference the image
> based on this information.

Romano,

I don't know of a free GUI package to do this. It can be down with the
GCPWorks program from PCI Geometics.  Most other image processing
vendors likely have mechanisms as well.  It can be done at the commandline
with gdal_translate, and in a gui/commandline enviroment with GRASS.

> 2) On a paletted image which uses a colortable, is it guaranteed that
> the same colortable fits for all its overviews?

I believe that paletted images with overviews should use the same palette
for the overviews as the main image.  I wouldn't say it is guaranteed, but
I generally write my application level code to assume that.

> 3) Is there any documentation of the internals of RasterIO function?
> What I am interested to know is how much memory is fetched at once in a
> RasterIO operation and what is the effect of loading a non-optimal block.

There is no such documentation.  Some memory issues are driver specific, but
the general implementation of RasterIO() (which makes cachable block requests
to the low level driver) will read one block request at a time, copy the
data required out into the working buffer (passed in by the user) and then
release that block into the cache.  The caching code will attempt to flush out
the least recently used block if adding a new block puts things over the global
GDAL caching limit.

> 4) What are tiled images and how can I create one?

A tiled images is one where the "block size" or natural unit of access
is less wide than a scanline and less high than the image.  The most common
(non-tiled) image organization is to treat each scanline as a block.  However,
accessing a small window of data is inefficient on a large image with this
organization because so much uneeded scanline data is fetched and ignored.

A tiled image splits the image into smallish squares (often 128x128 or
256x256) so that local read operations can be done efficiently even on very
large images.

> 5) Is there a way to know the if the image is RGB or CMY without loading
> the bands individually, at the dataset level?

No.  I would add that unusual color spaces like CMY and CMYK are not
well supported in GDAL drivers though in theory the high level API is
ready for them.

> 6) When getRasterXSize and getRasterBandXSize will generate different
> results?

The overviews of a band also have GDALRasterBand objects associated with
them.  If you fetch the overview band objects they will have a different
xsize and ysize than the base band or the dataset.

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    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list