[gdal-dev] Newbee - pointers needed

Even Rouault even.rouault at mines-paris.org
Thu Jul 9 14:23:31 EDT 2009


Le Thursday 09 July 2009 00:49:23 Smart, Gary, vous avez écrit :
> > >
> > > 1)       How to register map files with the GDAL.
> >
> > You don't "register" maps with GDAL. You open datasets with GDALOpen()
>
> I presume a 'dataset' be more than a single georeferenced file?  i.e. it
> could be a suite a files which together form a greater 'image'.  Or is it
> the case that the application is responsible for maintaining the special
> relationships between composite files?  Does GDAL have any inbuilt
> knowledge about the special relationships of map files which conform to
> known naming standards (e.g. geopoint xyz can be found in file
> AABBCC.tiff)?

A dataset is generally a single georeferenced file. But they are some 
exceptions. For example, the RPFTOC driver will handle several NITF tiles 
from a CADRG/CIB product as a single dataset.

You can also use the Virtual Raster format to make a mosaic of several 
datasets that is handled by GDAL as a single dataset. That can makes your 
life easier. See the documentation of the gdalbuildvrt utility and the VRT 
format on gdal.org

Not sure why naming standards you are refering too.

>
> I can't help feeling that someone must have written something generic which
> would explain the scope of the GDAL in this respect?  I haven't found it
> yet though.

The GDAL docs explains what GDAL does, not what you would like GDAL to do ;-)

>
> > > 2)       How to request areas of map to populate my raster output space
> > > (and how do I ensure only compatible map sources are brought together)
> >
> > GDALRasterIO() / GDALDatasetRasterIO() will fetch data from regions
> > expressed
> > in pixel space of the raster. You can use the affine transform matrix
> > (geotransform) given by GDALGetGeoTransform() to convert between pixel
> > and geo spaces.
>
> So is it the responsibility of the client to determine which file needs to
> be accessed in order to supply raster imagery for geopoint xyz? 

Yes.

> There is 
> no master database somehow held within GDAL which maps geospace to filename
> AABBCC.DDD? 

GDAL is not a database. It is relatively a low level library in the chain of 
mapping applications.

> I have noticed some references to SQL queries - to what 
> database do these relate?

SQL queries are supported by some drivers, but for the vector part (OGR).
For the sake of completeness, I should mention there is ongoing work by a GSOC 
student to provide a driver for the new WKTRaster extension of Postgis. But 
this will not likely be production-ready before a moment.

>
> > Not sure what you mean by "compatible map sources".
> >
> > > 3)       Are tiles of raster map extracted by specifying geo-space
> > > boundaries?
> >
> > See above
> >
> > > 4)       And a million more questions...
> >
> > My understanding of your needs is that MapServer could also be worth
> > exploring.
>
> Well - not exactly.  We need to be rendering into our own space so that we
> can add our own vector/raster overlays into the view.

That's not incompatible at all.There are applications that use MapServer to 
extract raster tiles through WMS queries and display them. MapServer 
determines from your spatial request the relevant datasets to open with GDAL 
and take care of doing any resampling necessary to make them fit. QGIS is an 
example of a desktop application that can use MapServer through WMS. They are 
many others.

>
> > > Can someone point me to some documentation which can put me in the
> > > picture as to how a user might use the GDAL to display maps on the
> > > screen (the fine details of actual rendering are not required - I just
> > > need to know how to get the information from the input files in a
> > > common display format) and perhaps some example code (e.g. to extract
> > > rasterized tiles of a specific geo-area)?
>
> Are there no tutorials along the lines of 'using GDAL to display maps'?
>
> :-)
> :
> > > Just some pointers for some reading are all that I'm after really.
> > >
> > >
> > >
> > > Gary




More information about the gdal-dev mailing list