OmniSciDB  c07336695a
GeoMultiPolygonValueConverter Struct Reference

#include <TargetValueConvertersImpl.h>

+ Inheritance diagram for GeoMultiPolygonValueConverter:
+ Collaboration diagram for GeoMultiPolygonValueConverter:

Public Member Functions

 GeoMultiPolygonValueConverter (const Catalog_Namespace::Catalog &cat, size_t num_rows, const ColumnDescriptor *logicalColumnDescriptor)
 
 ~GeoMultiPolygonValueConverter () override
 
void allocateColumnarData (size_t num_rows) override
 
void convertToColumnarFormat (size_t row, const TargetValue *value) override
 
void addDataBlocksToInsertData (Fragmenter_Namespace::InsertData &insertData) override
 
- Public Member Functions inherited from GeoPointValueConverter
 GeoPointValueConverter (const Catalog_Namespace::Catalog &cat, size_t num_rows, const ColumnDescriptor *logicalColumnDescriptor)
 
 ~GeoPointValueConverter () override
 
ArrayDatum toCompressedCoords (const std::shared_ptr< std::vector< double >> &coords)
 
- Public Member Functions inherited from TargetValueConverter
 TargetValueConverter (const ColumnDescriptor *cd)
 
virtual ~TargetValueConverter ()
 
virtual void finalizeDataBlocksForInsertData ()
 

Public Attributes

const ColumnDescriptorring_sizes_column_descriptor_
 
const ColumnDescriptorring_sizes_solumn_descriptor_
 
const ColumnDescriptorbounds_column_descriptor_
 
const ColumnDescriptorrender_group_column_descriptor_
 
Importer_NS::RenderGroupAnalyzer render_group_analyzer_
 
std::unique_ptr< std::vector< ArrayDatum > > ring_sizes_data_
 
std::unique_ptr< std::vector< ArrayDatum > > poly_rings_data_
 
std::unique_ptr< std::vector< ArrayDatum > > bounds_data_
 
std::unique_ptr< int32_t[]> render_group_data_
 
boost_variant_accessor< GeoMultiPolyTargetValueGEO_MULTI_POLY_VALUE_ACCESSOR
 
- Public Attributes inherited from GeoPointValueConverter
const ColumnDescriptorcoords_column_descriptor_
 
std::unique_ptr< std::vector< std::string > > column_data_
 
std::unique_ptr< std::vector< ArrayDatum > > signed_compressed_coords_data_
 
boost_variant_accessor< GeoPointTargetValueGEO_POINT_VALUE_ACCESSOR
 
- Public Attributes inherited from TargetValueConverter
const ColumnDescriptorcolumn_descriptor_
 
boost_variant_accessor< ScalarTargetValueSCALAR_TARGET_VALUE_ACCESSOR
 
boost_variant_accessor< ArrayTargetValueARRAY_TARGET_VALUE_ACCESSOR
 
boost_variant_accessor< GeoTargetValueGEO_TARGET_VALUE_ACCESSOR
 
boost_variant_accessor< NullableStringNULLABLE_STRING_ACCESSOR
 
boost_variant_accessor< std::string > STRING_ACCESSOR
 

Detailed Description

Definition at line 735 of file TargetValueConvertersImpl.h.

Constructor & Destructor Documentation

◆ GeoMultiPolygonValueConverter()

GeoMultiPolygonValueConverter::GeoMultiPolygonValueConverter ( const Catalog_Namespace::Catalog cat,
size_t  num_rows,
const ColumnDescriptor logicalColumnDescriptor 
)
inline

Definition at line 747 of file TargetValueConvertersImpl.h.

References CHECK, and Catalog_Namespace::Catalog::getMetadataForColumn().

750  : GeoPointValueConverter(cat, num_rows, logicalColumnDescriptor) {
763 
764  if (num_rows) {
766  }
767  }
const int8_t const int64_t * num_rows
const ColumnDescriptor * ring_sizes_solumn_descriptor_
void allocateColumnarData(size_t num_rows) override
const ColumnDescriptor * column_descriptor_
const ColumnDescriptor * getMetadataForColumn(int tableId, const std::string &colName) const
GeoPointValueConverter(const Catalog_Namespace::Catalog &cat, size_t num_rows, const ColumnDescriptor *logicalColumnDescriptor)
const ColumnDescriptor * bounds_column_descriptor_
const ColumnDescriptor * render_group_column_descriptor_
#define CHECK(condition)
Definition: Logger.h:187
const ColumnDescriptor * ring_sizes_column_descriptor_
+ Here is the call graph for this function:

◆ ~GeoMultiPolygonValueConverter()

GeoMultiPolygonValueConverter::~GeoMultiPolygonValueConverter ( )
inlineoverride

Definition at line 769 of file TargetValueConvertersImpl.h.

769 {}

Member Function Documentation

◆ addDataBlocksToInsertData()

void GeoMultiPolygonValueConverter::addDataBlocksToInsertData ( Fragmenter_Namespace::InsertData insertData)
inlineoverridevirtual

Reimplemented from GeoPointValueConverter.

Definition at line 796 of file TargetValueConvertersImpl.h.

References GeoPointValueConverter::addDataBlocksToInsertData(), DataBlockPtr::arraysPtr, ColumnDescriptor::columnId, Fragmenter_Namespace::InsertData::columnIds, Fragmenter_Namespace::InsertData::data, and DataBlockPtr::numbersPtr.

796  {
798 
799  DataBlockPtr ringSizes, polyRings, bounds, renderGroup;
800 
801  ringSizes.arraysPtr = ring_sizes_data_.get();
802  polyRings.arraysPtr = poly_rings_data_.get();
803  bounds.arraysPtr = bounds_data_.get();
804  renderGroup.numbersPtr = reinterpret_cast<int8_t*>(render_group_data_.get());
805 
806  insertData.data.emplace_back(ringSizes);
807  insertData.columnIds.emplace_back(ring_sizes_column_descriptor_->columnId);
808 
809  insertData.data.emplace_back(polyRings);
810  insertData.columnIds.emplace_back(ring_sizes_solumn_descriptor_->columnId);
811 
812  insertData.data.emplace_back(bounds);
813  insertData.columnIds.emplace_back(bounds_column_descriptor_->columnId);
814 
815  insertData.data.emplace_back(renderGroup);
816  insertData.columnIds.emplace_back(render_group_column_descriptor_->columnId);
817  }
std::unique_ptr< std::vector< ArrayDatum > > ring_sizes_data_
std::unique_ptr< std::vector< ArrayDatum > > bounds_data_
const ColumnDescriptor * ring_sizes_solumn_descriptor_
std::vector< ArrayDatum > * arraysPtr
Definition: sqltypes.h:139
std::unique_ptr< int32_t[]> render_group_data_
std::unique_ptr< std::vector< ArrayDatum > > poly_rings_data_
const ColumnDescriptor * bounds_column_descriptor_
std::vector< DataBlockPtr > data
the number of rows being inserted
Definition: Fragmenter.h:64
const ColumnDescriptor * render_group_column_descriptor_
void addDataBlocksToInsertData(Fragmenter_Namespace::InsertData &insertData) override
int8_t * numbersPtr
Definition: sqltypes.h:137
const ColumnDescriptor * ring_sizes_column_descriptor_
std::vector< int > columnIds
identifies the table into which the data is being inserted
Definition: Fragmenter.h:62
+ Here is the call graph for this function:

◆ allocateColumnarData()

void GeoMultiPolygonValueConverter::allocateColumnarData ( size_t  num_rows)
inlineoverridevirtual

Reimplemented from GeoPointValueConverter.

Definition at line 771 of file TargetValueConvertersImpl.h.

References GeoPointValueConverter::allocateColumnarData(), and num_rows.

771  {
773  ring_sizes_data_ = std::make_unique<std::vector<ArrayDatum>>(num_rows);
774  poly_rings_data_ = std::make_unique<std::vector<ArrayDatum>>(num_rows);
775  bounds_data_ = std::make_unique<std::vector<ArrayDatum>>(num_rows);
776  render_group_data_ = std::make_unique<int32_t[]>(num_rows);
777  }
std::unique_ptr< std::vector< ArrayDatum > > ring_sizes_data_
std::unique_ptr< std::vector< ArrayDatum > > bounds_data_
const int8_t const int64_t * num_rows
std::unique_ptr< int32_t[]> render_group_data_
void allocateColumnarData(size_t num_rows) override
std::unique_ptr< std::vector< ArrayDatum > > poly_rings_data_
+ Here is the call graph for this function:

◆ convertToColumnarFormat()

void GeoMultiPolygonValueConverter::convertToColumnarFormat ( size_t  row,
const TargetValue value 
)
inlineoverridevirtual

Reimplemented from GeoPointValueConverter.

Definition at line 781 of file TargetValueConvertersImpl.h.

References compute_bounds_of_coords(), Importer_NS::RenderGroupAnalyzer::insertBoundsAndReturnRenderGroup(), and to_array_datum().

781  {
782  auto geoValue = checked_get<GeoTargetValue>(row, value, GEO_TARGET_VALUE_ACCESSOR);
783  auto geoMultiPoly = checked_get<GeoMultiPolyTargetValue>(
784  row, geoValue, GEO_MULTI_POLY_VALUE_ACCESSOR);
785 
786  (*column_data_)[row] = "";
787  (*signed_compressed_coords_data_)[row] = toCompressedCoords(geoMultiPoly->coords);
788  (*ring_sizes_data_)[row] = to_array_datum(geoMultiPoly->ring_sizes);
789  (*poly_rings_data_)[row] = to_array_datum(geoMultiPoly->poly_rings);
790  auto bounds = compute_bounds_of_coords(geoMultiPoly->coords);
791  (*bounds_data_)[row] = to_array_datum(bounds);
792  render_group_data_[row] =
794  }
ArrayDatum to_array_datum(const std::vector< ELEM_TYPE > &vector)
std::unique_ptr< int32_t[]> render_group_data_
int insertBoundsAndReturnRenderGroup(const std::vector< double > &bounds)
Definition: Importer.cpp:4896
ArrayDatum toCompressedCoords(const std::shared_ptr< std::vector< double >> &coords)
std::vector< double > compute_bounds_of_coords(const std::shared_ptr< std::vector< double >> &coords)
boost_variant_accessor< GeoMultiPolyTargetValue > GEO_MULTI_POLY_VALUE_ACCESSOR
Importer_NS::RenderGroupAnalyzer render_group_analyzer_
boost_variant_accessor< GeoTargetValue > GEO_TARGET_VALUE_ACCESSOR
+ Here is the call graph for this function:

Member Data Documentation

◆ bounds_column_descriptor_

const ColumnDescriptor* GeoMultiPolygonValueConverter::bounds_column_descriptor_

Definition at line 738 of file TargetValueConvertersImpl.h.

◆ bounds_data_

std::unique_ptr<std::vector<ArrayDatum> > GeoMultiPolygonValueConverter::bounds_data_

Definition at line 744 of file TargetValueConvertersImpl.h.

◆ GEO_MULTI_POLY_VALUE_ACCESSOR

boost_variant_accessor<GeoMultiPolyTargetValue> GeoMultiPolygonValueConverter::GEO_MULTI_POLY_VALUE_ACCESSOR

Definition at line 779 of file TargetValueConvertersImpl.h.

◆ poly_rings_data_

std::unique_ptr<std::vector<ArrayDatum> > GeoMultiPolygonValueConverter::poly_rings_data_

Definition at line 743 of file TargetValueConvertersImpl.h.

◆ render_group_analyzer_

Importer_NS::RenderGroupAnalyzer GeoMultiPolygonValueConverter::render_group_analyzer_

Definition at line 740 of file TargetValueConvertersImpl.h.

◆ render_group_column_descriptor_

const ColumnDescriptor* GeoMultiPolygonValueConverter::render_group_column_descriptor_

Definition at line 739 of file TargetValueConvertersImpl.h.

◆ render_group_data_

std::unique_ptr<int32_t[]> GeoMultiPolygonValueConverter::render_group_data_

Definition at line 745 of file TargetValueConvertersImpl.h.

◆ ring_sizes_column_descriptor_

const ColumnDescriptor* GeoMultiPolygonValueConverter::ring_sizes_column_descriptor_

Definition at line 736 of file TargetValueConvertersImpl.h.

◆ ring_sizes_data_

std::unique_ptr<std::vector<ArrayDatum> > GeoMultiPolygonValueConverter::ring_sizes_data_

Definition at line 742 of file TargetValueConvertersImpl.h.

◆ ring_sizes_solumn_descriptor_

const ColumnDescriptor* GeoMultiPolygonValueConverter::ring_sizes_solumn_descriptor_

Definition at line 737 of file TargetValueConvertersImpl.h.


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