diff --git a/plugins/csl-ogc/CMakeLists.txt b/plugins/csl-ogc/CMakeLists.txt index f4a63f473..5a2049a1a 100644 --- a/plugins/csl-ogc/CMakeLists.txt +++ b/plugins/csl-ogc/CMakeLists.txt @@ -29,10 +29,10 @@ endif() # build plugin ------------------------------------------------------------------------------------- -file(GLOB SOURCE_FILES src/*.cpp src/*/*.cpp) +file(GLOB_RECURSE SOURCE_FILES *.cpp) # Resource files and header files are only added in order to make them available in your IDE. -file(GLOB HEADER_FILES src/*.hpp src/*/*.hpp) +file(GLOB_RECURSE HEADER_FILES *.hpp) add_library(csl-ogc SHARED ${SOURCE_FILES} diff --git a/plugins/csl-ogc/src/schemas/gml/Base.hpp b/plugins/csl-ogc/src/schemas/gml/Base.hpp new file mode 100644 index 000000000..e38497e65 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/gml/Base.hpp @@ -0,0 +1,98 @@ +#ifndef CSL_OGC_GML_BASE +#define CSL_OGC_GML_BASE + +#include "BasicTypes.hpp" +#include "DeprecatedTypes.hpp" + +#include +#include +#include + +#include "../xlink/XLink.hpp" + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::gml { + +struct StandardObjectProperties; +struct ReferenceType; + +struct CSL_OGC_EXPORT AssociationAttributeGroup { + // attributes + xlink::SimpleAttrsGroup simpleAttributes; + + std::optional nilReason; + std::optional remoteSchema; +}; + +struct CSL_OGC_EXPORT AbstractGMLType { + // attributes + std::string id; + + // child elements + StandardObjectProperties standardObjectProperties; + + virtual ~AbstractGMLType() = default; +}; + +struct CSL_OGC_EXPORT StandardObjectProperties { + // child elements + std::vector metaDataProperty; + std::optional description; + std::optional descriptionReference; + std::optional identifier; + std::vector name; +}; + +struct CSL_OGC_EXPORT OwnershipAttributeGroup { + // attributes + bool owns = false; +}; + +struct AssociationRoleType { + // attributes + AssociationAttributeGroup associationAttributes; + OwnershipAttributeGroup ownershipAttributes; + + // content + std::optional content; +}; + +struct CSL_OGC_EXPORT ReferenceType { + // attributes + OwnershipAttributeGroup ownershipAttributes; + AssociationAttributeGroup associationAttributes; +}; + +struct CSL_OGC_EXPORT InlinePropertyType { + // attributes + OwnershipAttributeGroup ownershipAttributes; + + // content + std::any content; +}; + +struct CSL_OGC_EXPORT AbstractMemberType { + // attributes + OwnershipAttributeGroup ownershipAttributes; + + virtual ~AbstractMemberType() = default; +}; + +enum class AggregationType { SET, BAG, SEQUENCE, ARRAY, RECORD, TABLE }; + +struct CSL_OGC_EXPORT AggregationAttributeGroup { + // attributes + AggregationType aggregationType; +}; + +struct CSL_OGC_EXPORT AbstractMetadataPropertyType { + // attributes + OwnershipAttributeGroup ownershipAttributes; + + virtual ~AbstractMetadataPropertyType() = default; +}; + +} // namespace ogc::schemas::gml + +#endif // CSL_OGC_GML_BASE diff --git a/plugins/csl-ogc/src/schemas/gml/BasicTypes.hpp b/plugins/csl-ogc/src/schemas/gml/BasicTypes.hpp new file mode 100644 index 000000000..a511f6cce --- /dev/null +++ b/plugins/csl-ogc/src/schemas/gml/BasicTypes.hpp @@ -0,0 +1,122 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_GML_BASIC_TYPES +#define CSL_OGC_GML_BASIC_TYPES + +#include +#include +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::gml { + +struct CodeType; +struct MeasureType; + +enum class NilReasonEnumeration { Inapplicable, Missing, Template, Unknown, Withheld, Other }; + +using NilReasonType = std::variant; + +enum class SignType { Minus, Plus }; + +using BooleanOrNilReason = std::variant; +using DoubleOrNilReason = std::variant; +using IntegerOrNilReason = std::variant; +using NameOrNilReason = std::variant; +using StringOrNilReason = std::variant; + +struct CSL_OGC_EXPORT CodeType { + // attributes + std::optional codeSpace; + + // content + std::string content; + + virtual ~CodeType() = default; +}; + +struct CSL_OGC_EXPORT CodeWithAuthorityType final : CodeType { + CodeWithAuthorityType(std::string value, std::string codeSpace) { + CodeType::codeSpace = std::move(codeSpace); + content = std::move(value); + } + + std::string codeSpace() { + return CodeType::codeSpace.value(); + } +}; + +struct CSL_OGC_EXPORT MeasureType { + // attributes + std::string uom; + + // content + double content; +}; + +using UomIdentifier = std::string; + +struct CSL_OGC_EXPORT CoordinatesType { + // attributes + std::string decimal = "."; + std::string cs = ","; + std::string ts = " "; + + // content + std::string content; +}; + +using BooleanList = std::vector; +using DoubleList = std::vector; +using IntegerList = std::vector; +using NameList = std::vector; +using NCNameList = std::vector; +using QNameList = std::vector; +using BooleanOrNilReasonList = std::vector; +using NameOrNilReasonList = std::vector; +using DoubleOrNilReasonList = std::vector; +using IntegerOrNilReasonList = std::vector; + +struct CSL_OGC_EXPORT CodeListType { + // attributes + std::optional codeSpace; + + // content + NameList content; +}; + +struct CSL_OGC_EXPORT CodeOrNilReasonListType { + // attributes + std::optional codeSpace; + + // content + NameOrNilReasonList content; +}; + +struct CSL_OGC_EXPORT MeasureListType { + // attributes + UomIdentifier uom; + + // content + DoubleList content; +}; + +struct CSL_OGC_EXPORT MeasureOrNilReasonListType { + // attributes + UomIdentifier uom; + + // content + DoubleOrNilReasonList content; +}; + +} // namespace ogc::schemas::gml + +#endif // CSL_OGC_GML_BASIC_TYPES \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/gml/CoordinateOperations.hpp b/plugins/csl-ogc/src/schemas/gml/CoordinateOperations.hpp new file mode 100644 index 000000000..b70cac6f4 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/gml/CoordinateOperations.hpp @@ -0,0 +1,265 @@ +#ifndef CSL_OGC_GML_COORDINATE_OPERATIONS +#define CSL_OGC_GML_COORDINATE_OPERATIONS + +#include "Base.hpp" + +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::gml { + +struct CoordinateOperationAccuracyType; +struct CRSPropertyType; +struct OperationMethodPropertyType; +struct AbstractGeneralParameterValuePropertyType; +struct OperationParameterPropertyType; +struct OperationParameterGroupPropertyType; +struct FormulaCitationType; +struct AbstractGeneralOperationParameterPropertyType; + +struct CSL_OGC_EXPORT AbstractCoordinateOperationType : IdentifiedObjectType { + // child elements + std::optional domainOfValidity; + std::vector scope; + std::optional operationVersion; + std::vector coordinateOperationAccuracy; + std::optional sourceCRS; + std::optional targetCRS; + + ~AbstractCoordinateOperationType() override = default; +}; + +struct CSL_OGC_EXPORT CoordinateOperationAccuracyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional todo; // TODO +}; + +struct CSL_OGC_EXPORT CoordinateOperationPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional abstractCoordinateOperation; +}; + +struct CSL_OGC_EXPORT SingleOperationPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional abstractSingleOperation; +}; + +struct CSL_OGC_EXPORT AbstractGeneralConversionType : AbstractCoordinateOperationType { + // attributes + std::string id; + + // child elements + std::vector metaDataProperty; + std::optional description; + std::optional descriptionReference; + CodeWithAuthorityType identifier; + std::vector name; + std::optional remarks; + + ~AbstractGeneralConversionType() override = default; +}; + +struct CSL_OGC_EXPORT GeneralConversionPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional abstractGeneralConversion; +}; + +struct CSL_OGC_EXPORT AbstractGeneralTransformationType : AbstractCoordinateOperationType { + // attributes + std::string id; + + // child elements + std::vector metaDataProperty; + std::optional description; + std::optional descriptionReference; + CodeWithAuthorityType identifier; + std::vector name; + std::optional remarks; + + ~AbstractGeneralTransformationType() override = default; +}; + +struct CSL_OGC_EXPORT GeneralTransformationPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional abstractGeneralTransformation; +}; + +struct CSL_OGC_EXPORT ConcatenatedOperationType final : AbstractCoordinateOperationType { + // attributes + AggregationAttributeGroup aggregationAttributes; + + // child elements + std::vector coordOperations; + + ~ConcatenatedOperationType() final = default; +}; + +struct CSL_OGC_EXPORT ConcatenatedOperationPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional concatenatedOperation; +}; + +struct CSL_OGC_EXPORT PassThroughOperationType final : AbstractCoordinateOperationType { + // attributes + AggregationAttributeGroup aggregationAttributes; + + // child elements + std::vector modifiedCoordinate; + CoordinateOperationPropertyType coordOperation; + + ~PassThroughOperationType() final = default; +}; + +struct CSL_OGC_EXPORT PassThroughOperationPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional passThroughOperation; +}; + +struct CSL_OGC_EXPORT ConversionType final : AbstractGeneralConversionType { + // child items + OperationMethodPropertyType method; + std::vector parameterValues; + + ~ConversionType() final = default; +}; + +struct CSL_OGC_EXPORT ConversionPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional conversion; +}; + +struct CSL_OGC_EXPORT TransformationType final : AbstractGeneralTransformationType { + // child items + OperationMethodPropertyType method; + std::vector parameterValues; + + ~TransformationType() final = default; +}; + +struct CSL_OGC_EXPORT TransformationPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional passThroughOperation; +}; + +struct CSL_OGC_EXPORT AbstractGeneralParameterValueType { + virtual ~AbstractGeneralParameterValueType() = default; +}; + +struct CSL_OGC_EXPORT AbstractGeneralParameterValuePropertyType { + // child elements + AbstractGeneralParameterValueType abstractGeneralParameterValue; +}; + +struct CSL_OGC_EXPORT ParameterValueType final : AbstractGeneralParameterValueType { + // child elements + std::variant + value; + OperationParameterPropertyType operationParameter; +}; + +struct CSL_OGC_EXPORT ParameterValueGroupType final : AbstractGeneralParameterValueType { + // child elements + std::vector parameterValue; + OperationParameterGroupPropertyType group; +}; + +struct CSL_OGC_EXPORT OperationMethodType final : IdentifiedObjectType { + // child elements + std::variant formula; + std::optional sourceDimensions; + std::optional targetDimensions; + std::vector parameter; +}; + +struct CSL_OGC_EXPORT FormulaCitationType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional todo; // TODO +}; + +struct CSL_OGC_EXPORT OperationMethodPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional operationMethod; +}; + +struct CSL_OGC_EXPORT AbstractGeneralOperationParameterType : IdentifiedObjectType { + // child elements + std::optional minimumOccurs; + + ~AbstractGeneralOperationParameterType() override = default; +}; + +struct CSL_OGC_EXPORT AbstractGeneralOperationParameterPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional abstractGeneralOperationParameter; + + virtual ~AbstractGeneralOperationParameterPropertyType() = default; +}; + +struct CSL_OGC_EXPORT OperationParameterType final : AbstractGeneralOperationParameterType { + ~OperationParameterType() final = default; +}; + +struct CSL_OGC_EXPORT OperationParameterPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional operationParameter; +}; + +struct CSL_OGC_EXPORT OperationParameterGroupType final : AbstractGeneralOperationParameterType { + // child elements + std::optional maximumOccurs; + std::vector parameter; +}; + +struct CSL_OGC_EXPORT OperationParameterGroupPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional operationParameter; +}; + +} // namespace ogc::schemas::gml + +#endif // CSL_OGC_GML_COORDINATE_OPERATIONS diff --git a/plugins/csl-ogc/src/schemas/gml/CoordinateReferenceSystems.hpp b/plugins/csl-ogc/src/schemas/gml/CoordinateReferenceSystems.hpp new file mode 100644 index 000000000..50dfb8e3b --- /dev/null +++ b/plugins/csl-ogc/src/schemas/gml/CoordinateReferenceSystems.hpp @@ -0,0 +1,153 @@ +#ifndef CSL_OGC_GML_COORDINATE_REFERENCE_SYSTEMS +#define CSL_OGC_GML_COORDINATE_REFERENCE_SYSTEMS + +#include "BasicTypes.hpp" +#include "CoordinateOperations.hpp" +#include "DeprecatedTypes.hpp" + +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::gml { + +struct CSL_OGC_EXPORT SingleCRSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional abstractSingleCRS; +}; + +struct CSL_OGC_EXPORT AbstractGeneralDerivedCRSType : AbstractCRSType { + // child elements + GeneralConversionPropertyType conversion; +}; + +struct CSL_OGC_EXPORT CompoundCRSType : AbstractCRSType { + // attributes + AggregationAttributeGroup aggregationAttributeGroup; + + // child elements + std::vector componentReferenceSystems; +}; + +struct CSL_OGC_EXPORT CompoundCRSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional compoundCRS; +}; + +struct CSL_OGC_EXPORT GeodeticCRSType : AbstractCRSType { + // child elements + std::variant + coordinateSystem; + GeodeticDatumPropertyType geodeticDatum; +}; + +struct CSL_OGC_EXPORT GeodeticCRSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional geodeticCRS; +}; + +struct CSL_OGC_EXPORT VerticalCRSType : AbstractCRSType { + // child elements + VerticalCSPropertyType verticalCS; + VerticalDatumPropertyType verticalDatum; +}; + +struct CSL_OGC_EXPORT VerticalCRSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional verticalCRS; +}; + +struct CSL_OGC_EXPORT ProjectedCRSType : AbstractGeneralDerivedCRSType { + // child elements + std::variant baseCRS; + CartesianCSPropertyType cartesianCS; +}; + +struct CSL_OGC_EXPORT ProjectedCRSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional projectedCRS; +}; + +struct CSL_OGC_EXPORT DerivedCRSType : AbstractGeneralDerivedCRSType { + // child elements + SingleCRSPropertyType baseCRS; + CodeWithAuthorityType derivedCRSType; + CoordinateSystemPropertyType coordinateSystem; +}; + +struct CSL_OGC_EXPORT DerivedCRSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional derivedCRS; +}; + +struct CSL_OGC_EXPORT EngineeringCRSType : AbstractCRSType { + // child elements + std::variant + coordinateSystem; + + EngineeringDatumPropertyType engineeringDatum; +}; + +struct EngineeringCRSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional engineeringCRS; +}; + +struct CSL_OGC_EXPORT ImageCRSType : AbstractCRSType { + // child elements + std::variant + coordinateSystem; + + ImageDatumPropertyType imageDatum; +}; + +struct CSL_OGC_EXPORT ImageCRSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional imageCRS; +}; + +struct CSL_OGC_EXPORT TemporalCRSType : AbstractCRSType { + // child elements + std::variant coordinateSystem; + TemporalDatumPropertyType temporalDatum; +}; + +struct CSL_OGC_EXPORT TemporalCRSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional temporalCRS; +}; + +} // namespace ogc::schemas::gml + +#endif // CSL_OGC_GML_COORDINATE_REFERENCE_SYSTEMS diff --git a/plugins/csl-ogc/src/schemas/gml/CoordinateSystems.hpp b/plugins/csl-ogc/src/schemas/gml/CoordinateSystems.hpp new file mode 100644 index 000000000..ace1bf084 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/gml/CoordinateSystems.hpp @@ -0,0 +1,155 @@ +#ifndef CSL_OGC_GML_COORDINATE_SYSTEMS +#define CSL_OGC_GML_COORDINATE_SYSTEMS + +#include "BasicTypes.hpp" +#include "DeprecatedTypes.hpp" + +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::gml { + +struct CSL_OGC_EXPORT CoordinateSystemAxisType : IdentifiedObjectType { + // attributes + UomIdentifier uom; + + // child elements + CodeType axisAbbrev; + CodeWithAuthorityType axisDirection; + std::optional minimumValue; + std::optional maximumValue; + std::optional rangeMeaning; +}; + +struct CSL_OGC_EXPORT CoordinateSystemAxisPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional coordinateSystemAxis; +}; + +struct CSL_OGC_EXPORT AbstractCoordinateSystemType : IdentifiedObjectType { + // attributes + AggregationAttributeGroup aggregationAttributeGroup; + + // child elements + std::vector axes; +}; + +struct CSL_OGC_EXPORT CoordinateSystemPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional abstractCoordinateSystem; +}; + +struct CSL_OGC_EXPORT EllipsoidalCSType : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT EllipsoidalCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional ellipsoidalCS; +}; + +struct CSL_OGC_EXPORT CartesianCSType : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT CartesianCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional CartesianCS; +}; + +struct CSL_OGC_EXPORT VerticalCSType : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT VerticalCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional VerticalCS; +}; + +struct CSL_OGC_EXPORT TimeCSType : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT TimeCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional TimeCS; +}; + +struct CSL_OGC_EXPORT LinearCSType : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT LinearCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional LinearCS; +}; + +struct CSL_OGC_EXPORT UserDefinedCSType : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT UserDefinedCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional UserDefinedCS; +}; + +struct CSL_OGC_EXPORT SphericalCSType : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT SphericalCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional SphericalCS; +}; + +struct CSL_OGC_EXPORT PolarCSType : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT PolarCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional PolarCS; +}; + +struct CSL_OGC_EXPORT CylindricalCSType : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT CylindricalCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional CylindricalCS; +}; + +struct CSL_OGC_EXPORT AffineCSType : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT AffineCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional AffineCS; +}; + + + +} // namespace ogc::schemas::gml + +#endif // CSL_OGC_GML_COORDINATE_SYSTEMS diff --git a/plugins/csl-ogc/src/schemas/gml/Coverage.hpp b/plugins/csl-ogc/src/schemas/gml/Coverage.hpp new file mode 100644 index 000000000..2fb00966c --- /dev/null +++ b/plugins/csl-ogc/src/schemas/gml/Coverage.hpp @@ -0,0 +1,111 @@ +#ifndef CSL_OGC_GML_COVERAGE +#define CSL_OGC_GML_COVERAGE + +#include "Feature.hpp" + +#include +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::gml { + +struct DomainSetType; +struct RangeSetType; +struct CoverageFunctionType; +struct DataBlockType; +struct FileType; +struct MappingRuleType; +struct GridFunctionType; +struct SequenceRuleType; + +struct CSL_OGC_EXPORT AbstractCoverageType : AbstractFeatureType { + // child elements + DomainSetType domainSet; + RangeSetType rangeSet; +}; + +struct CSL_OGC_EXPORT DiscreteCoverageType : AbstractCoverageType { + // child elements + std::optional coverageFunction; +}; + +struct CSL_OGC_EXPORT AbstractContinuousCoverageType : AbstractCoverageType { + // child elements + std::optional coverageFunction; +}; + +struct CSL_OGC_EXPORT DomainSetType { + // attributes + OwnershipAttributeGroup ownershipAttributeGroup; + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::variant domainSet; +}; + +struct CSL_OGC_EXPORT RangeSetType { + // child elements + std::optional, std::vector, DataBlockType, FileType> + rangeSet; +}; + +struct CSL_OGC_EXPORT DataBlockType { + // child elements + AssociationRoleType rangeParameters; + std::variant data; +}; + +struct CSL_OGC_EXPORT FileType { + // child elements + AssociationRoleType rangeParameters; + std::string file; + CodeType fileStructure; + std::optional mimeType; + std::optional compression; +}; + +struct CSL_OGC_EXPORT CoverageFunctionType { + // child elements + StringOrRefType mappingRule; + MappingRuleType coverageMappingRule; + GridFunctionType gridFunction; +}; + +struct CSL_OGC_EXPORT MappingRuleType { + // child elements + std::variant rule; +}; + +struct CSL_OGC_EXPORT GridFunctionType { + // child elements + std::optional sequenceRule; + std::optional startPoint; +}; + +enum class SequenceRuleEnumeration { + LINEAR, + BOUSTROPHEDONIC, + CENTER_DIAGONAL, + SPIRAL, + MORTON, + HILBERT +}; + +using AxisDirection = std::string; +using AxisDirectionList = std::vector; + +struct CSL_OGC_EXPORT SequenceRuleType { + // attributes + std::optional order; + std::optional axisOrder; + + // content + SequenceRuleEnumeration content; +}; + +} // namespace ogc::schemas::gml + +#endif // CSL_OGC_GML_COVERAGE diff --git a/plugins/csl-ogc/src/schemas/gml/Datums.hpp b/plugins/csl-ogc/src/schemas/gml/Datums.hpp new file mode 100644 index 000000000..8ec37e1c2 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/gml/Datums.hpp @@ -0,0 +1,137 @@ +#ifndef CSL_OGC_GML_DATUMS +#define CSL_OGC_GML_DATUMS + +#include "Feature.hpp" + +#include +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::gml { + +struct CSL_OGC_EXPORT AbstractDatumType : IdentifiedObjectType { + // child elements + std::optional domainOfValidity; + std::vector scope; + std::optional anchorDefinition; + std::optional realizationEpoch; +}; + +struct CSL_OGC_EXPORT DatumPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional abstractDatum; +}; + +struct CSL_OGC_EXPORT GeodeticDatumType : AbstractDatumType { + // child elements + PrimeMeridianPropertyType primeMeridian; + EllipsoidPropertyType ellipsoid; +}; + +struct CSL_OGC_EXPORT GeodeticDatumPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional geodeticDatum; +}; + +using SecondDefiningParameter = std::variant; + +struct CSL_OGC_EXPORT EllipsoidType : IdentifiedObjectType { + // child elements + MeasureType semiMajorAxis; + SecondDefiningParameter secondDefiningParameter; +}; + +struct CSL_OGC_EXPORT EllipsoidPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional ellipsoid; +}; + +struct CSL_OGC_EXPORT PrimeMeridianType : IdentifiedObjectType { + // child elements + AngleType greenwichLongitude; +}; + +struct CSL_OGC_EXPORT PrimeMeridianPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional primeMeridian; +}; + +struct CSL_OGC_EXPORT EngineeringDatumType : AbstractDatumType {}; + +struct CSL_OGC_EXPORT EngineeringDatumPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional engineeringDatum; +}; + +struct CSL_OGC_EXPORT ImageDatumType : AbstractDatumType { + // child elements + CodeWithAuthorityType pixelInCell; +}; + +struct CSL_OGC_EXPORT ImageDatumPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional imageDatum; +}; + +struct CSL_OGC_EXPORT VerticalDatumType : AbstractDatumType {}; + +struct CSL_OGC_EXPORT VerticalDatumPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional verticalDatum; +}; + +struct CSL_OGC_EXPORT TemporalDatumBaseType : AbstractDatumType { + // attributes + std::string id; + + // child elements + std::vector metaDataProperties; + std::optional description; + std::optional descriptionReference; + CodeWithAuthorityType identifier; + std::vector names; + std::optional remarks; + std::optional domainOfValidity; + std::vector scope; +}; + +struct CSL_OGC_EXPORT TemporalDatumType : TemporalDatumBaseType { + // child elements + std::string origin; +}; + +struct CSL_OGC_EXPORT TemporalDatumPropertyType { + // attributes + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional temporalDatum; +}; + +} // namespace ogc::schemas::gml + +#endif // CSL_OGC_GML_DATUMS diff --git a/plugins/csl-ogc/src/schemas/gml/DefaultStyles.hpp b/plugins/csl-ogc/src/schemas/gml/DefaultStyles.hpp new file mode 100644 index 000000000..ac26b683a --- /dev/null +++ b/plugins/csl-ogc/src/schemas/gml/DefaultStyles.hpp @@ -0,0 +1,159 @@ +#ifndef CSL_OGC_GML_DEFAULT_STYLES +#define CSL_OGC_GML_DEFAULT_STYLES + +#include "Base.hpp" + +#include +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::gml { + +struct AbstractStyleType; +struct FeatureStylePropertyType; +struct GraphStylePropertyType; +struct FeatureStyleType; +struct GeometryStylePropertyType; +struct TopologyStylePropertyType; +struct LabelStylePropertyType; +struct StyleVariationType; +struct GeometryStyleType; +struct SymbolType; +struct TopologyStyleType; +struct LabelStyleType; +struct LabelType; +struct GraphStyleType; +struct GraphTypeType; +struct DrawingTypeType; +struct LineTypeType; +struct AesheticCriteriaType; + +struct CSL_OGC_EXPORT DefaultStylePropertyType { + // attributes + std::optional about; + AssociationAttributeGroup associationAttributeGroup; + + // child elements + AbstractStyleType abstractStyle; +}; + +struct CSL_OGC_EXPORT AbstractStyleType : AbstractGMLType {}; + +struct CSL_OGC_EXPORT StyleType : AbstractStyleType { + // child elements + std::vector featureStyles; + std::optional graphStyle; +}; + +struct CSL_OGC_EXPORT FeatureStylePropertyType { + // attributes + std::optional about; + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional featureStyle; +}; + +enum struct CSL_OGC_EXPORT QueryGrammarEnumeration { XPATH, XQUERY, OTHER }; + +struct CSL_OGC_EXPORT FeatureStyleType : AbstractGMLType { + // attributes + std::optional featureType; + std::optional baseType; + std::optional queryGrammar; + + // child elements + std::optional featureConstraints; + std::vector geometryStyles; + std::vector topologyStyles; + std::optional labelStyle; +}; + +struct CSL_OGC_EXPORT BaseStyleDescriptorType : AbstractGMLType { + // child elements + std::optional spatialResolution; + std::vector styleVariations; + // TODO: smil20 elements +}; + +struct CSL_OGC_EXPORT GeometryStylePropertyType { + // attributes + std::optional about; + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional geometryStyle; +}; + +struct CSL_OGC_EXPORT GeometryStyleType : BaseStyleDescriptorType { + // attributes + std::optional geometryProperty; + std::optional geometryType; + + // child elements + std::variant style; + std::optional labelStyle; +}; + +struct CSL_OGC_EXPORT TopologyStylePropertyType { + // attributes + std::optional about; + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional topologyStyle; +}; + +struct CSL_OGC_EXPORT TopologyStyleType : BaseStyleDescriptorType { + // attributes + std::optional topologyProperty; + std::optional topologyType; + + // child elements + std::variant style; + std::optional labelStyle; +}; + +struct CSL_OGC_EXPORT LabelStylePropertyType { + // attributes + std::optional about; + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional labelStyle; +}; + +struct CSL_OGC_EXPORT LabelStyleType : BaseStyleDescriptorType { + // child elements + std::string style; + LabelType label; +}; + +struct CSL_OGC_EXPORT GraphStylePropertyType { + // attributes + std::optional about; + AssociationAttributeGroup associationAttributeGroup; + + // child elements + std::optional graphStyle; +}; + +struct CSL_OGC_EXPORT GraphStyleType : BaseStyleDescriptorType { + // child elements + std::optional planar; + std::optional directed; + std::optional grid; + std::optional minDistance; + std::optional minAngle; + std::optional graphType; + std::optional drawingType; + std::optional lineType; + std::vector aestheticCriteria; +}; + +} // namespace ogc::schemas::gml + +#endif // CSL_OGC_GML_DEFAULT_STYLES diff --git a/plugins/csl-ogc/src/schemas/gml/DeprecatedTypes.hpp b/plugins/csl-ogc/src/schemas/gml/DeprecatedTypes.hpp new file mode 100644 index 000000000..413f966f2 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/gml/DeprecatedTypes.hpp @@ -0,0 +1,221 @@ +#ifndef CSL_OGC_GML_DEPRECATED_TYPES +#define CSL_OGC_GML_DEPRECATED_TYPES + +#include +#include + +#include "Feature.hpp" +#include "Base.hpp" + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::gml { + +struct AbstractMetaDataType; +struct DegreesType; +struct DefinitionProxyType; + +struct CSL_OGC_EXPORT OperationPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional abstractOperation; +}; + +struct CSL_OGC_EXPORT TemporalCSType final : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT TemporalCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional temporalCS; +}; + +struct CSL_OGC_EXPORT ObliqueCartesianCSType final : AbstractCoordinateSystemType {}; + +struct CSL_OGC_EXPORT ObliqueCartesianCSPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional obliqueCartesianCS; +}; + +struct CSL_OGC_EXPORT GeographicCRSType final : AbstractCRSType { + // child elements + EllipsoidalCSPropertyType usesEllipsoidalCS; + GeodeticDatumPropertyType usesGeodeticDatum; +}; + +struct CSL_OGC_EXPORT GeographicCRSPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional geographicCRS; +}; + +struct CSL_OGC_EXPORT GeocentricCRSType final : AbstractCRSType { + // child elements + std::variant usesCSProperty; + GeodeticDatumPropertyType usesGeodeticDatum; +}; + +struct CSL_OGC_EXPORT GeocentricCRSPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional geocentricCRS; +}; + +enum class SuccessionType { SUBSTITUTION, DIVISION, FUSION, INITIATION }; + +using DecimalMinutesType = double; +using ArcMinutesType = uint8_t; +using ArcSecondsType = double; + +struct CSL_OGC_EXPORT DMSAngleType { + struct ArcFractionsType { + ArcMinutesType minutes; + std::optional seconds; + }; + + // child elements + DegreesType degrees; + + std::variant angle; +}; + +using DegreeValueType = uint16_t; + +struct DegreesType { + // attributes + enum class DirectionType { + N, + E, + S, + W, + PLUS, + MINUS, + } direction; + + // content + DegreeValueType degrees; +}; + +using AngleChoiceType = std::variant; + +struct CSL_OGC_EXPORT ArrayAssociationType { + // attributes + OwnershipAttributeGroup ownershipAttributes; + + // child elements + std::vector abstractObjects; +}; + +struct CSL_OGC_EXPORT StringOrRefType { + // attributes + AssociationAttributeGroup associationAttributes; + + // content + std::string content; +}; + +struct CSL_OGC_EXPORT BagType final : AbstractGMLType { + // child elements + std::vector members; + std::optional membersArray; +}; + +struct CSL_OGC_EXPORT ArrayType final : AbstractGMLType { + // child elements + std::optional membersArray; +}; + +struct CSL_OGC_EXPORT MetaDataPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + std::string about; + + // child elements + std::optional abstractMetaData; +}; + +struct CSL_OGC_EXPORT AbstractMetaDataType { + // attributes + std::string id; +}; + +struct CSL_OGC_EXPORT GenericMetaDataType : AbstractMetaDataType { + // child elements + std::vector children; +}; + +struct CSL_OGC_EXPORT LocationPropertyType { + // attributes + AssociationAttributeGroup associationAttributes; + + // child elements + std::variant locationProperty; +}; + +struct CSL_OGC_EXPORT PriorityLocationPropertyType final : LocationPropertyType { + // attributes + std::string priority; +}; + +struct CSL_OGC_EXPORT FeatureArrayPropertyType { + // child elements + std::vector abstractFeatures; +}; + +struct CSL_OGC_EXPORT BoundedFeatureType : AbstractFeatureType { + // child elements + StandardObjectProperties standardObjectProperties; +}; + +struct CSL_OGC_EXPORT AbstractFeatureCollectionType : AbstractFeatureType { + // child elements + std::vector featureMember; + std::optional featureMemberArray; +}; + +struct CSL_OGC_EXPORT FeatureCollectionType final : AbstractFeatureCollectionType {}; + +struct CSL_OGC_EXPORT IndirectEntryType { + // child elements + DefinitionProxyType definitionProxy; +}; + +struct CSL_OGC_EXPORT DefinitionProxyType final : DefinitionType { + // child elements + ReferenceType definitionRef; +}; + +enum class CSL_OGC_EXPORT IncrementOrder { + PLUS_X_PLUS_Y, + PLUS_Y_PLUS_X, + PLUS_X_MINUS_Y, + MINUS_X_MINUS_Y, +}; + +struct CSL_OGC_EXPORT MovingObjectStatusType final : AbstractTimeSliceType { + // child elements + std::variant + place; + + std::optional speed; + std::optional bearing; + std::optional acceleration; + std::optional elevation; + std::optional status; + std::optional statusReference; +}; + +} // namespace ogc::schemas::gml + +#endif // CSL_OGC_GML_DEPRECATED_TYPES diff --git a/plugins/csl-ogc/src/schemas/gml/Feature.hpp b/plugins/csl-ogc/src/schemas/gml/Feature.hpp new file mode 100644 index 000000000..ae0a5db81 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/gml/Feature.hpp @@ -0,0 +1,59 @@ +#ifndef CSL_OGC_GML_FEATURE +#define CSL_OGC_GML_FEATURE + +#include "Base.hpp" +#include "DeprecatedTypes.hpp" + +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::gml { + +struct BoundingShapeType; + +struct CSL_OGC_EXPORT AbstractFeatureType : AbstractGMLType { + // child elements + std::optional boundedBy; + std::optional location; + + ~AbstractFeatureType() override = default; +}; + +struct CSL_OGC_EXPORT FeaturePropertyType { + // attributes + OwnershipAttributeGroup ownershipAttributes; + AssociationAttributeGroup associationAttributes; + + // child elements + std::optional abstractFeature; +}; + +struct CSL_OGC_EXPORT BoundingShapeType { + // attributes + std::optional nilReason; + + // child items + std::variant envelope; +}; + +struct CSL_OGC_EXPORT EnvelopeWithTimePeriodType final : EnvelopeType { + // attributes + std::string frame = "#ISO-8601"; + + // child elements + TimePositionType beginPosition; + TimePositionType endPosition; +}; + +struct CSL_OGC_EXPORT AbstractFeatureMemberType { + // attributes + OwnershipAttributeGroup ownershipAttributes; + + virtual ~AbstractFeatureMemberType() = default; +}; + +} // namespace ogc::schemas::gml + +#endif // CSL_OGC_GML_FEATURE diff --git a/plugins/csl-ogc/src/schemas/gmlcov/Coverage.hpp b/plugins/csl-ogc/src/schemas/gmlcov/Coverage.hpp new file mode 100644 index 000000000..bf704c8de --- /dev/null +++ b/plugins/csl-ogc/src/schemas/gmlcov/Coverage.hpp @@ -0,0 +1,79 @@ +#ifndef CSL_OGC_GMLCOV_COVERAGE +#define CSL_OGC_GMLCOV_COVERAGE + +#include +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::gmlcov { + +struct ExtensionType; +struct AbstractCoverageType; +struct AbstractDiscreteCoverageType; +struct AbstractContinuousCoverageType; +struct MetadataType; + +using DataRecordPropertyType = std::any; // Placeholder for the actual type. +using AbstractMetadataPropertyType = std::any; // Placeholder for the actual type. + +struct CSL_OGC_EXPORT AbstractCoverageType { + // child elements + std::optional coverageFunction; // Placeholder for the actual gml:coverageFunction type. + DataRecordPropertyType rangeType; + std::vector metadata; +}; + +struct CSL_OGC_EXPORT MetadataType : public AbstractMetadataPropertyType { + // child elements + std::optional extension; + // attributes + // This inherits gml:AssociationAttributeGroup attributes. +}; + +struct CSL_OGC_EXPORT ExtensionType { + // child elements + std::vector children; +}; + +struct CSL_OGC_EXPORT AbstractDiscreteCoverageType : public AbstractCoverageType { + // No additional elements, inherits everything from AbstractCoverageType. +}; + +struct CSL_OGC_EXPORT AbstractContinuousCoverageType : public AbstractCoverageType { + // No additional elements, inherits everything from AbstractCoverageType. +}; + +struct CSL_OGC_EXPORT MultiPointCoverage : public AbstractDiscreteCoverageType { + // Inherits everything from AbstractDiscreteCoverageType. +}; + +struct CSL_OGC_EXPORT MultiCurveCoverage : public AbstractDiscreteCoverageType { + // Inherits everything from AbstractDiscreteCoverageType. +}; + +struct CSL_OGC_EXPORT MultiSurfaceCoverage : public AbstractDiscreteCoverageType { + // Inherits everything from AbstractDiscreteCoverageType. +}; + +struct CSL_OGC_EXPORT MultiSolidCoverage : public AbstractDiscreteCoverageType { + // Inherits everything from AbstractDiscreteCoverageType. +}; + +struct CSL_OGC_EXPORT GridCoverage : public AbstractDiscreteCoverageType { + // Inherits everything from AbstractDiscreteCoverageType. +}; + +struct CSL_OGC_EXPORT RectifiedGridCoverage : public AbstractDiscreteCoverageType { + // Inherits everything from AbstractDiscreteCoverageType. +}; + +struct CSL_OGC_EXPORT ReferenceableGridCoverage : public AbstractDiscreteCoverageType { + // Inherits everything from AbstractDiscreteCoverageType. +}; + +} // namespace ogc::schemas::gmlcov + +#endif // CSL_OGC_GMLCOV_COVERAGE diff --git a/plugins/csl-ogc/src/schemas/ows/19115subset.hpp b/plugins/csl-ogc/src/schemas/ows/19115subset.hpp new file mode 100644 index 000000000..a686e5460 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/19115subset.hpp @@ -0,0 +1,102 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_19115_SUBSET +#define CSL_OGC_OWS_19115_SUBSET + +#include +#include +#include + +#include "../xlink/XLink.hpp" + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::ows { + +struct OnlineResourceType; +struct AddressType; +struct TelephoneType; +struct ContactType; +struct CodeType; + +struct CSL_OGC_EXPORT LanguageStringType { + // attributes + std::optional lang; + + // content + std::string content; +}; + +struct CSL_OGC_EXPORT KeywordsType { + // child elements + std::vector keywords; + std::optional type; +}; + +struct CSL_OGC_EXPORT CodeType { + // attributes + std::optional codeSpace; + + // content + std::string content; + + virtual ~CodeType() = default; +}; + +struct CSL_OGC_EXPORT ResponsiblePartyType { + // child elements + std::optional individualName; + std::optional organizationName; + std::optional positionName; + std::optional contactInfo; + CodeType role; +}; + +struct CSL_OGC_EXPORT ResponsiblePartySubsetType { + // child elements + std::optional individualName; + std::optional positionName; + std::optional contactInfo; + std::optional role; +}; + +struct CSL_OGC_EXPORT ContactType { + // child elements + std::optional phone; + std::optional address; + std::optional onlineResource; + std::optional hoursOfService; + std::optional contactInstructions; +}; + +struct CSL_OGC_EXPORT TelephoneType { + // child elements + std::vector voiceNumbers; + std::vector facsimileNumbers; +}; + +struct CSL_OGC_EXPORT AddressType { + // child elements + std::vector deliveryPoint; + std::optional city; + std::optional administrativeArea; + std::optional postalCode; + std::optional country; + std::vector electronicMailAddresses; +}; + +struct CSL_OGC_EXPORT OnlineResourceType { + // attributes + xlink::SimpleAttrsGroup simpleAttributes; + + virtual ~OnlineResourceType() = default; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_19115_SUBSET \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/ows/AdditionalParameters.hpp b/plugins/csl-ogc/src/schemas/ows/AdditionalParameters.hpp new file mode 100644 index 000000000..5120ed4a1 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/AdditionalParameters.hpp @@ -0,0 +1,51 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_ADDITIONAL_PARAMETERS +#define CSL_OGC_OWS_ADDITIONAL_PARAMETERS + +#include "19115subset.hpp" +#include "Common.hpp" + +#include + +#include "csl_ogc_export.hpp" + +#include + +namespace ogc::schemas::ows { + +struct CSL_OGC_EXPORT AdditionalParameterType final : AbstractMetadataType { + CodeType name; + std::vector values; +}; + +struct CSL_OGC_EXPORT AdditionalParametersBaseType : MetadataType { + AdditionalParametersBaseType() { + abstractMetadata = std::make_unique(); + } + + AdditionalParameterType* getAdditionalParameter() const { + return dynamic_cast(abstractMetadata.get()); + } + + ~AdditionalParametersBaseType() override = default; +}; + +struct CSL_OGC_EXPORT AdditionalParametersType final : AdditionalParametersBaseType { + // child element + std::vector additionalParameters; +}; + +struct CSL_OGC_EXPORT NilValueType final : CodeType { + // attributes + std::optional nilReason; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_ADDITIONAL_PARAMETERS \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/ows/Common.hpp b/plugins/csl-ogc/src/schemas/ows/Common.hpp new file mode 100644 index 000000000..8303ea3e6 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/Common.hpp @@ -0,0 +1,63 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_COMMON +#define CSL_OGC_OWS_COMMON + +#include +#include +#include +#include +#include + +#include "../xlink/XLink.hpp" + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::ows { + +using MimeType = std::string; +using VersionType = std::string; +using PositionType = std::vector; + +struct AbstractMetadataType { + virtual ~AbstractMetadataType() = default; +}; + +struct MetadataType { + // attributes + xlink::SimpleAttrsGroup simpleAttributes; + + // child elements + std::unique_ptr abstractMetadata; + + virtual ~MetadataType() = default; +}; + +struct CSL_OGC_EXPORT BoundingBoxType { + // attributes + std::optional crs; + std::optional dimensions; + + // child elements + PositionType lowerCorner; + PositionType upperCorner; + + virtual ~BoundingBoxType() = default; +}; + +struct CSL_OGC_EXPORT WGS84BoundingBoxType final : BoundingBoxType { + WGS84BoundingBoxType() + : BoundingBoxType() { + dimensions = 2; + crs = "urn:ogc:def:crs:OGC:2:84"; + } +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_COMMON \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/ows/Contents.hpp b/plugins/csl-ogc/src/schemas/ows/Contents.hpp new file mode 100644 index 000000000..b3bff2dff --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/Contents.hpp @@ -0,0 +1,41 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_CONTENTS +#define CSL_OGC_OWS_CONTENTS + +#include "Common.hpp" +#include "DataIdentification.hpp" + +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::ows { + +struct DatasetDescriptionSummaryBaseType; + +struct CSL_OGC_EXPORT ContentsBaseType { + // child elements + std::vector datasetDescriptionSummaries; + std::vector otherSources; + + virtual ~ContentsBaseType() = default; +}; + +struct CSL_OGC_EXPORT DatasetDescriptionSummaryBaseType final : DescriptionType { + // child elements + std::vector wgs84BoundingBoxes; + CodeType identifier; + std::vector boundingBoxes; + std::vector metadata; + std::vector datasetDescriptionSummaries; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_CONTENTS \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/ows/DataIdentification.hpp b/plugins/csl-ogc/src/schemas/ows/DataIdentification.hpp new file mode 100644 index 000000000..ed9d02df9 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/DataIdentification.hpp @@ -0,0 +1,48 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_DATA_IDENTIFICATION +#define CSL_OGC_OWS_DATA_IDENTIFICATION + +#include "19115subset.hpp" +#include "Common.hpp" + +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::ows { + +struct CSL_OGC_EXPORT DescriptionType { + // child elements + std::vector titles; + std::vector abstracts; + std::vector keywords; + + virtual ~DescriptionType() = default; +}; + +struct CSL_OGC_EXPORT BasicIdentificationType : DescriptionType { + // child elements + std::optional identifier; + std::vector metaData; + + ~BasicIdentificationType() override = default; +}; + +struct CSL_OGC_EXPORT IdentificationType final : BasicIdentificationType { + // child elements + std::vector boundingBoxes; + std::vector outputFormats; + std::vector availableCRSs; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_DATA_IDENTIFICATION \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/ows/DomainType.hpp b/plugins/csl-ogc/src/schemas/ows/DomainType.hpp new file mode 100644 index 000000000..446657f06 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/DomainType.hpp @@ -0,0 +1,92 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_DOMAIN_TYPE +#define CSL_OGC_OWS_DOMAIN_TYPE + +#include "Common.hpp" + +#include +#include +#include + +#include "csl_ogc_export.hpp" + +#include +#include + +namespace ogc::schemas::ows { + +struct ReferenceSystem; +struct UOM; +struct RangeType; +struct ValuesReferenceType; +struct UnNamedDomainType; +struct DomainMetadataType; + +using AllowedValues = std::vector>; + +struct CSL_OGC_EXPORT DomainType final : UnNamedDomainType { + // attributes + std::string name; +}; + +struct CSL_OGC_EXPORT UnNamedDomainType { + // child elements + std::variant possibleValues; + + std::optional defaultValue; + std::optional meaning; + std::optional dataType; + std::optional> valuesUnit; + std::vector metaData; + + virtual ~UnNamedDomainType() = default; +}; + +struct CSL_OGC_EXPORT ValuesReferenceType { + // attributes + std::string reference; + + // content + std::string content; +}; + +enum class RangeClosureType { + CLOSED, + OPEN, + OPEN_CLOSED, + CLOSED_OPEN, +}; + +struct CSL_OGC_EXPORT RangeType { + // attributes + std::optional rangeClosure; + + // child elements + std::optional minimumValue; + std::optional maximumValue; + std::optional spacing; +}; + +struct CSL_OGC_EXPORT DomainMetadataType { + // attributes + std::optional reference; + + // content + std::string content; + + ~DomainMetadataType() = default; +}; + +struct CSL_OGC_EXPORT UOM : DomainMetadataType {}; + +struct CSL_OGC_EXPORT ReferenceSystem : DomainMetadataType {}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_DOMAIN_TYPE diff --git a/plugins/csl-ogc/src/schemas/ows/ExceptionReport.hpp b/plugins/csl-ogc/src/schemas/ows/ExceptionReport.hpp new file mode 100644 index 000000000..29ae333fb --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/ExceptionReport.hpp @@ -0,0 +1,41 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_EXCEPTION_REPORT +#define CSL_OGC_OWS_EXCEPTION_REPORT + +#include "csl_ogc_export.hpp" + +#include +#include +#include + +namespace ogc::schemas::ows { + +struct ExceptionType; + +struct CSL_OGC_EXPORT ExceptionReportType { + // attributes + std::string version; + std::optional lang; + + // child elements + std::vector exceptions; +}; + +struct CSL_OGC_EXPORT ExceptionType { + // attributes + std::string exceptionCode; + std::optional locator; + + // child elements + std::vector exceptionTexts; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_EXCEPTION_REPORT \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/ows/GetCapabilitiesType.hpp b/plugins/csl-ogc/src/schemas/ows/GetCapabilitiesType.hpp new file mode 100644 index 000000000..3633fe9f6 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/GetCapabilitiesType.hpp @@ -0,0 +1,76 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_GET_CAPABILITIES +#define CSL_OGC_OWS_GET_CAPABILITIES + +#include "OperationsMetadataType.hpp" +#include "ServiceIdentificationType.hpp" +#include "ServiceProviderType.hpp" + +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::ows { + +struct AcceptVersionsType; +struct SectionsType; +struct AcceptFormatsType; +struct LanguagesType; + +using ServiceType = std::string; +using UpdateSequenceType = std::string; + +struct CSL_OGC_EXPORT CapabilitiesBaseType { + // attributes + VersionType version; + std::optional updateSequence; + + // child elements + std::optional serviceIdentification; + std::optional serviceProvider; + std::optional operationsMetadata; + std::optional languages; + + virtual ~CapabilitiesBaseType() = default; +}; + +struct CSL_OGC_EXPORT GetCapabilitiesType { + // attributes + std::optional updateSequence; + + // child elements + std::optional acceptVersions; + std::optional sections; + std::optional acceptFormats; + std::optional acceptLanguages; + + virtual ~GetCapabilitiesType() = default; +}; + +struct CSL_OGC_EXPORT LanguagesType { + std::vector languages; +}; + +struct CSL_OGC_EXPORT AcceptVersionsType { + std::vector versions; +}; + +struct CSL_OGC_EXPORT SectionsType { + std::vector sections; +}; + +struct CSL_OGC_EXPORT AcceptFormatsType { + std::vector mimeFormats; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_GET_CAPABILITIES \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/ows/GetResourceByID.hpp b/plugins/csl-ogc/src/schemas/ows/GetResourceByID.hpp new file mode 100644 index 000000000..187ef30f3 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/GetResourceByID.hpp @@ -0,0 +1,35 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_GET_RESOURCE_BY_ID +#define CSL_OGC_OWS_GET_RESOURCE_BY_ID + +#include "Common.hpp" +#include "GetCapabilitiesType.hpp" + +#include + +#include "csl_ogc_export.hpp" + +#include +#include + +namespace ogc::schemas::ows { + +struct CSL_OGC_EXPORT GetResourceByIdType { + // attributes + ServiceType service; + VersionType version; + + // child elements + std::vector resourceIDs; + std::optional outputFormat; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_GET_RESOURCE_BY_ID \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/ows/InputOutputData.hpp b/plugins/csl-ogc/src/schemas/ows/InputOutputData.hpp new file mode 100644 index 000000000..4b745fa93 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/InputOutputData.hpp @@ -0,0 +1,27 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_INPUT_OUTPUT_DATA +#define CSL_OGC_OWS_INPUT_OUTPUT_DATA + +#include "Manifest.hpp" + +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::ows { + +struct CSL_OGC_EXPORT ServiceReferenceType final : ReferenceType { + // child elements + std::variant requestMessage; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_INPUT_OUTPUT_DATA \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/ows/Manifest.hpp b/plugins/csl-ogc/src/schemas/ows/Manifest.hpp new file mode 100644 index 000000000..9ea9328d9 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/Manifest.hpp @@ -0,0 +1,59 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_MANIFEST +#define CSL_OGC_OWS_MANIFEST + +#include "19115subset.hpp" +#include "Common.hpp" +#include "DataIdentification.hpp" + +#include + +#include "csl_ogc_export.hpp" + +#include +#include + +namespace ogc::schemas::ows { + +struct CSL_OGC_EXPORT AbstractReferenceBaseType { + // attributes + std::string type = "simple"; + std::string href; + std::optional role; + std::optional arcrole; + std::optional title; + std::optional show; + std::optional actuate; + + virtual ~AbstractReferenceBaseType() = default; +}; + +struct CSL_OGC_EXPORT ReferenceType : AbstractReferenceBaseType { + // child elements + std::optional identifier; + std::vector abstracts; + std::optional format; + std::vector metadata; + + ~ReferenceType() override = default; +}; + +struct CSL_OGC_EXPORT ReferenceGroupType final : BasicIdentificationType { + // child elements + std::vector> references; +}; + +struct CSL_OGC_EXPORT ManifestType final : BasicIdentificationType { + // child elements + std::vector referenceGroups; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_MANIFEST \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/ows/OperationsMetadataType.hpp b/plugins/csl-ogc/src/schemas/ows/OperationsMetadataType.hpp new file mode 100644 index 000000000..fde3dba09 --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/OperationsMetadataType.hpp @@ -0,0 +1,58 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_OPERATIONS_METADATA +#define CSL_OGC_OWS_OPERATIONS_METADATA + +#include "19115subset.hpp" +#include "DomainType.hpp" + +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::ows { + +struct HTTPType; +struct OperationType; +struct RequestMethodType; + +struct CSL_OGC_EXPORT OperationsMetadataType { + // child elements + std::vector operations; + std::vector parameters; + std::vector constraints; + std::optional extendedCapabilities; +}; + +struct CSL_OGC_EXPORT OperationType { + // attributes + std::string name; + + // child elements + std::vector> dcps; + std::vector parameters; + std::vector constraints; + std::vector metadata; +}; + +struct CSL_OGC_EXPORT HTTPType { + // child elements + std::vector gets; + std::vector posts; +}; + +struct CSL_OGC_EXPORT RequestMethodType final : OnlineResourceType { + // child elements + std::vector constraints; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_OPERATIONS_METADATA diff --git a/plugins/csl-ogc/src/schemas/ows/ServiceIdentificationType.hpp b/plugins/csl-ogc/src/schemas/ows/ServiceIdentificationType.hpp new file mode 100644 index 000000000..dfd96dddd --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/ServiceIdentificationType.hpp @@ -0,0 +1,32 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_SERVICE_IDENTIFICATION +#define CSL_OGC_OWS_SERVICE_IDENTIFICATION + +#include "DataIdentification.hpp" + +#include +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::ows { + +struct CSL_OGC_EXPORT ServiceIdentificationType final : DescriptionType { + // child elements + CodeType serviceType; + std::vector versions; + std::vector profiles; + std::optional fees; + std::vector accessConstraints; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_SERVICE_IDENTIFICATION \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/ows/ServiceProviderType.hpp b/plugins/csl-ogc/src/schemas/ows/ServiceProviderType.hpp new file mode 100644 index 000000000..29d58dbbc --- /dev/null +++ b/plugins/csl-ogc/src/schemas/ows/ServiceProviderType.hpp @@ -0,0 +1,29 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_OWS_SERVICE_PROVIDER +#define CSL_OGC_OWS_SERVICE_PROVIDER + +#include "DataIdentification.hpp" + +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::ows { + +struct CSL_OGC_EXPORT ServiceProviderType { + // child elements + std::string providerName; + std::optional providerSite; + ResponsiblePartySubsetType serviceContact; +}; + +} // namespace ogc::schemas::ows + +#endif // CSL_OGC_OWS_SERVICE_PROVIDER \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/wcs/Common.hpp b/plugins/csl-ogc/src/schemas/wcs/Common.hpp new file mode 100644 index 000000000..8b26e8ded --- /dev/null +++ b/plugins/csl-ogc/src/schemas/wcs/Common.hpp @@ -0,0 +1,77 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_WCS_COMMON +#define CSL_OGC_WCS_COMMON + +#include +#include +#include + +#include "csl_ogc_export.hpp" + +#include + +namespace ogc::schemas::wcs { + +struct ExtensionType; +struct ServiceMetadataType; +struct OfferedCoverageType; +struct ServiceParametersType; +struct CoverageSubtypeParentType; + +using VersionStringType = std::string; + +struct CSL_OGC_EXPORT RequestBaseType { + // attributes + std::string service = "WCS"; + VersionStringType version; + + // child elements + std::optional extension; +}; + +struct CSL_OGC_EXPORT CoverageOfferingsType { + // child elements + ServiceMetadataType serviceMetadata; + std::vector offeredCoverages; +}; + +struct CSL_OGC_EXPORT ServiceMetadataType { + // child elements + std::vector formatsSupported; + std::optional extension; +}; + +struct CSL_OGC_EXPORT OfferedCoverageType { + // child elements + // gmlcov::AbstractCoverage TODO; + ServiceParametersType serviceParameters; +}; + +struct CSL_OGC_EXPORT ServiceParametersType { + // child elements + std::string coverageSubtype; + std::optional coverageSubtypeParent; + std::string nativeFormat; + std::optional extension; +}; + +struct CSL_OGC_EXPORT CoverageSubtypeParentType { + // child elements + std::string coverageSubtype; + std::optional coverageSubtypeParent; +}; + +struct CSL_OGC_EXPORT ExtensionType { + // child elements + std::vector children; +}; + +} // namespace ogc::schemas::wcs + +#endif // CSL_OGC_WCS_COMMON \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/wcs/GetCapabilitiesType.hpp b/plugins/csl-ogc/src/schemas/wcs/GetCapabilitiesType.hpp new file mode 100644 index 000000000..45eb8ce4c --- /dev/null +++ b/plugins/csl-ogc/src/schemas/wcs/GetCapabilitiesType.hpp @@ -0,0 +1,56 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// This file is part of CosmoScout VR // +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: German Aerospace Center (DLR) +// SPDX-License-Identifier: MIT + +#ifndef CSL_OGC_WCS_GET_CAPABILITIES +#define CSL_OGC_WCS_GET_CAPABILITIES + +#include "Common.hpp" + +#include +#include +#include + +#include "../ows/Contents.hpp" +#include "../ows/GetCapabilitiesType.hpp" + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::wcs { + +struct ContentsType; +struct CoverageSummaryType; + +struct CSL_OGC_EXPORT GetCapabilitiesType final : ows::GetCapabilitiesType { + // attributes + ows::ServiceType service = "WCS"; +}; + +struct CSL_OGC_EXPORT CapabilitiesType final : ows::CapabilitiesBaseType { + // child elements + std::optional TODO; + std::optional contents; +}; + +struct CSL_OGC_EXPORT ContentsType final : ows::ContentsBaseType { + // child elements + std::vector coverageSummary; + std::optional extension; +}; + +struct CSL_OGC_EXPORT CoverageSummaryType final : ows::DescriptionType { + // child elements + std::vector wgs84BoundingBoxes; + std::string coverageId; + std::string coverageSubtype; + std::optional coverageSubtypeParent; + std::vector boundingBoxes; + std::vector metadata; +}; + +} // namespace ogc::schemas::wcs + +#endif // CSL_OGC_WCS_GET_CAPABILITIES \ No newline at end of file diff --git a/plugins/csl-ogc/src/schemas/xlink/XLink.hpp b/plugins/csl-ogc/src/schemas/xlink/XLink.hpp new file mode 100644 index 000000000..31617d42c --- /dev/null +++ b/plugins/csl-ogc/src/schemas/xlink/XLink.hpp @@ -0,0 +1,24 @@ +#ifndef CSL_OGC_XLINK +#define CSL_OGC_XLINK + +#include +#include + +#include "csl_ogc_export.hpp" + +namespace ogc::schemas::xlink { + +struct CSL_OGC_EXPORT SimpleAttrsGroup { + // attributes + std::optional href; + std::optional role; + std::optional arcrole; + std::optional title; + std::optional show; + std::optional actuate; + std::optional about; +}; + +} // namespace ogc::schemas::xlink + +#endif // CSL_OGC_XLINK diff --git a/plugins/csl-ogc/src/wcs/WebCoverage.cpp b/plugins/csl-ogc/src/wcs/WebCoverage.cpp index 85689b02e..3739c6728 100644 --- a/plugins/csl-ogc/src/wcs/WebCoverage.cpp +++ b/plugins/csl-ogc/src/wcs/WebCoverage.cpp @@ -20,7 +20,7 @@ WebCoverage::WebCoverage(VistaXML::TiXmlElement* element, Settings settings, std : mUrl(std::move(mUrl)) , mSettings(std::move(settings)) { auto title = utils::getElementValue(element, {"ows:Title"}); - auto id = utils::getElementValue(element, {"Identifier"}); + auto id = utils::getElementValue(element, {"wcs:Identifier"}); mId = id.value_or(""); mTitle = title.has_value() ? title.value() : "No Title"; diff --git a/plugins/csl-ogc/src/wcs/WebCoverageService.cpp b/plugins/csl-ogc/src/wcs/WebCoverageService.cpp index 26892b23e..097739c50 100644 --- a/plugins/csl-ogc/src/wcs/WebCoverageService.cpp +++ b/plugins/csl-ogc/src/wcs/WebCoverageService.cpp @@ -25,7 +25,7 @@ namespace csl::ogc { WebCoverageService::WebCoverageService(std::string url, CacheMode cacheMode, std::string cacheDir) : WebServiceBase( - std::move(url), cacheMode, std::move(cacheDir), "WCS", "1.1.1", {"Capabilities"}) { + std::move(url), cacheMode, std::move(cacheDir), "WCS", "1.1.1", {"wcs:Capabilities"}) { setTitle(parseTitle()); parseCoverages(); } @@ -65,7 +65,7 @@ std::unique_ptr WebCoverageService::createExceptionReport( void WebCoverageService::parseCoverages() { VistaXML::TiXmlHandle capabilityHandle(getCapabilities()); - VistaXML::TiXmlElement* contents = capabilityHandle.FirstChildElement("Contents").ToElement(); + VistaXML::TiXmlElement* contents = capabilityHandle.FirstChildElement("wcs:Contents").ToElement(); WebCoverage::Settings settings; @@ -81,7 +81,7 @@ void WebCoverageService::parseCoverages() { } } - for (auto* coverage = contents->FirstChild("CoverageSummary"); coverage; + for (auto* coverage = contents->FirstChild("wcs:CoverageSummary"); coverage; coverage = coverage->NextSibling()) { if (!coverage->NoChildren()) { try { diff --git a/plugins/csl-ogc/src/wcs/WebCoverageTextureLoader.cpp b/plugins/csl-ogc/src/wcs/WebCoverageTextureLoader.cpp index 1fb7e8c40..91dc1567f 100644 --- a/plugins/csl-ogc/src/wcs/WebCoverageTextureLoader.cpp +++ b/plugins/csl-ogc/src/wcs/WebCoverageTextureLoader.cpp @@ -260,9 +260,9 @@ std::string WebCoverageTextureLoader::getRequestUrl( if (request.mBounds != coverage.getSettings().mBounds && request.mBounds != Bounds2D()) { // &SUBSET=y(...,...) - url << "&SUBSET=y%28" << request.mBounds.mMinLat << "," << request.mBounds.mMaxLat << "%29"; + url << "&SUBSET=Lat%28" << request.mBounds.mMinLat << "," << request.mBounds.mMaxLat << "%29"; // &SUBSET=x(...,...) - url << "&SUBSET=x%28" << request.mBounds.mMinLon << "," << request.mBounds.mMaxLon << "%29"; + url << "&SUBSET=Long%28" << request.mBounds.mMinLon << "," << request.mBounds.mMaxLon << "%29"; } int32_t width = coverage.getSettings().mAxisResolution[0]; @@ -297,7 +297,7 @@ std::string WebCoverageTextureLoader::getRequestUrl( int maxLayer = std::min(coverage.getSettings().mNumLayers, request.mLayerRange.value().second); if (minLayer == maxLayer) { - url << "&RANGESUBSET=" << minLayer; + // url << "&RANGESUBSET=" << minLayer; } else { url << "&RANGESUBSET=" << minLayer << "%3A" << maxLayer; } diff --git a/plugins/csp-visual-query/src/Plugin.cpp b/plugins/csp-visual-query/src/Plugin.cpp index d184037b8..d9bc6c01c 100644 --- a/plugins/csp-visual-query/src/Plugin.cpp +++ b/plugins/csp-visual-query/src/Plugin.cpp @@ -170,6 +170,8 @@ void Plugin::setupNodeEditor(uint16_t port) { // Register control types: factory.registerControlType(cs::utils::filesystem::loadToString( "../share/resources/nodes/csp-visual-query/DropDownControl.js")); + factory.registerControlType(cs::utils::filesystem::loadToString( + "../share/resources/nodes/csp-visual-query/RealInputControl.js")); // Now, we register our custom node types. Any parameter given to this method, will later be // passed to the constructor of the node instances. For more information, see the documentation of diff --git a/plugins/csp-visual-query/src/constant-nodes/RealVec2/RealVec2.cpp b/plugins/csp-visual-query/src/constant-nodes/RealVec2/RealVec2.cpp index b13dbe0a1..552d943e1 100644 --- a/plugins/csp-visual-query/src/constant-nodes/RealVec2/RealVec2.cpp +++ b/plugins/csp-visual-query/src/constant-nodes/RealVec2/RealVec2.cpp @@ -19,7 +19,7 @@ const std::string RealVec2::sName = "RealVec2"; std::string RealVec2::sSource() { return cs::utils::filesystem::loadToString( - "../share/resources/nodes/csp-visual-query/RealVec4.js"); + "../share/resources/nodes/csp-visual-query/RealVec2.js"); } //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/csp-visual-query/src/extract-nodes/WCSImage2D/WCSImage2D.cpp b/plugins/csp-visual-query/src/extract-nodes/WCSImage2D/WCSImage2D.cpp index a69fe96d7..08aeb0834 100644 --- a/plugins/csp-visual-query/src/extract-nodes/WCSImage2D/WCSImage2D.cpp +++ b/plugins/csp-visual-query/src/extract-nodes/WCSImage2D/WCSImage2D.cpp @@ -181,10 +181,14 @@ void WCSImage2D::process() { F32ValueVector pointData{}; - for (float scalar : textureData) { + for (float& scalar : textureData) { + scalar *= 1000000000; pointData.emplace_back(std::vector{scalar}); } + auto result = std::minmax_element(textureData.begin(), textureData.end()); + logger().info("Min: {}, Max: {}", *(result.first), *(result.second)); + image.mPoints = pointData; break; }