Geoscience Reference
In-Depth Information
Warmerdam (2008) provides a rounded description of the library, including its OGR* vector
extensions and design goals. Use is made both of OGC Simple Features specifications and of the
PROJ.4 cartographic projections library. GDAL utilities are provided to give command-line access
to library functionality; Luis (2007) shows how GDAL and GMT can be combined for exploring
grid data. GDAL is also available in interpreted languages like Python and Perl. Its C API is stable,
but, as Warmerdam (2008, pp. 99-100) points out, the C++ application binary interface is very
dependent on the version of the compiler in particular, termed ABI fragility.
It is not hard to contribute new drivers if the file or web service formats are fully specified and/
or supported by external libraries; I have collaborated in writing a driver for SAGA raster files,
and the C++ coding involved was not demanding once the format was documented. GDAL aims to
open and read files simply based on regular file characteristics, so that the format used may in fact
be transparent for the user. Writing files may be harder, and fewer drivers support file creation and
copying than reading; only a very few XML-based vector formats in default builds, such as KML,
could be written but not read. Many drivers require the use of external libraries, especially where
the external dependency encodes proprietary formats in a closed-source binary shared object or
where it seems wiser not to internalise complete driver code in GDAL itself, only providing stubs
linked to library functions.
In conclusion, Warmerdam (2008) mentions the difficult questions of thread safety and interna-
tionalisation, neither of which have been resolved. The latter issue affects the OGR vector part of
the library, as feature attributes are much more likely to use multi-byte characters and/or different
codepages. The choice of UTF-8 support is typical of many open-source projects, as it falls back to
ASCII when only 7 bits convey meaning. Error messages and documentation should also be avail-
able in other languages.
The JTS Topology Suite has been ported from Java to C++ as GEOS (Geometry Engine - Open
Source), including all the OGC Simple Features for SQL spatial predicate functions and spatial
operators; like JTS, GEOS assumes planar geometries. GEOS and JTS also share precision models
that can be set and retrieved by applications - not infrequently, changing the precision model can
affect the results of computation. Because GEOS uses OGC SFS specifications for geometries, it
does not “build” topologies in the classical GIS arc-node understanding. The operations are con-
ducted on topologies built on-the-fly and discarded; prepared geometries may be made, speeding
operations, and Sort-Tile-Recursive (STR) trees can also be built for querying geometries. It is
required that geometries meet SFS specifications. The library is used by PostGIS to provide predi-
cate functions and topology operations and can be compiled into GDAL to make these operations
available for OGR layers. GEOS has been modified to achieve thread safety by the provision of a
handle in the C API that is specific to the thread; before long, the thread-safe versions will be the
only supported functions in the API.
One of the most important components required by geospatial applications is the provision of
robust and clear representations of coordinate reference systems. A representation that predates the
OGC well-known text (WKT) SRS was introduced in the PROJ.4 library. In its OSGeo form, it
supports datum transformation in addition to projection and is part of the OSGeo MetaCRS proj-
ect encompassing several projection- and coordinate-system-related technologies. § Extensive use
is made of the OGP EPSG database to encode distinct coordinate reference systems. Extensions
to this SRS database, for example, used in the ESRI ArcSDE interface, appear to have an uncer-
tain legal status and do not seem to be available to open-source applications in the same way as
described in the EPSG Geodetic Parameter Registry terms of use.
* OGR is not an acronym and its meaning is now lost.
http://geos.osgeo.org.
http://trac.osgeo.org/proj.
§ http://trac.osgeo.org/metacrs/.
http://www.epsg.org/.
Search WWH ::




Custom Search