Frequently Asked Questions about Generic Geometry Library:
- What is GGL?
- What does GGL stand for?
- What is the target audience of GGL?
- What does it mean GGL is agnostic?
- What the heck is concept?
- What is tag dispatching?
- Why multipoint, multiline and multipolygon live in separated module?
- How is GGL different to CGAL, GEOS,...?
What is GGL?
GGL is a general purpose software library written in C++ programming language that provides generic implementation of computational geometry algorithms working on built-in geometries as well as user-defined geometries. The library is agnostic about coordinate dimension, coordinate space and coordinate system.
GGL also delivers tools and follows conventions helpful in development of geospatial applications:
- algorithms and spatial predicates defined by Open Geospatial Consortium (OGC)
- OGC Well-Known-Text geometry data parser
- algorithms for coordinate transformations and map projections
As mentioned above, GGL is a general purpose geometry library and as such it does not implement the OpenGIS Simple Features Specifications exactly and completely. There are many differences. Please, check the OGC page in documentation to find detailed explanation.
What does GGL stand for?
GGL is an abbreviation of Generic Geometry Library
What is the target audience of GGL?
In general, GGL is dedicated to programmers who need to write programs that involve computations of a geometric nature. We hope to provide Generic Geometry Library interesting to developers of geographic information systems, geomatics and any solutions of spatial nature, and even to game developers.
What does it mean GGL is agnostic?
Agnosticism in computing means a software component (or other entity) that is unaware or noncommittal regarding the specific nature of the components with which it interact. It also means that a software component is not intrusive and does not imposes certain requirements or limitations.
Specifically in GGL, agnosticism means that the library does not expect or enforce any specific number of dimensions of geometry or type of coordinate system in which a geometry is defined and that it can work with any coordinate type, and it can handle different geometry types. All these properties of geometry are left to be defined by the library user.
What the heck is concept?
The term concept is often used in GGL documentation. It is one of the fundamentals of generic programming in C++ where class and function template parameters are used to represent abstract data types, and these types usually must satisfy a set of requirements.
A concept is a set of requirements consisting of valid expressions, associated types, invariants, and complexity guarantees. A type that satisfies the requirements is said to model the concept.
GGL uses Boost Concept Check Library (BCCL) to define concept checking classes, specify and verify concept requirements. The mechanism of concepts use standard C++ and introduce no run-time overhead as it is compile-time technique.
What is tag dispatching?
Tag dispatching is one of the popular techniques used in generic programming in C++ language. It is a way of using function overloading to dispatch based on properties of a type. For more comprehensive explanation, jump to Generic Programming in C++: Techniques article written by David Abrahams and Douglas Gregor.
Why multipoint, multiline and multipolygon live in separated module?
Multiple geometry types are collection geometry classes introduced in OpenGIS Simple Features architecture and as such they are specific to geospatial applications. Because GGL aims to be general purpose geometry library, it's been decided to maintain multiple geometry types in separate module. So, developers who are not interested in those elements of GGL can leave them out automatically.
How is GGL different to CGAL, GEOS,...?
We do not provide comprehensive comparison of all features of available geometry libraries. However, we have prepared a benchmark that tries to present how different programming models and designs influence performance.