Reads and writes a VectorLayer whose geometries are backed by the OGR data source.
More...
#include <OGRLayerAdapter.hpp>
template<geometry::OGRWritableGeometry G>
class fishnet::OGRLayerAdapter< G >
Reads and writes a VectorLayer whose geometries are backed by the OGR data source.
Nothing is rebuilt out of the data source on the way in, and nothing is rebuilt point by point on the way out.
- See also
- fishnet::geometry::OGRLayerGeometry for the geometries this covers, and the adapters' toNative() for getting a fishnet value type back where one is needed.
◆ fromOGR()
template<geometry::OGRWritableGeometry G>
Converts an OGRLayer to a fishnet::VectorLayer.
- Parameters
-
| ogrLayer | pointer to the OGRLayer |
- Returns
- util::Either<VectorLayer<G>, std::string> VectorLayer if successful, error message otherwise
- Note
- features whose geometry is missing, or of a type a layer of G cannot hold, are skipped
◆ layerGeometryType()
template<geometry::OGRWritableGeometry G>
WKB type an output layer holding G has to be created with.
◆ toOGR()
template<geometry::OGRWritableGeometry G>
Converts a fishnet::VectorLayer to an OGRLayer.
- Parameters
-
| layer | vector layer to be converted
|
| outputLayer | inout parameter, should be already created with the correct geometry type and spatial reference |
- Returns
- util::Either<OGRLayer, std::string> OGRLayer if successful, error message otherwise
The documentation for this class was generated from the following file: