Layers and GeometryEncoders
The primary type that defines a collection of geometries is the Layer
.
A layer contains an index for querying.
In addition, a Layer
can be an EditableLayer
if it is possible to add and modify geometries in the layer.
The next most important interface is the GeometryEncoder.
The DefaultLayer
is the standard layer, making use of the WKBGeometryEncoder
for storing all geometry types as byte[]
properties of one node per geometry instance.
The OSMLayer
is a special layer supporting Open Street Map and storing the OSM model as a single fully connected graph.
The set of Geometries
provided by this layer includes Points
, LineStrings
and Polygons
, and as such cannot be exported to Shapefile format, since that format only allows a single Geometry
per layer.
However, OMSLayer
extends DynamicLayer
, which allow it to provide any number of sub-layers, each with a specific geometry type and in addition based on an OSM tag filter.
For example, you can have a layer providing all cycle paths as LineStrings
, or a layer providing all lakes as Polygons
.
Underneath these are all still backed by the same fully connected graph, but exposed dynamically as apparently separate geometry layers.