OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Geospatial::GeoGeometryCollection Class Reference

#include <Types.h>

+ Inheritance diagram for Geospatial::GeoGeometryCollection:
+ Collaboration diagram for Geospatial::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
 
std::unique_ptr< GeoBaseclone () const final
 
- Public Member Functions inherited from Geospatial::GeoBase
 GeoBase ()
 
virtual ~GeoBase ()
 
std::string getWktString () const
 
bool getWkb (std::vector< uint8_t > &) const
 
const OGRGeometry * getOGRGeometry () const
 
int32_t getBestPlanarSRID () const
 
bool transform (int32_t srid0, int32_t srid1)
 
bool transform (SQLTypeInfo &ti)
 
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 Geospatial::GeoBase
 GeoBase (OGRGeometry *geom, const bool owns_geom_obj)
 

Friends

class GeoTypesFactory
 

Additional Inherited Members

- Public Types inherited from Geospatial::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, GeoOp::kEQUALS = 7
}
 
- Static Public Member Functions inherited from Geospatial::GeoBase
static std::shared_ptr
< OGRCoordinateTransformation > 
getTransformation (int32_t srid0, int32_t srid1)
 
- Static Protected Member Functions inherited from Geospatial::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 Geospatial::GeoBase
OGRGeometry * geom_ = nullptr
 
bool owns_geom_obj_
 

Detailed Description

Definition at line 206 of file Types.h.

Constructor & Destructor Documentation

Geospatial::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 208 of file Types.h.

Referenced by clone().

211  {};

+ Here is the caller graph for this function:

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

Definition at line 837 of file Types.cpp.

References CHECK, Geospatial::GeoBase::createFromWktString(), and Geospatial::GeoBase::geom_.

837  {
838  const auto err = GeoBase::createFromWktString(wkt, &geom_);
839  if (err != OGRERR_NONE) {
840  throw GeoTypesError("GeometryCollection", err);
841  }
842  CHECK(geom_);
843  if (wkbFlatten(geom_->getGeometryType()) != OGRwkbGeometryType::wkbGeometryCollection) {
844  throw GeoTypesError("GeometryCollection",
845  "Unexpected geometry type from WKT string: " +
846  std::string(OGRGeometryTypeToName(geom_->getGeometryType())));
847  }
848 }
OGRGeometry * geom_
Definition: Types.h:93
static int createFromWktString(const std::string &wkt, OGRGeometry **geom)
Definition: Types.cpp:154
#define CHECK(condition)
Definition: Logger.h:209

+ Here is the call graph for this function:

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

Definition at line 224 of file Types.h.

References Geospatial::GeoBase::isEmpty().

225  : GeoBase(geom, owns_geom_obj) {
226  if (!isEmpty()) {
227  throw GeoTypesError("GeoTypesFactory", "Non-empty GEOMETRYCOLLECTION");
228  }
229  }
bool isEmpty() const
Definition: Types.cpp:196

+ Here is the call graph for this function:

Member Function Documentation

std::unique_ptr< GeoBase > Geospatial::GeoGeometryCollection::clone ( ) const
finalvirtual

Implements Geospatial::GeoBase.

Definition at line 832 of file Types.cpp.

References CHECK, GeoGeometryCollection(), and Geospatial::GeoBase::geom_.

832  {
833  CHECK(geom_);
834  return std::unique_ptr<GeoBase>(new GeoGeometryCollection(geom_->clone(), true));
835 }
OGRGeometry * geom_
Definition: Types.h:93
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)
Definition: Types.h:208
#define CHECK(condition)
Definition: Logger.h:209

+ Here is the call graph for this function:

void Geospatial::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 214 of file Types.h.

218  {};
GeoType Geospatial::GeoGeometryCollection::getType ( ) const
inlinefinalvirtual

Friends And Related Function Documentation

friend class GeoTypesFactory
friend

Definition at line 231 of file Types.h.


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