NGen
Loading...
Searching...
No Matches
ngen::geopackage::wkb Struct Reference

A recursive WKB reader. More...

#include <wkb.hpp>

+ Collaboration diagram for ngen::geopackage::wkb:

Classes

struct  wgs84
 

Public Types

using point_t = bg::model::point<double, 2, bg::cs::cartesian>
 
using linestring_t = bg::model::linestring<point_t>
 
using polygon_t = bg::model::polygon<point_t>
 
using multipoint_t = bg::model::multi_point<point_t>
 
using multilinestring_t = bg::model::multi_linestring<linestring_t>
 
using multipolygon_t = bg::model::multi_polygon<polygon_t>
 
using geometry
 
using byte_t = uint8_t
 
using byte_vector = std::vector<byte_t>
 

Public Member Functions

 wkb ()=delete
 

Static Public Member Functions

static geometry read (const boost::span< const uint8_t > buffer)
 Read WKB from a given buffer.
 

Static Private Member Functions

static point_t read_point (const boost::span< const uint8_t >, int &, uint8_t)
 Read a WKB point into a cartesian model.
 
static linestring_t read_linestring (const boost::span< const uint8_t >, int &, uint8_t)
 Read a WKB linestring into a cartesian model.
 
static polygon_t read_polygon (const boost::span< const uint8_t >, int &, uint8_t)
 Read a WKB polygon into a cartesian model.
 
static multipoint_t read_multipoint (const boost::span< const uint8_t >, int &, uint8_t)
 Read a WKB multipoint into a cartesian model.
 
static multilinestring_t read_multilinestring (const boost::span< const uint8_t >, int &, uint8_t)
 Read a WKB multilinestring into a cartesian model.
 
static multipolygon_t read_multipolygon (const boost::span< const uint8_t >, int &, uint8_t)
 Read a WKB multipolygon into a cartesian model.
 

Detailed Description

A recursive WKB reader.

Note
This WKB implementation follows a subset of the OGC Specification found in https://www.ogc.org/standard/sfa/. This is a strict WKB implementation and does not support Extended WKB (EWKB) or Tiny WKB (TWKB).

Member Typedef Documentation

◆ byte_t

◆ byte_vector

◆ geometry

Initial value:
boost::variant<
>
bg::model::multi_linestring< linestring_t > multilinestring_t
Definition wkb.hpp:27
bg::model::point< double, 2, bg::cs::cartesian > point_t
Definition wkb.hpp:23
bg::model::multi_polygon< polygon_t > multipolygon_t
Definition wkb.hpp:28
bg::model::multi_point< point_t > multipoint_t
Definition wkb.hpp:26
bg::model::linestring< point_t > linestring_t
Definition wkb.hpp:24
bg::model::polygon< point_t > polygon_t
Definition wkb.hpp:25

◆ linestring_t

using ngen::geopackage::wkb::linestring_t = bg::model::linestring<point_t>

◆ multilinestring_t

using ngen::geopackage::wkb::multilinestring_t = bg::model::multi_linestring<linestring_t>

◆ multipoint_t

using ngen::geopackage::wkb::multipoint_t = bg::model::multi_point<point_t>

◆ multipolygon_t

using ngen::geopackage::wkb::multipolygon_t = bg::model::multi_polygon<polygon_t>

◆ point_t

using ngen::geopackage::wkb::point_t = bg::model::point<double, 2, bg::cs::cartesian>

◆ polygon_t

using ngen::geopackage::wkb::polygon_t = bg::model::polygon<point_t>

Constructor & Destructor Documentation

◆ wkb()

ngen::geopackage::wkb::wkb ( )
delete

Member Function Documentation

◆ read()

wkb::geometry ngen::geopackage::wkb::read ( const boost::span< const uint8_t > buffer)
static

◆ read_linestring()

wkb::linestring_t ngen::geopackage::wkb::read_linestring ( const boost::span< const uint8_t > buffer,
int & index,
uint8_t order )
staticprivate

Read a WKB linestring into a cartesian model.

Returns
linestring_t

References utils::copy_from(), ngen::geopackage::linestring, and read_point().

Referenced by read(), read_multilinestring(), and read_polygon().

◆ read_multilinestring()

wkb::multilinestring_t ngen::geopackage::wkb::read_multilinestring ( const boost::span< const uint8_t > buffer,
int & index,
uint8_t order )
staticprivate

Read a WKB multilinestring into a cartesian model.

Returns
multilinestring_t

References utils::copy_from(), ngen::geopackage::linestring, read_linestring(), and ngen::geopackage::throw_if_not_type().

Referenced by read().

◆ read_multipoint()

wkb::multipoint_t ngen::geopackage::wkb::read_multipoint ( const boost::span< const uint8_t > buffer,
int & index,
uint8_t order )
staticprivate

Read a WKB multipoint into a cartesian model.

Returns
multipoint_t

References utils::copy_from(), ngen::geopackage::point, read_point(), and ngen::geopackage::throw_if_not_type().

Referenced by read().

◆ read_multipolygon()

wkb::multipolygon_t ngen::geopackage::wkb::read_multipolygon ( const boost::span< const uint8_t > buffer,
int & index,
uint8_t order )
staticprivate

Read a WKB multipolygon into a cartesian model.

Returns
multipolygon_t

References utils::copy_from(), ngen::geopackage::polygon, read_polygon(), and ngen::geopackage::throw_if_not_type().

Referenced by read().

◆ read_point()

wkb::point_t ngen::geopackage::wkb::read_point ( const boost::span< const uint8_t > buffer,
int & index,
uint8_t order )
staticprivate

Read a WKB point into a cartesian model.

Returns
point_t

References utils::copy_from().

Referenced by read(), read_linestring(), and read_multipoint().

◆ read_polygon()

wkb::polygon_t ngen::geopackage::wkb::read_polygon ( const boost::span< const uint8_t > buffer,
int & index,
uint8_t order )
staticprivate

Read a WKB polygon into a cartesian model.

Returns
polygon_t

References utils::copy_from(), ngen::geopackage::polygon, and read_linestring().

Referenced by read(), and read_multipolygon().


The documentation for this struct was generated from the following files: