OmniSciDB  8a228a1076
Geo_namespace::GeoGeometryCollection Class Reference

#include <geo_types.h>

+ Inheritance diagram for Geo_namespace::GeoGeometryCollection:
+ Collaboration diagram for Geo_namespace::GeoGeometryCollection:

Public Member Functions

 GeoGeometryCollection (const std::vector< double > &coords, const std::vector< int32_t > &ring_sizes, const std::vector< int32_t > &poly_rings, const std::vector< int32_t > &geo_kinds)
 
 GeoGeometryCollection (const std::string &wkt)
 
void getColumns (std::vector< double > &coords, std::vector< int32_t > &ring_sizes, std::vector< int32_t > &poly_rings, std::vector< int32_t > &geo_kinds, std::vector< double > &bounds) const
 
GeoType getType () const final
 
- Public Member Functions inherited from Geo_namespace::GeoBase
 GeoBase ()
 
virtual ~GeoBase ()
 
std::string getWktString () const
 
bool getWkb (std::vector< uint8_t > &) const
 
const OGRGeometry * getOGRGeometry () const
 
virtual bool operator== (const GeoBase &other) const
 
bool isEmpty () const
 
std::unique_ptr< GeoBaserun (GeoOp op, const GeoBase &other) const
 
std::unique_ptr< GeoBaseoptimized_run (GeoOp op, const GeoBase &other) const
 
std::unique_ptr< GeoBaserun (GeoOp op, double param) const
 
bool run (GeoOp op) const
 

Protected Member Functions

 GeoGeometryCollection (OGRGeometry *geom, const bool owns_geom_obj)
 
- Protected Member Functions inherited from Geo_namespace::GeoBase
 GeoBase (OGRGeometry *geom, const bool owns_geom_obj)
 

Friends

class GeoTypesFactory
 

Additional Inherited Members

- Public Types inherited from Geo_namespace::GeoBase
enum  GeoType {
  GeoType::kPOINT, GeoType::kLINESTRING, GeoType::kPOLYGON, GeoType::kMULTIPOLYGON,
  GeoType::kGEOMETRY, GeoType::kGEOMETRYCOLLECTION
}
 
enum  GeoOp {
  GeoOp::kPROJECTION = 0, GeoOp::kINTERSECTION = 1, GeoOp::kDIFFERENCE = 2, GeoOp::kUNION = 3,
  GeoOp::kBUFFER = 4, GeoOp::kISVALID = 5, GeoOp::kISEMPTY = 6
}
 
- Static Protected Member Functions inherited from Geo_namespace::GeoBase
static int createFromWktString (const std::string &wkt, OGRGeometry **geom)
 
static int createFromWkb (const std::vector< uint8_t > &wkb, OGRGeometry **geom)
 
- Protected Attributes inherited from Geo_namespace::GeoBase
OGRGeometry * geom_ = nullptr
 
bool owns_geom_obj_
 

Detailed Description

Definition at line 187 of file geo_types.h.

Constructor & Destructor Documentation

◆ GeoGeometryCollection() [1/3]

Geo_namespace::GeoGeometryCollection::GeoGeometryCollection ( const std::vector< double > &  coords,
const std::vector< int32_t > &  ring_sizes,
const std::vector< int32_t > &  poly_rings,
const std::vector< int32_t > &  geo_kinds 
)
inline

Definition at line 189 of file geo_types.h.

192  {};

◆ GeoGeometryCollection() [2/3]

Geo_namespace::GeoGeometryCollection::GeoGeometryCollection ( const std::string &  wkt)

Definition at line 602 of file geo_types.cpp.

References CHECK.

602  {
603  const auto err = GeoBase::createFromWktString(wkt, &geom_);
604  if (err != OGRERR_NONE) {
605  throw GeoTypesError("GeometryCollection", err);
606  }
607  CHECK(geom_);
608  if (wkbFlatten(geom_->getGeometryType()) != OGRwkbGeometryType::wkbGeometryCollection) {
609  throw GeoTypesError("GeometryCollection",
610  "Unexpected geometry type from WKT string: " +
611  std::string(OGRGeometryTypeToName(geom_->getGeometryType())));
612  }
613 }
static int createFromWktString(const std::string &wkt, OGRGeometry **geom)
Definition: geo_types.cpp:147
OGRGeometry * geom_
Definition: geo_types.h:84
#define CHECK(condition)
Definition: Logger.h:197

◆ GeoGeometryCollection() [3/3]

Geo_namespace::GeoGeometryCollection::GeoGeometryCollection ( OGRGeometry *  geom,
const bool  owns_geom_obj 
)
inlineprotected

Definition at line 203 of file geo_types.h.

References Geo_namespace::GeoTypesError::GeoTypesError().

204  : GeoBase(geom, owns_geom_obj) {
205  if (!isEmpty()) {
206  throw GeoTypesError("GeoTypesFactory", "Non-empty GEOMETRYCOLLECTION");
207  }
208  }
bool isEmpty() const
Definition: geo_types.cpp:189
+ Here is the call graph for this function:

Member Function Documentation

◆ getColumns()

void Geo_namespace::GeoGeometryCollection::getColumns ( std::vector< double > &  coords,
std::vector< int32_t > &  ring_sizes,
std::vector< int32_t > &  poly_rings,
std::vector< int32_t > &  geo_kinds,
std::vector< double > &  bounds 
) const
inline

Definition at line 195 of file geo_types.h.

199  {};

◆ getType()

GeoType Geo_namespace::GeoGeometryCollection::getType ( ) const
inlinefinalvirtual

Friends And Related Function Documentation

◆ GeoTypesFactory

friend class GeoTypesFactory
friend

Definition at line 210 of file geo_types.h.


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