Fishnet 2.0.1
Framework for Graph-Based Analysis of GIS Vector Data
Loading...
Searching...
No Matches
IDReduceFunction.hpp
Go to the documentation of this file.
1#pragma once
3#include <fishnet/Polygon.hpp>
4#include "SettlementShape.hpp"
5#include <fishnet/Task.hpp>
7
15
17
19
20 template<fishnet::geometry::IPolygon P>
21 SettlementShape<fishnet::geometry::MultiPolygon<P>> operator()( const std::vector<SettlementShape<P>> & settlementPolygons) const noexcept {
22 size_t id = std::ranges::fold_left(settlementPolygons,0,[](size_t current, const auto & settlementPolygon){return current + settlementPolygon.key();});
24 fishnet::geometry::MultiPolygon<P> resultGeometry {settlementPolygons | std::views::transform([](const auto & settPoly){return static_cast<P>(settPoly);}),true};
26 }
27};
Settlement Object, which fulfills the requirements of a Polygon and for a Node stored in the Memgraph...
Definition SettlementShape.hpp:13
Implementation of a Multi-Polygon.
Definition MultiPolygon.hpp:20
uint64_t normalizeToShpFileIntField(std::integral auto number) noexcept
Definition OGRFieldAdapter.hpp:40
STL namespace.
File reference have a unique id for each file.
Definition FileReference.hpp:8
Reduce function Functor that merges a set of settlements polygons into a single settlement multi-poly...
Definition IDReduceFunction.hpp:13
SettlementShape< fishnet::geometry::MultiPolygon< P > > operator()(const std::vector< SettlementShape< P > > &settlementPolygons) const noexcept
Definition IDReduceFunction.hpp:21
IDReduceFunction()=default
IDReduceFunction(FileReference outputFileRef)
Definition IDReduceFunction.hpp:16
FileReference outputFileRef
Definition IDReduceFunction.hpp:14