GeometryCombiner.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2006-2011 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: geom/util/GeometryCombiner.java r320 (JTS-1.12)
*
**********************************************************************/
#pragma once
#include <memory>
#include <vector>
#include <geos/export.h>
// Forward declarations
namespace geos {
namespace geom {
class Geometry;
class GeometryFactory;
}
}
namespace geos {
namespace geom { // geos.geom
namespace util { // geos.geom.util
class GEOS_DLL GeometryCombiner {
public:
static std::unique_ptr<Geometry> combine(std::vector<const Geometry*> const& geoms);
static std::unique_ptr<Geometry> combine(std::vector<std::unique_ptr<Geometry>> && geoms);
static std::unique_ptr<Geometry> combine(const Geometry* g0, const Geometry* g1);
static std::unique_ptr<Geometry> combine(std::unique_ptr<Geometry> && g0,
std::unique_ptr<Geometry> && g1);
static std::unique_ptr<Geometry> combine(const Geometry* g0, const Geometry* g1, const Geometry* g2);
static std::unique_ptr<Geometry> combine(std::unique_ptr<Geometry> && g0,
std::unique_ptr<Geometry> && g1,
std::unique_ptr<Geometry> && g2);
private:
std::vector<std::unique_ptr<Geometry>> inputGeoms;
bool skipEmpty;
public:
explicit GeometryCombiner(std::vector<const Geometry*> const& geoms);
explicit GeometryCombiner(std::vector<std::unique_ptr<Geometry>> && geoms);
GeometryFactory const* extractFactory() const;
std::unique_ptr<Geometry> combine();
void setSkipEmpty(bool);
// Declare type as noncopyable
GeometryCombiner(const GeometryCombiner& other) = delete;
GeometryCombiner& operator=(const GeometryCombiner& rhs) = delete;
};
} // namespace geos.geom.util
} // namespace geos.geom
} // namespace geos
geos::geom::GeometryFactory
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:70
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::geom::util::GeometryCombiner::combine
static std::unique_ptr< Geometry > combine(const Geometry *g0, const Geometry *g1)
Copies two geometries and combines the result.
geos::geom::util::GeometryCombiner::combine
static std::unique_ptr< Geometry > combine(std::unique_ptr< Geometry > &&g0, std::unique_ptr< Geometry > &&g1, std::unique_ptr< Geometry > &&g2)
Combines three geometries.
geos::geom::util::GeometryCombiner::extractFactory
GeometryFactory const * extractFactory() const
Extracts the GeometryFactory used by the geometries in a collection.
geos::geom::util::GeometryCombiner::combine
static std::unique_ptr< Geometry > combine(std::unique_ptr< Geometry > &&g0, std::unique_ptr< Geometry > &&g1)
Combines two geometries.
geos::geom::util::GeometryCombiner::combine
static std::unique_ptr< Geometry > combine(std::vector< std::unique_ptr< Geometry > > &&geoms)
Combines a collection of geometries.
geos::geom::util::GeometryCombiner::combine
static std::unique_ptr< Geometry > combine(std::vector< const Geometry * > const &geoms)
Copies a collection of geometries and combines the result.
geos::geom::util::GeometryCombiner::combine
std::unique_ptr< Geometry > combine()
Computes the combination of the input geometries to produce the most appropriate Geometry or Geometry...
geos::geom::util::GeometryCombiner::combine
static std::unique_ptr< Geometry > combine(const Geometry *g0, const Geometry *g1, const Geometry *g2)
Copies three geometries and combines the result.
geos::geom::util::GeometryCombiner::setSkipEmpty
void setSkipEmpty(bool)
Set a flag indicating that empty geometries should be omitted from the result.
geos::geom::util::GeometryCombiner::GeometryCombiner
GeometryCombiner(std::vector< const Geometry * > const &geoms)
Creates a new combiner for a collection of geometries.
geos::geom::util
Provides classes that parse and modify Geometry objects.
Definition ComponentCoordinateExtracter.h:28
geos::geom
Definition Angle.h:26
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38