GeometryTypeName.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2024 ISciences, LLC
*
* 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.
*
**********************************************************************/
#pragma once
namespace geos {
namespace geom {
class Curve;
class CurvePolygon;
class GeometryCollection;
class LineString;
class LinearRing;
class MultiCurve;
class MultiLineString;
class MultiPoint;
class MultiPolygon;
class MultiSurface;
class Point;
class Polygon;
class SimpleCurve;
class Surface;
// These structures allow templates to have compile-time access to a type's human-readable name.
template<typename T>
struct GeometryTypeName {};
template<>
struct GeometryTypeName<geom::Curve> {
static constexpr const char* name = "Curve";
};
template<>
struct GeometryTypeName<geom::CurvePolygon> {
static constexpr const char* name = "CurvePolygon";
};
template<>
struct GeometryTypeName<geom::GeometryCollection> {
static constexpr const char* name = "GeometryCollection";
};
template<>
struct GeometryTypeName<geom::LineString> {
static constexpr const char* name = "LineString";
};
template<>
struct GeometryTypeName<geom::LinearRing> {
static constexpr const char* name = "LinearRing";
};
template<>
struct GeometryTypeName<geom::MultiCurve> {
static constexpr const char* name = "MultiCurve";
};
template<>
struct GeometryTypeName<geom::MultiLineString> {
static constexpr const char* name = "MultiLineString";
};
template<>
struct GeometryTypeName<geom::MultiPoint> {
static constexpr const char* name = "MultiPoint";
};
template<>
struct GeometryTypeName<geom::MultiPolygon> {
static constexpr const char* name = "MultiPolygon";
};
template<>
struct GeometryTypeName<geom::MultiSurface> {
static constexpr const char* name = "MultiSurface";
};
template<>
struct GeometryTypeName<geom::Point> {
static constexpr const char* name = "Point";
};
template<>
struct GeometryTypeName<geom::Polygon> {
static constexpr const char* name = "Polygon";
};
template<>
struct GeometryTypeName<geom::SimpleCurve> {
static constexpr const char* name = "SimpleCurve";
};
template<>
struct GeometryTypeName<geom::Surface> {
static constexpr const char* name = "Surface";
};
}
}
geos::geom::GeometryCollection
Represents a collection of heterogeneous Geometry objects.
Definition GeometryCollection.h:51
geos::geom::LineString
Definition LineString.h:66
geos::geom::LinearRing
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition LinearRing.h:54
geos::geom::MultiLineString
Models a collection of LineStrings.
Definition MultiLineString.h:49
geos::geom::MultiPoint
Definition MultiPoint.h:50
geos::geom::MultiPolygon
Definition MultiPolygon.h:58
geos::geom::Point
Definition Point.h:61
geos::geom::Polygon
Represents a linear polygon, which may include holes.
Definition Polygon.h:61
geos::geom::Surface
Definition Surface.h:27
geos::geom
Definition Angle.h:26
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38