├── .github
└── workflows
│ └── ci.yml
├── .gitignore
├── LICENSE
├── README.md
└── src
├── AEGIS.sln
├── AEGIS.sln.DotSettings
├── Collections
├── Collection.cs
├── Collections.csproj
├── DisjointSetForest.cs
├── FibonacciHeap.cs
├── Heap.cs
├── IDisjointSet.cs
├── IHeap.cs
├── IReadOnlySet.cs
├── MultiValueDictionary.cs
├── ReadOnlySet.cs
├── Resources
│ ├── CollectionMessages.Designer.cs
│ └── CollectionMessages.resx
├── SearchTrees
│ ├── AvlTree.cs
│ ├── BinarySearchTree.cs
│ ├── ISearchTree.cs
│ ├── ISearchTreeEnumerator.cs
│ └── RedBlackTree.cs
└── SparseArray.cs
├── Core.Reference
├── Angle.cs
├── Angles.cs
├── AreaOfUse.cs
├── AxisDirection.cs
├── Collections
│ ├── CoordinateOperationMethodCollection.cs
│ ├── CoordinateOperationParameterCollection.cs
│ ├── Formula
│ │ ├── Conversions
│ │ │ ├── GeocentricToTopocentricConversion.cs
│ │ │ ├── Geographic3DTo2DConversion.cs
│ │ │ ├── GeographicToGeocentricConversion.cs
│ │ │ └── GeographicToTopocentricConversion.cs
│ │ ├── CoordinateOperationMethods.cs
│ │ ├── CoordinateOperationParameters.cs
│ │ ├── Projections
│ │ │ ├── AlbersEqualAreaProjection.cs
│ │ │ ├── AmericanPolyconicProjection.cs
│ │ │ ├── BonneProjection.cs
│ │ │ ├── BonneSouthOrientatedProjection.cs
│ │ │ ├── CassiniSoldnerProjection.cs
│ │ │ ├── ColombiaUrbanProjection.cs
│ │ │ ├── EquidistantCylindricalProjection.cs
│ │ │ ├── EquidistantCylindricalSphericalProjection.cs
│ │ │ ├── GnomonicProjection.cs
│ │ │ ├── GuamProjection.cs
│ │ │ ├── HotineObliqueMercatorAProjection.cs
│ │ │ ├── HotineObliqueMercatorBProjection.cs
│ │ │ ├── HotineObliqueMercatorProjection.cs
│ │ │ ├── HyperbolicCassiniSoldnerProjection.cs
│ │ │ ├── KrovakModifiedNorthOrientedProjection.cs
│ │ │ ├── KrovakModifiedProjection.cs
│ │ │ ├── KrovakNorthOrientedProjection.cs
│ │ │ ├── KrovakProjection.cs
│ │ │ ├── LabordeObliqueMercatorProjection.cs
│ │ │ ├── LambertAzimuthalEqualAreaProjection.cs
│ │ │ ├── LambertAzimuthalEqualAreaSphericalProjection.cs
│ │ │ ├── LambertConicConformal1SPProjection.cs
│ │ │ ├── LambertConicConformal1SPWestOrientatedProjection.cs
│ │ │ ├── LambertConicConformal2SPBelgiumProjection.cs
│ │ │ ├── LambertConicConformal2SPMichiganProjection.cs
│ │ │ ├── LambertConicConformal2SPProjection.cs
│ │ │ ├── LambertConicConformalProjection.cs
│ │ │ ├── LambertConicNearConformalProjection.cs
│ │ │ ├── LambertCylindricalEqualAreaEllipsoidalProjection.cs
│ │ │ ├── LambertCylindricalEqualAreaSphericalProjection.cs
│ │ │ ├── MercatorAProjection.cs
│ │ │ ├── MercatorBProjection.cs
│ │ │ ├── MercatorProjection.cs
│ │ │ ├── MercatorSphericalProjection.cs
│ │ │ ├── MillerCylindricalProjection.cs
│ │ │ ├── ModifiedAzimuthalEquidistantProjection.cs
│ │ │ ├── ObliqueMercatorProjection.cs
│ │ │ ├── ObliqueStereographicProjection.cs
│ │ │ ├── OrthographicProjection.cs
│ │ │ ├── PolarStereographicAProjection.cs
│ │ │ ├── PolarStereographicBProjection.cs
│ │ │ ├── PolarStereographicCProjection.cs
│ │ │ ├── PolarStereographicProjection.cs
│ │ │ ├── PopularVisualisationPseudoMercatorProjection.cs
│ │ │ ├── PseudoPlateCareeProjection.cs
│ │ │ ├── SinusoidalProjection.cs
│ │ │ ├── TransverseMercatorProjection.cs
│ │ │ ├── TransverseMercatorSouthProjection.cs
│ │ │ ├── TransverseMercatorZonedProjection.cs
│ │ │ ├── VerticalPerspectiveOrthographicProjection.cs
│ │ │ └── VerticalPerspectiveProjection.cs
│ │ └── Transformations
│ │ │ ├── AffineParametricTransformation.cs
│ │ │ ├── CoordinateFrameRotation.cs
│ │ │ ├── GeneralPolynomial2Transformation.cs
│ │ │ ├── GeneralPolynomial3Transformation.cs
│ │ │ ├── GeneralPolynomial4Transformation.cs
│ │ │ ├── GeneralPolynomial6Transformation.cs
│ │ │ ├── GeneralPolynomialTransformation.cs
│ │ │ ├── GeocentricTranslation.cs
│ │ │ ├── GeographicTranslation.cs
│ │ │ ├── HelmertTransformation.cs
│ │ │ ├── MolodenskyBadekasTransformation.cs
│ │ │ ├── MolodenskyTransformation.cs
│ │ │ ├── P6LeftHandedSeismicBinGridTransformation.cs
│ │ │ ├── P6RightHandedSeismicBinGridTransformation.cs
│ │ │ ├── P6SeismicBinGridTransformation.cs
│ │ │ ├── PositionVectorTransformation.cs
│ │ │ └── SimilarityTransformation.cs
│ ├── ICoordinateProjectionCollection.cs
│ ├── ICoordinateSystemAxisCollection.cs
│ ├── ICoordinateTransformationCollection.cs
│ ├── IReferenceCollection.cs
│ ├── IReferenceProvider.cs
│ ├── Local
│ │ ├── LocalAreaOfUseCollection.cs
│ │ ├── LocalCompoundReferenceSystemCollection.cs
│ │ ├── LocalCoordinateProjectionCollection.cs
│ │ ├── LocalCoordinateReferenceSystemCollection.cs
│ │ ├── LocalCoordinateSystemAxisCollection.cs
│ │ ├── LocalCoordinateSystemCollection.cs
│ │ ├── LocalCoordinateTransformationCollection.cs
│ │ ├── LocalDatumCollection.cs
│ │ ├── LocalEllipsoidCollection.cs
│ │ ├── LocalGeocentricCoordinateReferenceSystemCollection.cs
│ │ ├── LocalGeodeticDatumCollection.cs
│ │ ├── LocalGeographicCoordinateReferenceSystemCollection.cs
│ │ ├── LocalMeridianCollection.cs
│ │ ├── LocalProjectedCoordinateReferenceSystemCollection.cs
│ │ ├── LocalReferenceCollection.cs
│ │ ├── LocalReferenceProvider.cs
│ │ ├── LocalReferenceSystemCollection.cs
│ │ ├── LocalVerticalCoordinateReferenceSystemCollection.cs
│ │ └── LocalVerticalDatumCollection.cs
│ ├── ReferenceCollectionQueries.cs
│ ├── ReferenceProvider.cs
│ └── UnitOfMeasurementCollection.cs
├── CompoundCoordinateOperationMethod.cs
├── CompoundReferenceSystem.cs
├── Converters
│ └── WellKnownTextConverter.cs
├── CoordinateConversion.cs
├── CoordinateOperation.cs
├── CoordinateOperationMethod.cs
├── CoordinateOperationParameter.cs
├── CoordinateProjection.cs
├── CoordinateReferenceSystem.cs
├── CoordinateSystem.cs
├── CoordinateSystemAxis.cs
├── CoordinateSystemType.cs
├── CoordinateTransformation.cs
├── Core.Reference.csproj
├── Datum.cs
├── Ellipsoid.cs
├── EllipsoidComputations.cs
├── EllipsoidHemisphere.cs
├── GeoCoordinate.cs
├── GeoEnvelope.cs
├── GeoVector.cs
├── GeocentricCoordinateReferenceSystem.cs
├── GeodeticDatum.cs
├── GeographicCoordinateReferenceSystem.cs
├── Length.cs
├── Meridian.cs
├── OperationAspect.cs
├── ProjectedCoordinateReferenceSystem.cs
├── ReferenceSystem.cs
├── ReferenceSystemFactory.cs
├── ReferenceSystemType.cs
├── Resources
│ ├── Alias.txt
│ ├── Area.txt
│ ├── ConcatenatedCoordinateOperation.txt
│ ├── CoordinateOperation.txt
│ ├── CoordinateOperationParameterValue.txt
│ ├── CoordinateReferenceSystem.txt
│ ├── CoordinateSystem.txt
│ ├── CoordinateSystemAxis.txt
│ ├── CoordinateSystemAxisMapping.txt
│ ├── Datum.txt
│ ├── Ellipsoid.txt
│ ├── PrimeMeridian.txt
│ ├── ReferenceMessages.Designer.cs
│ └── ReferenceMessages.resx
├── Strategies
│ ├── CompoundCoordinateConversionStrategy.cs
│ ├── CoordinateConversionStrategy.cs
│ ├── CoordinateOperationStrategyFactory.cs
│ ├── ForwardCoordinateProjectionStrategy.cs
│ ├── ForwardGeographicCoordinateTransformationStrategy.cs
│ ├── ForwardLatLonCoordinateInterpretationStrategy.cs
│ ├── ForwardLatLonHiCoordinateIntepretationStrategy.cs
│ ├── ForwardLonLatCoordinateIntepretationStrategy.cs
│ ├── ForwardLonLatHiCoordinateInterpretationStrategy.cs
│ ├── ICoordinateOperationStrategy.cs
│ ├── ReverseCoordinateProjectionStrategy.cs
│ ├── ReverseGeographicCoordinateTransformationStrategy.cs
│ ├── ReverseLatLonCoordinateInterpretationStrategy.cs
│ ├── ReverseLatLonHiCoordinateInterpretationStrategy.cs
│ ├── ReverseLonLatCoordinateIntepretationStrategy.cs
│ └── ReverseLonLatHiCoordinateInterpretationStrategy.cs
├── UnitOfMeasurement.cs
├── UnitQuantityType.cs
├── UnitsOfMeasurement.cs
├── VerticalCoordinateReferenceSystem.cs
├── VerticalDatum.cs
└── VerticalDatumType.cs
├── Core
├── Algorithms
│ ├── BentleyFaustPreparataAlgorithm.cs
│ ├── BentleyOttmannAlgorithm.cs
│ ├── CohenSutherlandAlgorithm.cs
│ ├── DouglasPeuckerAlgorithm.cs
│ ├── GeometryDistanceAlgorithm.cs
│ ├── GrahamScanAlgorithm.cs
│ ├── GreinerHormannAlgorithm.cs
│ ├── Intersection.cs
│ ├── IntersectionType.cs
│ ├── LiangBarskyAlgorithm.cs
│ ├── LineAlgorithms.cs
│ ├── MinkowskiSumAlgorithm.cs
│ ├── MonotoneSubdivisionAlgorithm.cs
│ ├── PolygonAlgorithms.cs
│ ├── PolygonCentroidAlgorithm.cs
│ ├── RandomPolygonGenerator.cs
│ ├── ShamosHoeyAlgorithm.cs
│ ├── SweepLines
│ │ ├── EndPointEvent.cs
│ │ ├── Event.cs
│ │ ├── EventComparer.cs
│ │ ├── EventQueue.cs
│ │ ├── EventType.cs
│ │ ├── IntersectionEvent.cs
│ │ ├── PresortedEventQueue.cs
│ │ ├── SweepLine.cs
│ │ └── SweepLineSegment.cs
│ └── WindingNumberAlgorithm.cs
├── Attributes
│ ├── AttributeCollection.cs
│ └── AttributeCollectionFactory.cs
├── BasicLineString.cs
├── BasicPoint.cs
├── BasicPolygon.cs
├── BasicProxyLineString.cs
├── BasicProxyPolygon.cs
├── Converters
│ ├── GeographyMarkupConverter.cs
│ ├── WellKnownBinaryConverter.cs
│ └── WellKnownTextConverter.cs
├── Coordinate.cs
├── CoordinateComparer.cs
├── CoordinateVector.cs
├── Core.csproj
├── Envelope.cs
├── Factory.cs
├── Features
│ ├── Feature.cs
│ ├── FeatureCollection.cs
│ └── FeatureFactory.cs
├── Geometries
│ ├── Curve.cs
│ ├── Geometry.cs
│ ├── GeometryFactory.cs
│ ├── GeometryList.cs
│ ├── Line.cs
│ ├── LineString.cs
│ ├── LinearRing.cs
│ ├── MultiLineString.cs
│ ├── MultiPoint.cs
│ ├── MultiPolygon.cs
│ ├── Point.cs
│ ├── Polygon.cs
│ ├── Surface.cs
│ └── Triangle.cs
├── GeometryComparer.cs
├── IAttributeCollection.cs
├── IAttributeCollectionFactory.cs
├── IBasicGeometry.cs
├── IBasicLineString.cs
├── IBasicPoint.cs
├── IBasicPolygon.cs
├── ICurve.cs
├── IFactory.cs
├── IFeature.cs
├── IFeatureCollection.cs
├── IFeatureFactory.cs
├── IGeometry.cs
├── IGeometryCollection.cs
├── IGeometryFactory.cs
├── ILine.cs
├── ILineString.cs
├── ILinearRing.cs
├── IMultiCurve.cs
├── IMultiLineString.cs
├── IMultiPoint.cs
├── IMultiPolygon.cs
├── IMultiSurface.cs
├── IPoint.cs
├── IPolygon.cs
├── IReferenceSystem.cs
├── IReferenceSystemFactory.cs
├── ISurface.cs
├── ITriangle.cs
├── IdentifiedObject.cs
├── IdentifiedObjectAttribute.cs
├── Indexes
│ ├── ICoordinateIndex.cs
│ ├── ISpatialIndex.cs
│ ├── KDTree.cs
│ ├── Metric
│ │ ├── MTree.cs
│ │ └── SplitPolicy
│ │ │ ├── ISplitPolicy.cs
│ │ │ ├── SplitPolicies.cs
│ │ │ └── SplitPolicy.cs
│ ├── Octree.cs
│ ├── QuadTree.cs
│ └── Rectangle
│ │ ├── HilbertRTree.cs
│ │ ├── RStarTree.cs
│ │ └── RTree.cs
├── Orientation.cs
├── PrecisionModel.cs
├── PrecisionModelType.cs
├── RelativeLocation.cs
├── Resources
│ ├── CoreMessages.Designer.cs
│ └── CoreMessages.resx
└── Utilities
│ ├── ByteOrder.cs
│ └── EndianBitConverter.cs
├── Numerics
├── Approximation
│ └── ContinuedFractionApproximator.cs
├── Calculator.cs
├── Integral
│ └── SimpsonsMethod.cs
├── LinearAlgebra
│ ├── CholeskyDecomposition.cs
│ ├── HouseholderTransformation.cs
│ ├── LUDecomposition.cs
│ ├── MatrixComputations.cs
│ ├── MatrixDefiniteness.cs
│ ├── MatrixFactory.cs
│ ├── Norm.cs
│ ├── QRAlgorithm.cs
│ ├── QRDecomposition.cs
│ └── VectorFactory.cs
├── Matrix.cs
├── Numerics.csproj
├── Randomizers
│ ├── GaussianRandomGenerator.cs
│ └── MersenneTwisterRandomGenerator.cs
├── Rational.cs
├── Resources
│ ├── NumericsMessages.Designer.cs
│ └── NumericsMessages.resx
├── Statistics.cs
└── Vector.cs
├── Storage.Hadoop
├── Authentication
│ ├── HadoopAnonymousAuthentication.cs
│ ├── HadoopUsernameAuthentication.cs
│ └── IHadoopAuthentication.cs
├── FileSystems
│ ├── HadoopFileSystem.cs
│ ├── HadoopRemoteException.cs
│ └── Operations
│ │ ├── HadoopBooleanOperationResult.cs
│ │ ├── HadoopCreateDirectoryOperation.cs
│ │ ├── HadoopDeleteOperation.cs
│ │ ├── HadoopFileListingOperation.cs
│ │ ├── HadoopFileListingOperationResult.cs
│ │ ├── HadoopFileStatusOperation.cs
│ │ ├── HadoopFileStatusOperationResult.cs
│ │ ├── HadoopFileStreamingOperationResult.cs
│ │ ├── HadoopFileSystemOperation.cs
│ │ ├── HadoopFileSystemOperationResult.cs
│ │ ├── HadoopReadFileOperation.cs
│ │ ├── HadoopRenameOperation.cs
│ │ └── HadoopWriteFileOperation.cs
└── Storage.Hadoop.csproj
├── Storage
├── Attributes
│ ├── StoredAttributeCollection.cs
│ └── StoredAttributeCollectionFactory.cs
├── Authentication
│ └── AnonymousStorageAuthentication.cs
├── ConnectionException.cs
├── DataHandling.cs
├── DriverFormat.cs
├── DriverOperation.cs
├── DriverParameter.cs
├── Features
│ ├── StoredFeature.cs
│ ├── StoredFeatureCollection.cs
│ └── StoredFeatureFactory.cs
├── FileSystemEntry.cs
├── FileSystemEntryType.cs
├── FileSystems
│ ├── FileSystemBase.cs
│ ├── FileSystemOperationException.cs
│ ├── FileSystemOperationResult.cs
│ ├── FileSystemOperationResultCode.cs
│ └── LocalFileSystem.cs
├── Geometries
│ ├── StoredCurve.cs
│ ├── StoredGeometry.cs
│ ├── StoredGeometryCollection.cs
│ ├── StoredGeometryFactory.cs
│ ├── StoredLine.cs
│ ├── StoredLineString.cs
│ ├── StoredLinearRing.cs
│ ├── StoredMultiLineString.cs
│ ├── StoredMultiPoint.cs
│ ├── StoredMultiPolygon.cs
│ ├── StoredPoint.cs
│ ├── StoredPolygon.cs
│ ├── StoredSurface.cs
│ └── StoredTriangle.cs
├── IAttributeDriver.cs
├── IDriver.cs
├── IFeatureDriver.cs
├── IFileSystem.cs
├── IGeometryDriver.cs
├── IReferenceSystemDriver.cs
├── IStorageAuthentication.cs
├── IStoredAttributeCollection.cs
├── IStoredAttributeCollectionFactory.cs
├── IStoredFeature.cs
├── IStoredFeatureCollection.cs
├── IStoredFeatureFactory.cs
├── IStoredGeometry.cs
├── IStoredGeometryFactory.cs
├── Resources
│ ├── StorageMessages.Designer.cs
│ └── StorageMessages.resx
├── Storage.csproj
└── StorageAuthenticationType.cs
├── Tests.Collections
├── DisjointSetForestTest.cs
├── FibonacciHeapTest.cs
├── HeapTest.cs
├── MultiValueDictionaryTest.cs
├── ReadOnlySetTest.cs
├── SearchTree
│ ├── AvlTreeTest.cs
│ ├── BinarySearchTreeTest.cs
│ └── RedBlackTreeTest.cs
├── SparseArrayTest.cs
└── Tests.Collections.csproj
├── Tests.Core.Reference
├── Collections
│ └── Formula
│ │ ├── Conversions
│ │ ├── GeocentricToTopocentricConversionTest.cs
│ │ ├── GeographicToGeocentricConversionTest.cs
│ │ └── GeographicToTopocentricConversionTest.cs
│ │ ├── Projections
│ │ ├── AmericanPolyconicProjectionTest.cs
│ │ ├── CassiniSoldnerProjectionTest.cs
│ │ ├── ColombiaUrbanProjectionTest.cs
│ │ ├── EquidistantCylindricalProjectionTest.cs
│ │ ├── GnomonicProjectionTest.cs
│ │ ├── GuamProjectionTest.cs
│ │ ├── HotineObliqueMercatorBProjectionTest.cs
│ │ ├── HyperbolicCassiniSoldnerProjectionTest.cs
│ │ ├── KrovakModifiedNorthOrientedProjectionTest.cs
│ │ ├── KrovakModifiedProjectionTest.cs
│ │ ├── KrovakNorthOrientedProjectionTest.cs
│ │ ├── KrovakProjectionTest.cs
│ │ ├── LabordeObliqueMercatorProjectionTest.cs
│ │ ├── LambertConicConformal1SPProjectionTest.cs
│ │ ├── LambertConicConformal1SPWestOrientatedProjectionTest.cs
│ │ ├── LambertConicConformal2SPBelgiumProjectionTest.cs
│ │ ├── LambertConicConformal2SPMichiganProjectionTest.cs
│ │ ├── LambertConicConformal2SPProjectionTest.cs
│ │ ├── LambertConicNearConformalProjectionTest.cs
│ │ ├── LambertCylindricalEqualAreaEllipsoidalProjectionTest.cs
│ │ ├── LambertCylindricalEqualAreaSphericalProjectionTest.cs
│ │ ├── MercatorAProjectionTest.cs
│ │ ├── MercatorBProjectionTest.cs
│ │ ├── MercatorSphericalProjectionTest.cs
│ │ ├── MillerCylindricalProjectionTest.cs
│ │ ├── ModifiedAzimuthalEquidistantProjectionTest.cs
│ │ ├── ObliqueStereographicProjectionTest.cs
│ │ ├── OrthographicProjectionTest.cs
│ │ ├── PolarStereographicAProjectionTest.cs
│ │ ├── PolarStereographicBProjectionTest.cs
│ │ ├── PolarStereographicCProjectionTest.cs
│ │ ├── PopularVisualisationPseudoMercatorProjectionTest.cs
│ │ ├── SinusoidalProjectionTest.cs
│ │ ├── TransverseMercatorProjectionTest.cs
│ │ ├── TransverseMercatorSouthProjectionTest.cs
│ │ ├── VerticalPerspectiveOrthographicProjectionTest.cs
│ │ └── VerticalPerspectiveProjectionTest.cs
│ │ └── Transformations
│ │ ├── AffineParametricTransformationTest.cs
│ │ ├── GeneralPolynomial6TransformationTest.cs
│ │ ├── GeocentricTranslationTest.cs
│ │ ├── P6LeftHandedSeismicBinGridTransformationTest.cs
│ │ ├── P6RightHandedSeismicBinGridTransformationTest.cs
│ │ └── SimilarityTransformationTest.cs
├── Converters
│ └── WellKnownTextConverterTest.cs
├── TestUtilities.cs
└── Tests.Core.Reference.csproj
├── Tests.Core
├── Algorithms
│ ├── BentleyFaustPreparataAlgorithmTest.cs
│ ├── BentleyOttmannAlgorithmTest.cs
│ ├── CohenSutherlandAlgorithmTest.cs
│ ├── DouglasPeuckerAlgorithmTest.cs
│ ├── GeometryDistanceAlgorithmTest.cs
│ ├── GrahamScanAlgorithmTest.cs
│ ├── GreinerHormannAlgorithmTest.cs
│ ├── LiangBarskyAlgorithmTest.cs
│ ├── LineAlgorithmsTest.cs
│ ├── MinkowskiSumAlgorithmTest.cs
│ ├── MonotoneSubdivisionAlgorithmTest.cs
│ ├── PolygonAlgorithmsTest.cs
│ ├── PolygonCentroidAlgorithmTest.cs
│ ├── RandomPolygonGeneratorTest.cs
│ ├── ShamosHoeyAlgorithmTest.cs
│ └── WindingNumberAlgorithmTest.cs
├── Converters
│ ├── GeographyMarkupConverterTest.cs
│ ├── WellKnownBinaryConverterTest.cs
│ └── WellKnownTextConverterTest.cs
├── CoordinateTest.cs
├── EnvelopeTest.cs
├── Features
│ ├── FeatureCollectionTest.cs
│ ├── FeatureFactoryTest.cs
│ └── FeatureTest.cs
├── Geometries
│ ├── LineStringTest.cs
│ ├── LineTest.cs
│ ├── LinearRingTest.cs
│ ├── PointTest.cs
│ └── PolygonTest.cs
├── Indexes
│ ├── KDTreeTest.cs
│ ├── Metric
│ │ └── MTreeTest.cs
│ ├── OctreeTest.cs
│ ├── QuadTreeTest.cs
│ └── Rectangle
│ │ ├── HilbertEncoderTest.cs
│ │ ├── HilbertRTreeTest.cs
│ │ ├── RStarTreeTest.cs
│ │ └── RTreeTest.cs
├── PrecisionModelTest.cs
├── ShouldlyExtensions.cs
└── Tests.Core.csproj
├── Tests.Numerics
├── Approximation
│ └── ContinuedFractionApproximatorTest.cs
├── CalculatorTest.cs
├── Integral
│ └── SimpsonsMethodTest.cs
├── LinearAlgebra
│ ├── CholeskyDecompositionTest.cs
│ ├── HouseholderTransformationTest.cs
│ ├── LUDecompositionTest.cs
│ ├── MatrixComputationsTest.cs
│ ├── QRAlgorithmTest.cs
│ └── QRDecompositionTest.cs
├── MatrixTest.cs
├── Randomizers
│ ├── GaussianRandomGeneratorTest.cs
│ └── MersenneTwisterRandomGeneratorTest.cs
├── RationalTest.cs
├── StatisticsTest.cs
└── Tests.Numerics.csproj
├── Tests.Storage.Hadoop
├── Authentication
│ ├── HadoopAnonymousAuthenticationTest.cs
│ └── HadoopUsernameAuthenticationTest.cs
├── FileSystems
│ ├── HadoopFileSystemTest.cs
│ ├── HadoopRemoteExceptionTest.cs
│ └── Operations
│ │ ├── HadoopBooleanOperationResultTest.cs
│ │ └── HadoopFileListingOperationResultTest.cs
└── Tests.Storage.Hadoop.csproj
├── analyzer.ruleset
└── stylecop.json
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: Build project
2 |
3 | on: [push, pull_request]
4 |
5 | env:
6 | BUILD_CONFIGURATION: Release
7 |
8 | jobs:
9 | build:
10 | strategy:
11 | matrix:
12 | os: [windows-latest, ubuntu-latest]
13 |
14 | runs-on: ${{ matrix.os }}
15 |
16 | steps:
17 | - uses: actions/checkout@v2
18 | # Required only for linux and macos
19 | - uses: actions/setup-dotnet@v1
20 | with:
21 | dotnet-version: '3.1.x'
22 |
23 | - run: dotnet --version
24 |
25 | - name: Restore NuGet packages
26 | run: dotnet restore src/AEGIS.sln
27 |
28 | - name: Build the solution
29 | run: dotnet build src/AEGIS.sln --configuration ${{env.BUILD_CONFIGURATION}}
30 |
31 | - name: Run unit tests
32 | run: dotnet test src/AEGIS.sln --collect="XPlat Code Coverage"
33 |
34 | - uses: codecov/codecov-action@v2
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AEGIS geospatial framework (vNext)
2 |
3 | [](https://github.com/AegisSpatial/aegis/actions?query=branch%3Amaster)
4 | [](https://codecov.io/gh/AegisSpatial/aegis)
5 |
6 | The AEGIS framework is a geospatial toolkit developed on the [.NET runtime](https://github.com/dotnet) facilitating creation of GIS applications.
7 |
8 | This the *vNext* development version of the [original framework](https://github.com/AegisSpatial/aegis-origin), which has undergone a major refactoring. Further features, documentation and developer guide are continously added. For production purposes, the original *v1* version of the framework is considered stable and recommended for usage.
9 |
10 | ## About AEGIS
11 |
12 | The AEGIS framework is a geospatial toolkit, which supports several kinds of geospatial data, including vector datasets, raster imagery and point clouds.
13 | AEGIS is a platform independent library, implemented as .NET Standard library to exploit the wide possibilities and the simple usage of this object-oriented development platform.
14 | Its development was started within a R&D project at ELTE Eötvös Loránd University, Faculty of Informatics, aiming to research new approaches in geospatial data management.
15 |
16 | AEGIS has been developed by taking adaptability and extensibility in mind. It employs state of the art programming methodologies and contains possible realizations of well-known standards of the Open Geospatial Consortium (OGC). The component-based infrastructure enables the separation of working fields and the interchangeability of data models, methods and algorithms. The extensibility also enables marrying AEGIS with existing toolkits after the implementation of the proper wrappers for processing environment and data model.
17 |
18 | ## Related publications
19 |
20 | - Giachetta, R.: A framework for processing large scale geospatial and remote sensing data in MapReduce environment. *Computer & Graphics*, vol. 49, pp. 37-46, 2015.
21 | DOI: [10.1016/j.cag.2015.03.003](https://doi.org/10.1016/j.cag.2015.03.003)
22 |
23 | - Kristóf D., Giachetta R., et al.: Using big geospatial data for fast flood detection: Developments from the IQmulus project. *IEEE International Geoscience and Remote Sensing Symposium (IGARSS)*, Milan, Italy, pp. 838-841, 2015.
24 | DOI: [10.1109/IGARSS.2015.7325895](https://doi.org/10.1109/IGARSS.2015.7325895)
25 |
26 | - Cserép, M.; Giachetta, R.: Operation-based revision control for geospatial data sets, *Geomatics Workbooks*, vol. 12, pp. 139-152, 2015.
27 | URL: [ResearchGate](https://www.geolab.polimi.it/wp-content/uploads/GW12_FOSS4G-eu15.pdf)
28 |
29 | - Giachetta, R.: AEGIS - A state-of-the-art spatio-temporal framework for education and research. *OSGeo Journal*, vol. 13, pp. 68-77, 2014.
30 | DOI: [10.7275/R53R0R22](https://doi.org/10.7275/R53R0R22)
31 |
--------------------------------------------------------------------------------
/src/AEGIS.sln.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | <copyright file="$FILENAME$" company="Eötvös Loránd University (ELTE)">
3 | Copyright 2016-$CURRENT_YEAR$ Roberto Giachetta. Licensed under the
4 | Educational Community License, Version 2.0 (the "License"); you may
5 | not use this file except in compliance with the License. You may
6 | obtain a copy of the License at
7 | http://opensource.org/licenses/ECL-2.0
8 |
9 | Unless required by applicable law or agreed to in writing,
10 | software distributed under the License is distributed on an "AS IS"
11 | BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12 | or implied. See the License for the specific language governing
13 | permissions and limitations under the License.
14 | </copyright>
--------------------------------------------------------------------------------
/src/Collections/Collections.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 | AEGIS.Collections
6 | AEGIS.Collections
7 | 0.1.0
8 | Roberto Giachetta et al.
9 | Eötvös Loránd University (ELTE)
10 | Collections library of the AEGIS framework.
11 | Copyright Roberto Giachetta 2016-2017
12 | http://opensource.org/licenses/ECL-2.0
13 | https://github.com/AegisSpatial/aegis
14 |
15 | ..\analyzer.ruleset
16 |
17 |
18 |
19 | full
20 | True
21 | ..\..\docs\AEGIS.Collections.xml
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | all
31 | runtime; build; native; contentfiles; analyzers; buildtransitive
32 |
33 |
34 |
35 |
36 |
37 | True
38 | True
39 | CollectionMessages.resx
40 |
41 |
42 |
43 |
44 |
45 | PublicResXFileCodeGenerator
46 | CollectionMessages.Designer.cs
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/Collections/IDisjointSet.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Collections/IDisjointSet.cs
--------------------------------------------------------------------------------
/src/Collections/SearchTrees/ISearchTreeEnumerator.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Collections.SearchTrees
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Supports multi direction iteration over a collection.
22 | ///
23 | /// The type of the key.
24 | /// The type of the value.
25 | public interface ISearchTreeEnumerator : IEnumerator>
26 | {
27 | ///
28 | /// Advances the enumerator to the previous element of the collection.
29 | ///
30 | /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
31 | Boolean MovePrev();
32 |
33 | ///
34 | /// Advances the enumerator to the minimal element of the collection.
35 | ///
36 | /// true if the enumerator was successfully advanced to the minimal element; false if the collection is empty.
37 | Boolean MoveMin();
38 |
39 | ///
40 | /// Advances the enumerator to the maximal element of the collection.
41 | ///
42 | /// true if the enumerator was successfully advanced to the maximal element; false if the collection is empty.
43 | Boolean MoveMax();
44 |
45 | ///
46 | /// Advances the enumerator to the root element of the collection.
47 | ///
48 | /// true if the enumerator was successfully advanced to the root element; false if the collection is empty.
49 | Boolean MoveRoot();
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/Core.Reference/Angles.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference
16 | {
17 | ///
18 | /// Represents a collection of the known geographic angles.
19 | ///
20 | public static class Angles
21 | {
22 | ///
23 | /// The equator.
24 | ///
25 | public static readonly Angle Equator = Angle.FromDegree(0);
26 |
27 | ///
28 | /// The north pole.
29 | ///
30 | public static readonly Angle NorthPole = Angle.FromDegree(90);
31 |
32 | ///
33 | /// The south pole.
34 | ///
35 | public static readonly Angle SouthPole = Angle.FromDegree(-90);
36 |
37 | ///
38 | /// The Arctic Circle.
39 | ///
40 | ///
41 | /// The position of the Arctic Circle is not fixed; as of 25 February 2019, it runs 66°33'47.5" north of the Equator.
42 | ///
43 | public static readonly Angle ArcticCircle = Angle.FromDegree(66, 33, 47.5);
44 |
45 | ///
46 | /// The Antarctic Circle.
47 | ///
48 | ///
49 | /// The position of the Antarctic Circle is not fixed; as of 24 February 2019, it runs 66°33'47.5" south of the Equator.
50 | ///
51 | public static readonly Angle AntarcticCircle = Angle.FromDegree(66, 33, 47.5);
52 |
53 | ///
54 | /// The Tropic of Cancer.
55 | ///
56 | ///
57 | /// The position of the Tropic of Cancer is not fixed; as of 26 February 2019, it runs 23°26'12.5" north of the Equator.
58 | ///
59 | public static readonly Angle TropicOfCancer = Angle.FromDegree(23, 26, 12.5);
60 |
61 | ///
62 | /// The Tropic of Capricorn.
63 | ///
64 | ///
65 | /// The position of the Tropic of Capricorn is not fixed; as of 26 February 2019, it runs 23°26'12.5" south of the Equator.
66 | ///
67 | public static readonly Angle TropicOfCapricorn = Angle.FromDegree(23, 26, 12.5);
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/src/Core.Reference/Collections/Formula/Projections/LambertCylindricalEqualAreaEllipsoidalProjection.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Core.Reference/Collections/Formula/Projections/LambertCylindricalEqualAreaEllipsoidalProjection.cs
--------------------------------------------------------------------------------
/src/Core.Reference/Collections/Formula/Projections/LambertCylindricalEqualAreaSphericalProjection.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Core.Reference/Collections/Formula/Projections/LambertCylindricalEqualAreaSphericalProjection.cs
--------------------------------------------------------------------------------
/src/Core.Reference/Collections/Local/LocalAreaOfUseCollection.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference.Collections.Local
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 | using System.Linq;
20 |
21 | ///
22 | /// Represents a collection of instances.
23 | ///
24 | ///
25 | /// This type queries references from local resources, containing a subset of the EPSG Geodetic Parameter Dataset.
26 | ///
27 | public class LocalAreaOfUseCollection : LocalReferenceCollection
28 | {
29 | ///
30 | /// The name of the resource. This field is constant.
31 | ///
32 | private const String ResourceName = "Area";
33 |
34 | ///
35 | /// Initializes a new instance of the class.
36 | ///
37 | public LocalAreaOfUseCollection()
38 | : base(ResourceName, ResourceName)
39 | {
40 | }
41 |
42 | ///
43 | /// Converts the specified content.
44 | ///
45 | /// The content.
46 | /// The converted reference.
47 | protected override AreaOfUse Convert(String[] content)
48 | {
49 | Double south = Double.NaN, west = Double.NaN, north = Double.NaN, east = Double.NaN;
50 | Double.TryParse(content[3], out south);
51 | Double.TryParse(content[4], out west);
52 | Double.TryParse(content[5], out north);
53 | Double.TryParse(content[6], out east);
54 |
55 | return AreaOfUse.FromDegrees(IdentifiedObject.GetIdentifier(Authority, content[0]), content[1],
56 | content[2], null, this.GetAliases(Int32.Parse(content[0])),
57 | south, west, north, east);
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/Core.Reference/CoordinateConversion.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Represents a coordinate conversion.
22 | ///
23 | /// The type of the source.
24 | /// The type of the result.
25 | ///
26 | /// A coordinate operation through which the output coordinates are referenced to the same datum as are the input coordinates.
27 | /// The best-known example of a coordinate conversion is a map projection.
28 | /// The parameter values describing coordinate conversions are defined rather than empirically derived.
29 | ///
30 | public abstract class CoordinateConversion : CoordinateOperation
31 | {
32 | ///
33 | /// Initializes a new instance of the class.
34 | ///
35 | /// The identifier.
36 | /// The name.
37 | /// The remarks.
38 | /// The aliases.
39 | /// The coordinate operation method.
40 | /// The parameters of the operation.
41 | ///
42 | /// The identifier is null.
43 | /// or
44 | /// The method is null.
45 | ///
46 | protected CoordinateConversion(String identifier, String name, String remarks, String[] aliases, CoordinateOperationMethod method, IDictionary parameters)
47 | : base(identifier, name, remarks, aliases, method, parameters)
48 | {
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/Core.Reference/CoordinateOperationParameter.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference
16 | {
17 | using System;
18 |
19 | ///
20 | /// Represents a coordinate operation parameter.
21 | ///
22 | public class CoordinateOperationParameter : IdentifiedObject
23 | {
24 | ///
25 | /// Initializes a new instance of the class.
26 | ///
27 | /// The identifier.
28 | /// The name.
29 | /// The description.
30 | /// The identifier is null.
31 | public CoordinateOperationParameter(String identifier, String name, String description)
32 | : this(identifier, name, null, null, description)
33 | {
34 | }
35 |
36 | ///
37 | /// Initializes a new instance of the class.
38 | ///
39 | /// The identifier.
40 | /// The name.
41 | /// The remarks.
42 | /// The aliases.
43 | /// The description.
44 | /// The identifier is null.
45 | public CoordinateOperationParameter(String identifier, String name, String remarks, String[] aliases, String description)
46 | : base(identifier, name, remarks, aliases)
47 | {
48 | this.Description = description ?? String.Empty;
49 | }
50 |
51 | ///
52 | /// Gets the description of the parameter.
53 | ///
54 | /// The description of the parameter.
55 | public String Description { get; }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/Core.Reference/CoordinateSystemType.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference
16 | {
17 | ///
18 | /// Defines the types of coordinate systems.
19 | ///
20 | public enum CoordinateSystemType
21 | {
22 | ///
23 | /// Unknown coordinate system.
24 | ///
25 | Unknown,
26 |
27 | ///
28 | /// Affine coordinate system.
29 | ///
30 | Affine,
31 |
32 | ///
33 | /// Cartesian coordinate system.
34 | ///
35 | Cartesian,
36 |
37 | ///
38 | /// Cylindrical coordinate system.
39 | ///
40 | Cylindrical,
41 |
42 | ///
43 | /// Ellipsoidal coordinate system.
44 | ///
45 | Ellipsoidal,
46 |
47 | ///
48 | /// Linear coordinate system.
49 | ///
50 | Linear,
51 |
52 | ///
53 | /// Polar coordinate system.
54 | ///
55 | Polar,
56 |
57 | ///
58 | /// Spherical coordinate system.
59 | ///
60 | Spherical,
61 |
62 | ///
63 | /// User-defined coordinate system.
64 | ///
65 | UserDefined,
66 |
67 | ///
68 | /// Vertical coordinate system.
69 | ///
70 | Vertical,
71 |
72 | ///
73 | /// Temporal coordinate system.
74 | ///
75 | Temporal,
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/Core.Reference/EllipsoidHemisphere.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference
16 | {
17 | ///
18 | /// Defines the ellipsoid hemispheres.
19 | ///
20 | public enum EllipsoidHemisphere
21 | {
22 | ///
23 | /// The north hemisphere.
24 | ///
25 | North,
26 |
27 | ///
28 | /// The south hemisphere.
29 | ///
30 | South,
31 |
32 | ///
33 | /// The equator.
34 | ///
35 | Equador,
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Core.Reference/OperationAspect.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference
16 | {
17 | ///
18 | /// Defines the ellipsoidal application aspects of operation.
19 | ///
20 | public enum OperationAspect
21 | {
22 | ///
23 | /// North polar case.
24 | ///
25 | NorthPolar,
26 |
27 | ///
28 | /// South polar case.
29 | ///
30 | SouthPolar,
31 |
32 | ///
33 | /// Oblique case.
34 | ///
35 | Oblique,
36 |
37 | ///
38 | /// Equatorial case.
39 | ///
40 | Equatorial,
41 |
42 | ///
43 | /// Undefined case.
44 | ///
45 | Undefined,
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/Core.Reference/ReferenceSystem.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference
16 | {
17 | using System;
18 |
19 | ///
20 | /// Represents a general reference system.
21 | ///
22 | ///
23 | /// A reference system contains the metadata required to interpret spatial location or temporal position information unambiguously.
24 | ///
25 | public abstract class ReferenceSystem : IdentifiedObject, IReferenceSystem
26 | {
27 | ///
28 | /// Initializes a new instance of the class.
29 | ///
30 | /// The identifier.
31 | /// The name.
32 | /// The remarks.
33 | /// The aliases.
34 | /// The scope.
35 | /// The identifier is null.
36 | protected ReferenceSystem(String identifier, String name, String remarks, String[] aliases, String scope)
37 | : base(identifier, name, remarks, aliases)
38 | {
39 | this.Scope = scope ?? String.Empty;
40 | }
41 |
42 | ///
43 | /// Gets the dimension of the reference system.
44 | ///
45 | /// The dimension of the reference system.
46 | public abstract Int32 Dimension { get; }
47 |
48 | ///
49 | /// Gets the scope of the reference system.
50 | ///
51 | /// Description of usage, or limitations of usage, for which this reference system is valid.
52 | public String Scope { get; private set; }
53 |
54 | ///
55 | /// Gets the type of the reference system.
56 | ///
57 | /// The type of the reference system.
58 | public abstract ReferenceSystemType Type { get; }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/Core.Reference/ReferenceSystemType.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference
16 | {
17 | ///
18 | /// Defines the types of coordinate reference systems.
19 | ///
20 | public enum ReferenceSystemType
21 | {
22 | ///
23 | /// Unknown reference system.
24 | ///
25 | Unknown,
26 |
27 | ///
28 | /// Compound reference system.
29 | ///
30 | Compound,
31 |
32 | ///
33 | /// Geocentric reference system.
34 | ///
35 | Geocentric,
36 |
37 | ///
38 | /// Geographic 2D reference system.
39 | ///
40 | Geographic2D,
41 |
42 | ///
43 | /// Geographic 3D reference system.
44 | ///
45 | Geographic3D,
46 |
47 | ///
48 | /// Grid reference system.
49 | ///
50 | Grid,
51 |
52 | ///
53 | /// Projected reference system.
54 | ///
55 | Projected,
56 |
57 | ///
58 | /// Temporal reference system.
59 | ///
60 | Temporal,
61 |
62 | ///
63 | /// User defined reference system.
64 | ///
65 | UserDefined,
66 |
67 | ///
68 | /// Vertical reference system.
69 | ///
70 | Vertical,
71 | }
72 | }
--------------------------------------------------------------------------------
/src/Core.Reference/Resources/Alias.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Core.Reference/Resources/Alias.txt
--------------------------------------------------------------------------------
/src/Core.Reference/Resources/Area.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Core.Reference/Resources/Area.txt
--------------------------------------------------------------------------------
/src/Core.Reference/Resources/CoordinateOperation.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Core.Reference/Resources/CoordinateOperation.txt
--------------------------------------------------------------------------------
/src/Core.Reference/Resources/CoordinateReferenceSystem.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Core.Reference/Resources/CoordinateReferenceSystem.txt
--------------------------------------------------------------------------------
/src/Core.Reference/Resources/CoordinateSystem.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Core.Reference/Resources/CoordinateSystem.txt
--------------------------------------------------------------------------------
/src/Core.Reference/Resources/CoordinateSystemAxisMapping.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Core.Reference/Resources/CoordinateSystemAxisMapping.txt
--------------------------------------------------------------------------------
/src/Core.Reference/Resources/Datum.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Core.Reference/Resources/Datum.txt
--------------------------------------------------------------------------------
/src/Core.Reference/Resources/Ellipsoid.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Core.Reference/Resources/Ellipsoid.txt
--------------------------------------------------------------------------------
/src/Core.Reference/Resources/PrimeMeridian.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Core.Reference/Resources/PrimeMeridian.txt
--------------------------------------------------------------------------------
/src/Core.Reference/Strategies/ForwardCoordinateProjectionStrategy.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference.Strategies
16 | {
17 | using System;
18 | using AEGIS.Reference.Resources;
19 |
20 | ///
21 | /// Represents a forward coordinate projection strategy.
22 | ///
23 | public class ForwardCoordinateProjectionStrategy : ICoordinateOperationStrategy
24 | {
25 | ///
26 | /// The target reference system. This field is read-only.
27 | ///
28 | private readonly ProjectedCoordinateReferenceSystem target;
29 |
30 | ///
31 | /// Initializes a new instance of the class.
32 | ///
33 | /// The target reference system.
34 | /// The reference system is null.
35 | public ForwardCoordinateProjectionStrategy(ProjectedCoordinateReferenceSystem target)
36 | {
37 | this.target = target ?? throw new ArgumentNullException(nameof(target));
38 | }
39 |
40 | ///
41 | /// Gets the source reference system.
42 | ///
43 | /// The source reference system.
44 | public ReferenceSystem Source { get { return this.target.BaseReferenceSystem; } }
45 |
46 | ///
47 | /// Gets the target reference system.
48 | ///
49 | /// The target reference system.
50 | public ReferenceSystem Target { get { return this.target; } }
51 |
52 | ///
53 | /// Applies the strategy on the specified coordinate.
54 | ///
55 | /// The coordinate.
56 | /// The transformed coordinate.
57 | public Coordinate Apply(GeoCoordinate coordinate)
58 | {
59 | return this.target.Projection.Forward(coordinate);
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/Core.Reference/Strategies/ForwardLatLonHiCoordinateIntepretationStrategy.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference.Strategies
16 | {
17 | ///
18 | /// Represents a forward coordinate interpretation for (latitude, longitude, height) representation.
19 | ///
20 | public class ForwardLatLonHiCoordinateIntepretationStrategy : ForwardLatLonCoordinateInterpretationStrategy
21 | {
22 | ///
23 | /// The unit of measurement of the height. This field is read-only.
24 | ///
25 | private readonly UnitOfMeasurement heightUnit;
26 |
27 | ///
28 | /// Initializes a new instance of the class.
29 | ///
30 | /// The reference system.
31 | /// The reference system is null.
32 | /// The dimension of the coordinate system is less than expected.
33 | public ForwardLatLonHiCoordinateIntepretationStrategy(CoordinateReferenceSystem referenceSystem)
34 | : base(referenceSystem)
35 | {
36 | this.heightUnit = this.referenceSystem.CoordinateSystem.GetAxis(2).Unit;
37 | }
38 |
39 | ///
40 | /// Applies the strategy on the specified coordinate.
41 | ///
42 | /// The coordinate.
43 | /// The transformed coordinate.
44 | public override Coordinate Apply(GeoCoordinate coordinate)
45 | {
46 | return new Coordinate(coordinate.Latitude.GetValue(this.latitudeUnit), coordinate.Longitude.GetValue(this.longitudeUnit), coordinate.Height.GetValue(this.heightUnit));
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/Core.Reference/Strategies/ForwardLonLatHiCoordinateInterpretationStrategy.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference.Strategies
16 | {
17 | ///
18 | /// Represents a forward coordinate interpretation for (longitude, latitude, height) representation.
19 | ///
20 | public class ForwardLonLatHiCoordinateInterpretationStrategy : ForwardLatLonCoordinateInterpretationStrategy
21 | {
22 | ///
23 | /// The unit of measurement of the height. This field is read-only.
24 | ///
25 | private readonly UnitOfMeasurement heightUnit;
26 |
27 | ///
28 | /// Initializes a new instance of the class.
29 | ///
30 | /// The reference system.
31 | /// The reference system is null.
32 | /// The dimension of the coordinate system is less than expected.
33 | public ForwardLonLatHiCoordinateInterpretationStrategy(CoordinateReferenceSystem referenceSystem)
34 | : base(referenceSystem)
35 | {
36 | this.heightUnit = this.referenceSystem.CoordinateSystem.GetAxis(2).Unit;
37 | }
38 |
39 | ///
40 | /// Applies the strategy on the specified coordinate.
41 | ///
42 | /// The coordinate.
43 | /// The transformed coordinate.
44 | public override Coordinate Apply(GeoCoordinate coordinate)
45 | {
46 | return new Coordinate(coordinate.Longitude.GetValue(this.longitudeUnit), coordinate.Latitude.GetValue(this.latitudeUnit), coordinate.Height.GetValue(this.heightUnit));
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/Core.Reference/Strategies/ICoordinateOperationStrategy.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference.Strategies
16 | {
17 | using AEGIS.Reference;
18 |
19 | ///
20 | /// Defines behavior of coordinate operation strategies.
21 | ///
22 | public interface ICoordinateOperationStrategy : ICoordinateOperationStrategy
23 | {
24 | }
25 |
26 | ///
27 | /// Defines behavior of generic coordinate operation strategies.
28 | ///
29 | /// The source coordinate type.
30 | /// The result coordinate type.
31 | public interface ICoordinateOperationStrategy
32 | {
33 | ///
34 | /// Gets the source reference system.
35 | ///
36 | /// The source reference system.
37 | ReferenceSystem Source { get; }
38 |
39 | ///
40 | /// Gets the target reference system.
41 | ///
42 | /// The target reference system.
43 | ReferenceSystem Target { get; }
44 |
45 | ///
46 | /// Applies the strategy on the specified coordinate.
47 | ///
48 | /// The coordinate.
49 | /// The transformed coordinate.
50 | ResultType Apply(SourceType coordinate);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/Core.Reference/Strategies/ReverseCoordinateProjectionStrategy.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference.Strategies
16 | {
17 | using System;
18 | using AEGIS.Reference.Resources;
19 |
20 | ///
21 | /// Represents a reverse coordinate projection strategy.
22 | ///
23 | public class ReverseCoordinateProjectionStrategy : ICoordinateOperationStrategy
24 | {
25 | ///
26 | /// The target reference system. This field is read-only.
27 | ///
28 | private readonly ProjectedCoordinateReferenceSystem source;
29 |
30 | ///
31 | /// Initializes a new instance of the class.
32 | ///
33 | /// The source reference system.
34 | /// The reference system is null.
35 | public ReverseCoordinateProjectionStrategy(ProjectedCoordinateReferenceSystem source)
36 | {
37 | this.source = source ?? throw new ArgumentNullException(nameof(source));
38 | }
39 |
40 | ///
41 | /// Gets the source reference system.
42 | ///
43 | /// The source reference system.
44 | public ReferenceSystem Source { get { return this.source; } }
45 |
46 | ///
47 | /// Gets the target reference system.
48 | ///
49 | /// The target reference system.
50 | public ReferenceSystem Target { get { return this.source.BaseReferenceSystem; } }
51 |
52 | ///
53 | /// Applies the strategy on the specified coordinate.
54 | ///
55 | /// The coordinate.
56 | /// The transformed coordinate.
57 | public GeoCoordinate Apply(Coordinate coordinate)
58 | {
59 | return this.source.Projection.Reverse(coordinate);
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/Core.Reference/Strategies/ReverseLatLonHiCoordinateInterpretationStrategy.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference.Strategies
16 | {
17 | using System;
18 | using AEGIS.Reference;
19 |
20 | ///
21 | /// Represents a reverse coordinate interpretation for (latitude, longitude, height) representation.
22 | ///
23 | public class ReverseLatLonHiCoordinateInterpretationStrategy : ReverseLatLonCoordinateInterpretationStrategy
24 | {
25 | ///
26 | /// The unit of measurement of the height. This field is read-only.
27 | ///
28 | private readonly UnitOfMeasurement heightUnit;
29 |
30 | ///
31 | /// Initializes a new instance of the class.
32 | ///
33 | /// The reference system.
34 | /// The reference system is null.
35 | /// The dimension of the coordinate system is less than expected.
36 | public ReverseLatLonHiCoordinateInterpretationStrategy(CoordinateReferenceSystem referenceSystem)
37 | : base(referenceSystem)
38 | {
39 | this.heightUnit = this.referenceSystem.CoordinateSystem.GetAxis(2).Unit;
40 | }
41 |
42 | ///
43 | /// Applies the strategy on the specified coordinate.
44 | ///
45 | /// The coordinate.
46 | /// The transformed coordinate.
47 | public override GeoCoordinate Apply(Coordinate coordinate)
48 | {
49 | return new GeoCoordinate(new Angle(coordinate.X, this.latitudeUnit), new Angle(coordinate.Y, this.longitudeUnit), new Length(coordinate.Z, this.heightUnit));
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/Core.Reference/Strategies/ReverseLonLatHiCoordinateInterpretationStrategy.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference.Strategies
16 | {
17 | using System;
18 | using AEGIS.Reference;
19 |
20 | ///
21 | /// Represents a reverse coordinate interpretation for (longitude, latitude, height) representation.
22 | ///
23 | public class ReverseLonLatHiCoordinateInterpretationStrategy : ReverseLonLatCoordinateIntepretationStrategy
24 | {
25 | ///
26 | /// The unit of measurement of the height. This field is read-only.
27 | ///
28 | private readonly UnitOfMeasurement heightUnit;
29 |
30 | ///
31 | /// Initializes a new instance of the class.
32 | ///
33 | /// The reference system.
34 | /// The reference system is null.
35 | /// The dimension of the coordinate system is less than expected.
36 | public ReverseLonLatHiCoordinateInterpretationStrategy(CoordinateReferenceSystem referenceSystem)
37 | : base(referenceSystem)
38 | {
39 | this.heightUnit = this.referenceSystem.CoordinateSystem.GetAxis(2).Unit;
40 | }
41 |
42 | ///
43 | /// Applies the strategy on the specified coordinate.
44 | ///
45 | /// The coordinate.
46 | /// The transformed coordinate.
47 | public override GeoCoordinate Apply(Coordinate coordinate)
48 | {
49 | return new GeoCoordinate(new Angle(coordinate.Y, this.latitudeUnit), new Angle(coordinate.X, this.longitudeUnit), new Length(coordinate.Z, this.heightUnit));
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/Core.Reference/UnitQuantityType.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference
16 | {
17 | ///
18 | /// Defines the measurement quantity types.
19 | ///
20 | public enum UnitQuantityType
21 | {
22 | ///
23 | /// Indicates that the unit is a length measure.
24 | ///
25 | Length,
26 |
27 | ///
28 | /// Indicates that the unit is an angular measure.
29 | ///
30 | Angle,
31 |
32 | ///
33 | /// Indicates that the unit is a time measure.
34 | ///
35 | Time,
36 |
37 | ///
38 | /// Indicates that the unit is a scale measure.
39 | ///
40 | Scale,
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/Core.Reference/VerticalDatumType.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Reference
16 | {
17 | ///
18 | /// Defines the subtypes of vertical datum.
19 | ///
20 | public enum VerticalDatumType
21 | {
22 | ///
23 | /// Unknown datum.
24 | ///
25 | Unknown,
26 |
27 | ///
28 | /// Ellipsoidal datum.
29 | ///
30 | Ellipsoidal,
31 |
32 | ///
33 | /// Orthometric datum.
34 | ///
35 | Orthometric,
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Core/Algorithms/IntersectionType.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Algorithms
16 | {
17 | ///
18 | /// Defines the intersection types.
19 | ///
20 | public enum IntersectionType
21 | {
22 | ///
23 | /// Indicates no intersection.
24 | ///
25 | None,
26 |
27 | ///
28 | /// Indicates intersection at a single coordinate.
29 | ///
30 | Coordinate,
31 |
32 | ///
33 | /// Indicates intersection between two distinct coordinates.
34 | ///
35 | Interval,
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Core/Algorithms/SweepLines/EndPointEvent.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Algorithms.SweepLines
16 | {
17 | using System;
18 |
19 | ///
20 | /// Represents an endpoint event.
21 | ///
22 | public class EndPointEvent : Event
23 | {
24 | ///
25 | /// Gets or sets the polygon edge associated with the event.
26 | ///
27 | /// The polygon edge associated with the event.
28 | public Int32 Edge { get; set; }
29 |
30 | ///
31 | /// Gets or sets the event type.
32 | ///
33 | /// The event type.
34 | public EventType Type { get; set; }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/Core/Algorithms/SweepLines/Event.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Algorithms.SweepLines
16 | {
17 | using System;
18 |
19 | ///
20 | /// Represents an event.
21 | ///
22 | /// Máté Cserép
23 | public class Event
24 | {
25 | ///
26 | /// Gets or sets the polygon vertex associated with the event.
27 | ///
28 | /// The polygon vertex associated with the event.
29 | public Coordinate Vertex { get; set; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Core/Algorithms/SweepLines/EventType.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Algorithms.SweepLines
16 | {
17 | ///
18 | /// Defines the endpoint event types.
19 | ///
20 | /// Máté Cserép
21 | public enum EventType
22 | {
23 | ///
24 | /// Indicates a left event.
25 | ///
26 | Left,
27 |
28 | ///
29 | /// Indicates a right event.
30 | ///
31 | Right,
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Core/Algorithms/SweepLines/IntersectionEvent.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Algorithms.SweepLines
16 | {
17 | using System;
18 |
19 | ///
20 | /// Represents an intersection event.
21 | ///
22 | /// Máté Cserép
23 | public class IntersectionEvent : Event
24 | {
25 | ///
26 | /// Gets or sets the below instance intersecting at this event.
27 | ///
28 | /// The below instance intersecting at this event.
29 | public SweepLineSegment Below { get; set; }
30 |
31 | ///
32 | /// Gets or sets the above instance intersecting at this event.
33 | ///
34 | /// The above instance intersecting at this event.
35 | public SweepLineSegment Above { get; set; }
36 |
37 | ///
38 | /// Gets or sets a value indicating whether gets or sets whether the event is a closing point for the intersection.
39 | ///
40 | /// true if the event is a closing point for the intersection; otherwise, false.
41 | public Boolean IsClosing { get; set; }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Core/Attributes/AttributeCollection.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Attributes
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 | using AEGIS.Resources;
20 |
21 | ///
22 | /// Represents a collection of attributes.
23 | ///
24 | public class AttributeCollection : Dictionary, IAttributeCollection
25 | {
26 | ///
27 | /// Initializes a new instance of the class.
28 | ///
29 | public AttributeCollection()
30 | : base()
31 | {
32 | }
33 |
34 | ///
35 | /// Initializes a new instance of the class.
36 | ///
37 | /// The initial number of elements that the can contain.
38 | /// The capacity is less than 0.
39 | public AttributeCollection(Int32 capacity)
40 | : base(capacity)
41 | {
42 | }
43 |
44 | ///
45 | /// Initializes a new instance of the class.
46 | ///
47 | /// The whose elements are copied to the new .
48 | public AttributeCollection(IDictionary source)
49 | : base(source)
50 | {
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/Core/Attributes/AttributeCollectionFactory.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Attributes
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Represents a factory for attribute collections.
22 | ///
23 | public class AttributeCollectionFactory : Factory, IAttributeCollectionFactory
24 | {
25 | ///
26 | /// Initializes a new instance of the class.
27 | ///
28 | public AttributeCollectionFactory() { }
29 |
30 | ///
31 | /// Creates an attribute collection.
32 | ///
33 | /// The produced attribute collection.
34 | public virtual IAttributeCollection CreateCollection() { return new AttributeCollection(); }
35 |
36 | ///
37 | /// Creates an attribute collection.
38 | ///
39 | /// The source collection.
40 | /// The produced attribute collection.
41 | public virtual IAttributeCollection CreateCollection(IDictionary source)
42 | {
43 | if (source == null)
44 | return null;
45 |
46 | return new AttributeCollection(source);
47 | }
48 |
49 | ///
50 | /// Creates an attribute collection.
51 | ///
52 | /// The source collection.
53 | /// The produced attribute collection.
54 | public virtual IAttributeCollection CreateCollection(IAttributeCollection source)
55 | {
56 | if (source == null)
57 | return null;
58 |
59 | return new AttributeCollection(source);
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/Core/CoordinateComparer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Represents a comparer for instances.
22 | ///
23 | public class CoordinateComparer : IComparer
24 | {
25 | ///
26 | /// Compares two instances and returns a value indicating whether one is less than, equal to, or greater than the other.
27 | ///
28 | /// The first to compare.
29 | /// The second to compare.
30 | /// A signed integer that indicates the relative values of and .
31 | public Int32 Compare(Coordinate x, Coordinate y)
32 | {
33 | if (x == null && y == null)
34 | return 0;
35 | if (x == null)
36 | return -1;
37 | if (y == null)
38 | return 1;
39 | if (!x.IsValid || !y.IsValid)
40 | return 0;
41 | if (x.X < y.X)
42 | return -1;
43 | if (x.X > y.X)
44 | return 1;
45 | if (x.Y < y.Y)
46 | return -1;
47 | return x.Y > y.Y ? 1 : 0;
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/Core/Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 | AEGIS
6 | AEGIS.Core
7 | 0.1.0
8 | Roberto Giachetta et al.
9 | Eötvös Loránd University (ELTE)
10 | Core library of the AEGIS framework.
11 | Copyright Roberto Giachetta 2016-2017
12 | http://opensource.org/licenses/ECL-2.0
13 | https://github.com/AegisSpatial/aegis
14 |
15 | ..\analyzer.ruleset
16 |
17 |
18 |
19 | full
20 | True
21 | ..\..\docs\AEGIS.Core.xml
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | all
36 | runtime; build; native; contentfiles; analyzers; buildtransitive
37 |
38 |
39 |
40 |
41 |
42 | True
43 | True
44 | CoreMessages.resx
45 |
46 |
47 |
48 |
49 |
50 | PublicResXFileCodeGenerator
51 | CoreMessages.Designer.cs
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/Core/Features/Feature.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Features
16 | {
17 | using System;
18 | using AEGIS.Attributes;
19 | using AEGIS.Resources;
20 |
21 | ///
22 | /// Represents a geographic feature.
23 | ///
24 | public class Feature : IFeature
25 | {
26 | ///
27 | /// Initializes a new instance of the class.
28 | ///
29 | /// The identifier.
30 | /// The geometry.
31 | /// The attributes.
32 | ///
33 | /// The identifier is null.
34 | /// or
35 | /// The geometry is null.
36 | /// or
37 | /// The attribute collection is null.
38 | ///
39 | public Feature(String identifier, IGeometry geometry, IAttributeCollection attributes)
40 | {
41 | this.Identifier = identifier ?? throw new ArgumentNullException(nameof(identifier));
42 | this.Geometry = geometry;
43 | this.Attributes = attributes ?? new AttributeCollection();
44 | }
45 |
46 | ///
47 | /// Gets the attribute collection of the feature.
48 | ///
49 | /// The collection of attribute.
50 | public IAttributeCollection Attributes { get; private set; }
51 |
52 | ///
53 | /// Gets the geometry of the feature.
54 | ///
55 | /// The geometry of the feature.
56 | public IGeometry Geometry { get; private set; }
57 |
58 | ///
59 | /// Gets the unique identifier of the feature.
60 | ///
61 | /// The identifier of the feature.
62 | public String Identifier { get; private set; }
63 | }
64 | }
--------------------------------------------------------------------------------
/src/Core/Geometries/Curve.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Geometries
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Represents a curve geometry in Cartesian coordinate space.
22 | ///
23 | public abstract class Curve : Geometry, ICurve
24 | {
25 | ///
26 | /// Initializes a new instance of the class.
27 | ///
28 | /// The precision model.
29 | /// The reference system.
30 | protected Curve(PrecisionModel precisionModel, IReferenceSystem referenceSystem)
31 | : base(precisionModel, referenceSystem)
32 | {
33 | }
34 |
35 | ///
36 | /// Gets the inherent dimension of the curve.
37 | ///
38 | /// 1, which is the defined dimension of a curve.
39 | public override sealed Int32 Dimension { get { return 1; } }
40 |
41 | ///
42 | /// Gets a value indicating whether the curve is closed.
43 | ///
44 | /// true if the starting and ending coordinates are equal; otherwise, false.
45 | public abstract Boolean IsClosed { get; }
46 |
47 | ///
48 | /// Gets a value indicating whether the curve is a ring.
49 | ///
50 | /// true if the curve is simple and closed; otherwise, false.
51 | public Boolean IsRing { get { return this.IsClosed && this.IsSimple; } }
52 |
53 | ///
54 | /// Gets the length of the curve.
55 | ///
56 | /// The length of the curve.
57 | public abstract Double Length { get; }
58 |
59 | ///
60 | /// Gets the staring point.
61 | ///
62 | /// The first point of the curve if the curve has at least one point; otherwise, null.
63 | public abstract IPoint StartPoint { get; }
64 |
65 | ///
66 | /// Gets the ending point.
67 | ///
68 | /// The last point of the curve if the curve has at least one point; otherwise, null.
69 | public abstract IPoint EndPoint { get; }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/src/Core/Geometries/Surface.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Geometries
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Represents a surface geometry in Cartesian coordinate space.
22 | ///
23 | public abstract class Surface : Geometry, ISurface
24 | {
25 | ///
26 | /// Initializes a new instance of the class.
27 | ///
28 | /// The precision model.
29 | /// The reference system.
30 | protected Surface(PrecisionModel precisionModel, IReferenceSystem referenceSystem)
31 | : base(precisionModel, referenceSystem)
32 | {
33 | }
34 |
35 | ///
36 | /// Gets the inherent dimension of the surface.
37 | ///
38 | /// 2, which is the defined dimension of a surface.
39 | public override sealed Int32 Dimension { get { return 2; } }
40 |
41 | ///
42 | /// Gets a value indicating whether the surface is convex.
43 | ///
44 | /// true if the surface is convex; otherwise, false.
45 | public abstract Boolean IsConvex { get; }
46 |
47 | ///
48 | /// Gets a value indicating whether the surface is divided.
49 | ///
50 | /// true if the surface is divided; otherwise, false.
51 | public abstract Boolean IsDivided { get; }
52 |
53 | ///
54 | /// Gets a value indicating whether the surface is whole.
55 | ///
56 | /// true if the surface is whole; otherwise, false.
57 | public abstract Boolean IsWhole { get; }
58 |
59 | ///
60 | /// Gets the area of the surface.
61 | ///
62 | /// The area of the surface.
63 | public abstract Double Area { get; }
64 |
65 | ///
66 | /// Gets the perimeter of the surface.
67 | ///
68 | /// The perimeter of the surface.
69 | public abstract Double Perimeter { get; }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/src/Core/IAttributeCollection.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Defines behavior of a collection of attributes.
22 | ///
23 | public interface IAttributeCollection : IDictionary
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Core/IAttributeCollectionFactory.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Defines behavior for factories producing instances.
22 | ///
23 | public interface IAttributeCollectionFactory : IFactory
24 | {
25 | ///
26 | /// Creates an attribute collection.
27 | ///
28 | /// The produced attribute collection.
29 | IAttributeCollection CreateCollection();
30 |
31 | ///
32 | /// Creates an attribute collection.
33 | ///
34 | /// The source collection.
35 | /// The produced attribute collection.
36 | IAttributeCollection CreateCollection(IDictionary source);
37 |
38 | ///
39 | /// Creates an attribute collection.
40 | ///
41 | /// The source collection.
42 | /// The produced attribute collection.
43 | IAttributeCollection CreateCollection(IAttributeCollection source);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/Core/IBasicGeometry.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines properties of basic geometries.
21 | ///
22 | ///
23 | /// A basic geometry is a simplification of the general geometries described by the Open Geospatial Consortium (OGC) Simple Feature Access (SFA) standard.
24 | /// Basic geometries serve as lightweight, read-only objects, which define basic properties used by geometric algorithms.
25 | ///
26 | ///
27 | public interface IBasicGeometry
28 | {
29 | ///
30 | /// Gets the inherent dimension of the geometry.
31 | ///
32 | /// The inherent dimension of the geometry.
33 | Int32 Dimension { get; }
34 |
35 | ///
36 | /// Gets the minimum bounding of the geometry.
37 | ///
38 | /// The minimum bounding box of the geometry.
39 | Envelope Envelope { get; }
40 |
41 | ///
42 | /// Gets a value indicating whether the geometry is empty.
43 | ///
44 | /// true if the geometry is considered to be empty; otherwise, false.
45 | Boolean IsEmpty { get; }
46 |
47 | ///
48 | /// Gets a value indicating whether the geometry is valid.
49 | ///
50 | /// true if the geometry is considered to be valid; otherwise, false.
51 | Boolean IsValid { get; }
52 |
53 | ///
54 | /// Returns the equivalent of the instance.
55 | ///
56 | /// An object that supplies culture-specific formatting information.
57 | /// A containing the coordinates in all dimensions.
58 | String ToString(IFormatProvider provider);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/Core/IBasicPoint.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines properties of basic point geometries.
21 | ///
22 | ///
23 | /// A point is a 0-dimensional geometric object and represents a single location in coordinate space. The location is defined as a instance.
24 | ///
25 | public interface IBasicPoint : IBasicGeometry
26 | {
27 | ///
28 | /// Gets the X coordinate.
29 | ///
30 | /// The X coordinate.
31 | Double X { get; }
32 |
33 | ///
34 | /// Gets the Y coordinate.
35 | ///
36 | /// The Y coordinate.
37 | Double Y { get; }
38 |
39 | ///
40 | /// Gets the Z coordinate.
41 | ///
42 | /// The Z coordinate.
43 | Double Z { get; }
44 |
45 | ///
46 | /// Gets the coordinate associated with the point.
47 | ///
48 | /// The coordinate associated with the point.
49 | Coordinate Coordinate { get; }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/Core/IBasicPolygon.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Defines properties of basic polygon geometries.
22 | ///
23 | ///
24 | /// A polygon is a planar 2-dimensional geometric object defined by 1 exterior boundary (shell) and 0 or more interior boundaries (holes).
25 | ///
26 | public interface IBasicPolygon : IBasicGeometry
27 | {
28 | ///
29 | /// Gets the shell of the polygon.
30 | ///
31 | /// The line string representing the shell of the polygon.
32 | IBasicLineString Shell { get; }
33 |
34 | ///
35 | /// Gets the number of holes of the polygon.
36 | ///
37 | /// The number of holes in the polygon.
38 | Int32 HoleCount { get; }
39 |
40 | ///
41 | /// Gets the holes of the polygon.
42 | ///
43 | /// The read-only list containing the holes of the polygon.
44 | IReadOnlyList Holes { get; }
45 |
46 | ///
47 | /// Gets a hole at the specified index.
48 | ///
49 | /// The zero-based index of the hole to get.
50 | /// The hole at the specified index.
51 | /// There are no holes in the polygon.
52 | ///
53 | /// Index is less than 0.
54 | /// or
55 | /// Index is equal to or greater than the number of holes.
56 | ///
57 | IBasicLineString GetHole(Int32 index);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/Core/ICurve.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Defines behavior for curve geometries.
22 | ///
23 | ///
24 | /// A curve is a one-dimensional geometric object usually stored as a sequence of points, with the subtype of the curve specifying the form of the interpolation between the points.
25 | ///
26 | public interface ICurve : IGeometry
27 | {
28 | ///
29 | /// Gets a value indicating whether the curve is closed.
30 | ///
31 | /// true if the starting and ending coordinates are equal; otherwise, false.
32 | Boolean IsClosed { get; }
33 |
34 | ///
35 | /// Gets a value indicating whether the curve is a ring.
36 | ///
37 | /// true if the curve is simple and closed; otherwise, false.
38 | Boolean IsRing { get; }
39 |
40 | ///
41 | /// Gets the length of the curve.
42 | ///
43 | /// The length of the curve.
44 | Double Length { get; }
45 |
46 | ///
47 | /// Gets the staring point.
48 | ///
49 | /// The first point of the curve if the curve has at least one point; otherwise, null.
50 | IPoint StartPoint { get; }
51 |
52 | ///
53 | /// Gets the ending point.
54 | ///
55 | /// The last point of the curve if the curve has at least one point; otherwise, null.
56 | IPoint EndPoint { get; }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/Core/IFeature.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines properties of geographic features.
21 | ///
22 | ///
23 | /// A feature is an object that can have a geographic location and other properties, known as attributes.
24 | ///
25 | public interface IFeature
26 | {
27 | ///
28 | /// Gets the attribute collection of the feature.
29 | ///
30 | /// The collection of attribute.
31 | IAttributeCollection Attributes { get; }
32 |
33 | ///
34 | /// Gets the geometry of the feature.
35 | ///
36 | /// The geometry of the feature.
37 | IGeometry Geometry { get; }
38 |
39 | ///
40 | /// Gets the unique identifier of the feature.
41 | ///
42 | /// The identifier of the feature.
43 | String Identifier { get; }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/Core/IFeatureCollection.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Defines properties of geographic feature collections.
22 | ///
23 | public interface IFeatureCollection : IFeature, ICollection
24 | {
25 | ///
26 | /// Gets the feature identifiers within the collection.
27 | ///
28 | /// The read-only list of feature identifiers within the collection.
29 | IEnumerable Identifiers { get; }
30 |
31 | ///
32 | /// Gets the feature with the specified identifier.
33 | ///
34 | /// The feature identifier.
35 | /// The feature at the specified index if the feature exists; otherwise, null.
36 | IFeature this[String identifier] { get; }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Core/IGeometry.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Defines behavior for geometries in coordinate space.
22 | ///
23 | ///
24 | /// Geometries are the fundamental building blocks for geographic data storage as described by the Open Geospatial Consortium (OGC) Simple Feature Access (SFA) standard.
25 | ///
26 | public interface IGeometry : IBasicGeometry
27 | {
28 | ///
29 | /// Gets the precision model of the geometry.
30 | ///
31 | /// The precision model of the geometry.
32 | PrecisionModel PrecisionModel { get; }
33 |
34 | ///
35 | /// Gets the reference system of the geometry.
36 | ///
37 | /// The reference system of the geometry.
38 | IReferenceSystem ReferenceSystem { get; }
39 |
40 | ///
41 | /// Gets the coordinate dimension of the geometry.
42 | ///
43 | /// The coordinate dimension of the geometry. The coordinate dimension is equal to the dimension of the reference system, if provided.
44 | Int32 CoordinateDimension { get; }
45 |
46 | ///
47 | /// Gets the spatial dimension of the geometry.
48 | ///
49 | /// The spatial dimension of the geometry. The spatial dimension is always less than or equal to the coordinate dimension.
50 | Int32 SpatialDimension { get; }
51 |
52 | ///
53 | /// Gets the bounding geometry.
54 | ///
55 | /// The boundary of the geometry.
56 | IGeometry Boundary { get; }
57 |
58 | ///
59 | /// Gets the centroid of the geometry.
60 | ///
61 | /// The centroid of the geometry.
62 | Coordinate Centroid { get; }
63 |
64 | ///
65 | /// Gets a value indicating whether the geometry is simple.
66 | ///
67 | /// true if the geometry is considered to be simple; otherwise, false.
68 | Boolean IsSimple { get; }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/Core/IGeometryCollection.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 | using System.Collections;
19 | using System.Collections.Generic;
20 |
21 | ///
22 | /// Defines behavior for generic geometry collections in coordinate space.
23 | ///
24 | ///
25 | /// A geometry collection is a geometric object that is a collection of some number of geometric objects. Generally there are no constraints on its items other than the reference system and precision model of the items must match.
26 | ///
27 | public interface IGeometryCollection : IGeometry, IEnumerable
28 | {
29 | ///
30 | /// Gets the number of geometries contained in the .
31 | ///
32 | ///
33 | /// The number of geometries contained in the .
34 | ///
35 | Int32 Count { get; }
36 |
37 | ///
38 | /// Gets a geometry at the specified index.
39 | ///
40 | /// The zero-based index of the geometry to get.
41 | /// The geometry at the specified index.
42 | ///
43 | /// Index is less than 0.
44 | /// or
45 | /// Index is equal to or greater than the number of geometries.
46 | ///
47 | IGeometry this[Int32 index] { get; }
48 | }
49 |
50 | ///
51 | /// Defines behavior for generic geometry collections in coordinate space.
52 | ///
53 | /// The type of geometry.
54 | public interface IGeometryCollection : IGeometryCollection, IEnumerable
55 | where GeometryType : IGeometry
56 | {
57 | ///
58 | /// Gets a geometry at the specified index.
59 | ///
60 | /// The zero-based index of the geometry to get.
61 | /// The geometry at the specified index.
62 | ///
63 | /// Index is less than 0.
64 | /// or
65 | /// Index is equal to or greater than the number of geometries.
66 | ///
67 | new GeometryType this[Int32 index] { get; }
68 | }
69 | }
--------------------------------------------------------------------------------
/src/Core/ILine.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | ///
18 | /// Defines behavior for line geometries.
19 | ///
20 | ///
21 | /// A line is a line string with exactly 2 points.
22 | ///
23 | public interface ILine : ILineString
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Core/ILineString.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines behavior for line string geometries.
21 | ///
22 | ///
23 | /// A line string is a curve with linear interpolation between points. Each consecutive pair of points defines a Line segment.
24 | ///
25 | public interface ILineString : ICurve, IBasicLineString
26 | {
27 | ///
28 | /// Gets a value indicating whether the curve is closed.
29 | ///
30 | /// true if the starting and ending coordinates are equal; otherwise, false.
31 | new Boolean IsClosed { get; }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Core/ILinearRing.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | ///
18 | /// Defines behavior for linear ring geometries.
19 | ///
20 | ///
21 | /// A linear ring is a line string that is both closed and simple.
22 | ///
23 | public interface ILinearRing : ILineString
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Core/IMultiCurve.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines behavior for multi curve geometries.
21 | ///
22 | /// The type of the curve.
23 | public interface IMultiCurve : IGeometryCollection
24 | where T : ICurve
25 | {
26 | ///
27 | /// Gets a value indicating whether the multi curve is closed.
28 | ///
29 | /// true if all curves within the multi curve are closed; otherwise, false.
30 | Boolean IsClosed { get; }
31 |
32 | ///
33 | /// Gets the length of the multi curve.
34 | ///
35 | /// The instance indicating the length of the multi curve.
36 | Double Length { get; }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Core/IMultiLineString.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | ///
18 | /// Defines behavior for multi line string geometries.
19 | ///
20 | public interface IMultiLineString : IMultiCurve
21 | {
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Core/IMultiPoint.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | ///
18 | /// Defines behavior for multi point geometries.
19 | ///
20 | public interface IMultiPoint : IGeometryCollection
21 | {
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Core/IMultiPolygon.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | ///
18 | /// Defines behavior for multi polygon geometries.
19 | ///
20 | public interface IMultiPolygon : IMultiSurface
21 | {
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Core/IMultiSurface.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines behavior for multi surface geometries.
21 | ///
22 | /// The type of the surface.
23 | public interface IMultiSurface : IGeometryCollection
24 | where T : ISurface
25 | {
26 | ///
27 | /// Gets the area of the multi surface.
28 | ///
29 | /// The sum of areas within the multi surface.
30 | Double Area { get; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Core/IPoint.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | ///
18 | /// Defines behavior for point geometries.
19 | ///
20 | ///
21 | /// A point is a 0-dimensional geometric object and represents a single location in coordinate space.
22 | ///
23 | public interface IPoint : IGeometry, IBasicPoint
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Core/IPolygon.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Defines behavior for polygon geometries.
22 | ///
23 | ///
24 | /// A polygon is a planar surface defined by 1 exterior boundary (shell) and 0 or more interior boundaries (holes).
25 | ///
26 | public interface IPolygon : ISurface, IBasicPolygon
27 | {
28 | ///
29 | /// Gets the shell of the polygon.
30 | ///
31 | /// The linear ring representing the shell of the polygon.
32 | new ILinearRing Shell { get; }
33 |
34 | ///
35 | /// Gets the holes of the polygon.
36 | ///
37 | /// The read-only list containing the holes of the polygon.
38 | new IReadOnlyList Holes { get; }
39 |
40 | ///
41 | /// Gets a hole at the specified index.
42 | ///
43 | /// The zero-based index of the hole to get.
44 | /// The hole at the specified index.
45 | /// There are no holes in the polygon.
46 | ///
47 | /// Index is less than 0.
48 | /// or
49 | /// The index is equal to or greater than the number of coordinates.
50 | ///
51 | new ILinearRing GetHole(Int32 index);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/Core/IReferenceSystem.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines general behavior of reference systems.
21 | ///
22 | public interface IReferenceSystem
23 | {
24 | ///
25 | /// Gets the number of dimensions.
26 | ///
27 | Int32 Dimension { get; }
28 |
29 | ///
30 | /// Gets the identifier.
31 | ///
32 | String Identifier { get; }
33 |
34 | ///
35 | /// Gets the authority.
36 | ///
37 | /// The authority responsible for the object if provided; otherwise, Empty.
38 | String Authority { get; }
39 |
40 | ///
41 | /// Gets the code.
42 | ///
43 | /// The code by which the object is identified in the authority's domain if provided; otherwise, 0.
44 | Int32 Code { get; }
45 |
46 | ///
47 | /// Gets the name.
48 | ///
49 | String Name { get; }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/Core/IReferenceSystemFactory.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 | using System.Linq;
20 | using System.Text;
21 | using System.Threading.Tasks;
22 |
23 | ///
24 | /// Defines behavior for factories producing instances.
25 | ///
26 | public interface IReferenceSystemFactory : IFactory
27 | {
28 | ///
29 | /// Creates a reference system.
30 | ///
31 | /// The identifier of the reference system.
32 | /// The name of the reference system.
33 | /// The produced reference system.
34 | ///
35 | /// The identifier is null.
36 | /// or
37 | /// The name is null.
38 | ///
39 | IReferenceSystem CreateReferenceSystem(String identifier, String name);
40 |
41 | ///
42 | /// Creates a reference system.
43 | ///
44 | /// The identifier of the reference system.
45 | /// The produced reference system.
46 | /// The identifier is null.
47 | IReferenceSystem CreateReferenceSystemFromIdentifier(String identifier);
48 |
49 | ///
50 | /// Creates a reference system.
51 | ///
52 | /// The name of the reference system.
53 | /// The produced reference system.
54 | /// The name is null.
55 | IReferenceSystem CreateReferenceSystemFromName(String name);
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/Core/ISurface.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines behavior for surface geometries.
21 | ///
22 | ///
23 | /// A surface is a 2-dimensional geometric object.
24 | ///
25 | public interface ISurface : IGeometry
26 | {
27 | ///
28 | /// Gets a value indicating whether the surface is convex.
29 | ///
30 | /// true if the surface is convex; otherwise, false.
31 | Boolean IsConvex { get; }
32 |
33 | ///
34 | /// Gets a value indicating whether the surface is divided.
35 | ///
36 | /// true if the surface is divided; otherwise, false.
37 | Boolean IsDivided { get; }
38 |
39 | ///
40 | /// Gets a value indicating whether the surface is whole.
41 | ///
42 | /// true if the surface is whole; otherwise, false.
43 | Boolean IsWhole { get; }
44 |
45 | ///
46 | /// Gets the area of the surface.
47 | ///
48 | /// The area of the surface.
49 | Double Area { get; }
50 |
51 | ///
52 | /// Gets the perimeter of the surface.
53 | ///
54 | /// The perimeter of the surface.
55 | Double Perimeter { get; }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/Core/ITriangle.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | ///
18 | /// Defines behavior for triangle geometries.
19 | ///
20 | ///
21 | /// A Triangle is a polygon with 3 distinct, non-collinear vertexes and no interior boundary.
22 | ///
23 | public interface ITriangle : IPolygon
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Core/IdentifiedObjectAttribute.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | using System;
18 | using AEGIS.Resources;
19 |
20 | ///
21 | /// Indicates that the class implements an identified object.
22 | ///
23 | [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
24 | public class IdentifiedObjectAttribute : Attribute
25 | {
26 | ///
27 | /// Initializes a new instance of the class.
28 | ///
29 | /// The identifier.
30 | /// The name.
31 | /// The identifier is null.
32 | public IdentifiedObjectAttribute(String identifier, String name)
33 | {
34 | this.Identifier = identifier ?? throw new ArgumentNullException(nameof(identifier));
35 | this.Name = name ?? String.Empty;
36 | }
37 |
38 | ///
39 | /// Gets the identifier of the instance.
40 | ///
41 | /// The identifier of the instance.
42 | public String Identifier { get; private set; }
43 |
44 | ///
45 | /// Gets the name of the instance.
46 | ///
47 | /// The name of the instance.
48 | public String Name { get; private set; }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/Core/Orientation.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | ///
18 | /// Defines the possible spatial orientations.
19 | ///
20 | public enum Orientation
21 | {
22 | ///
23 | /// Indicates that the objects are collinear.
24 | ///
25 | Collinear,
26 |
27 | ///
28 | /// Indicates that the object is oriented clockwise.
29 | ///
30 | Clockwise,
31 |
32 | ///
33 | /// Indicates that the object is oriented counterclockwise.
34 | ///
35 | Counterclockwise,
36 |
37 | ///
38 | /// Indicates that the orientation is undefined.
39 | ///
40 | Undefined,
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/Core/PrecisionModelType.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | ///
18 | /// Defines the types of precision models.
19 | ///
20 | public enum PrecisionModelType
21 | {
22 | ///
23 | /// Double precision floating point representation.
24 | ///
25 | Floating,
26 |
27 | ///
28 | /// Single precision floating point representation.
29 | ///
30 | FloatingSingle,
31 |
32 | ///
33 | /// Fixed representation using fixed number of decimal places.
34 | ///
35 | Fixed,
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Core/RelativeLocation.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS
16 | {
17 | ///
18 | /// Defines relative spatial locations with respect to another spatial object.
19 | ///
20 | public enum RelativeLocation
21 | {
22 | ///
23 | /// Indicates that the object is inside.
24 | ///
25 | Interior,
26 |
27 | ///
28 | /// Indicates that the object is on the border.
29 | ///
30 | Boundary,
31 |
32 | ///
33 | /// Indicates that the object is outside.
34 | ///
35 | Exterior,
36 |
37 | ///
38 | /// Indicates that the location cannot be determined.
39 | ///
40 | Undefined,
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/Core/Utilities/ByteOrder.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Utilities
16 | {
17 | ///
18 | /// Defines byte-orders.
19 | ///
20 | public enum ByteOrder
21 | {
22 | ///
23 | /// Indicates little-endian byte-order.
24 | ///
25 | LittleEndian,
26 |
27 | ///
28 | /// Indicates big-endian byte-order.
29 | ///
30 | BigEndian,
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Numerics/LinearAlgebra/MatrixDefiniteness.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Numerics.LinearAlgebra
16 | {
17 | ///
18 | /// Defines the possible definiteness states of matrices.
19 | ///
20 | public enum MatrixDefiniteness
21 | {
22 | ///
23 | /// Positive definite.
24 | ///
25 | PositiveDefinite,
26 |
27 | ///
28 | /// Positive semidefinite.
29 | ///
30 | PositiveSemidefinite,
31 |
32 | ///
33 | /// Negative definite.
34 | ///
35 | NegativeDefinite,
36 |
37 | ///
38 | /// Negative semidefinite.
39 | ///
40 | NegativeSemiDefinite,
41 |
42 | ///
43 | /// Indefinite.
44 | ///
45 | Indefinite,
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/Numerics/LinearAlgebra/VectorFactory.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Numerics.LinearAlgebra
16 | {
17 | using System;
18 | using AEGIS.Numerics.Resources;
19 |
20 | ///
21 | /// Represents a factory type for the production of instances.
22 | ///
23 | public static class VectorFactory
24 | {
25 | ///
26 | /// Creates a vector.
27 | ///
28 | /// The size of the vector.
29 | /// The default value.
30 | /// The produced vector.
31 | /// The size of the vector is less than 0.
32 | public static Vector Create(Int32 size, Double defaultValue)
33 | {
34 | Vector vector = new Vector(size);
35 |
36 | for (Int32 index = 0; index < vector.Size; index++)
37 | vector[index] = defaultValue;
38 |
39 | return vector;
40 | }
41 |
42 | ///
43 | /// Creates a unit vector.
44 | ///
45 | /// The size of the vector.
46 | /// The index of the unit value.
47 | /// The produced unit vector.
48 | ///
49 | /// The size is less than 1.
50 | /// or
51 | /// The unit index is less than 0.
52 | /// or
53 | /// The unit index is greater than or equal to the size.
54 | ///
55 | public static Vector CreateUnitVector(Int32 size, Int32 unitIndex)
56 | {
57 | if (size < 1)
58 | throw new ArgumentOutOfRangeException(nameof(size), NumericsMessages.SizeIsLessThan0);
59 | if (unitIndex < 0)
60 | throw new ArgumentOutOfRangeException(nameof(unitIndex), NumericsMessages.UnitIndexIsLessThan0);
61 | if (unitIndex >= size)
62 | throw new ArgumentOutOfRangeException(nameof(unitIndex), NumericsMessages.UnitIndexIsGeaterThanSize);
63 |
64 | Vector unitVector = new Vector(size);
65 | unitVector[unitIndex] = 1;
66 |
67 | return unitVector;
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/Numerics/Numerics.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 | AEGIS.Numerics
6 | AEGIS.Numerics
7 | Roberto Giachetta et al.
8 | Eötvös Loránd University (ELTE)
9 | Numerics library of the AEGIS framework.
10 | Copyright Roberto Giachetta 2016-2017
11 | http://opensource.org/licenses/ECL-2.0
12 | https://github.com/AegisSpatial/aegis
13 | 0.1.0
14 | True
15 |
16 | ..\analyzer.ruleset
17 |
18 |
19 |
20 | full
21 | True
22 | ..\..\docs\AEGIS.Numerics.xml
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | all
32 | runtime; build; native; contentfiles; analyzers; buildtransitive
33 |
34 |
35 |
36 |
37 |
38 | True
39 | True
40 | NumericsMessages.resx
41 |
42 |
43 |
44 |
45 |
46 | PublicResXFileCodeGenerator
47 | NumericsMessages.Designer.cs
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/src/Storage.Hadoop/Authentication/HadoopAnonymousAuthentication.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage.Authentication
16 | {
17 | using System;
18 | using AEGIS.Storage;
19 |
20 | ///
21 | /// Represents an anonymous Hadoop file system authentication.
22 | ///
23 | public class HadoopAnonymousAuthentication : IHadoopAuthentication
24 | {
25 | ///
26 | /// Gets the type of the authentication.
27 | ///
28 | /// The type of the authentication.
29 | public StorageAuthenticationType AutenticationType { get { return StorageAuthenticationType.Anonymous; } }
30 |
31 | ///
32 | /// Gets the request of the authentication.
33 | ///
34 | /// The request form of the authentication.
35 | public String Request { get { return String.Empty; } }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Storage.Hadoop/Authentication/HadoopUsernameAuthentication.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage.Authentication
16 | {
17 | using System;
18 | using AEGIS.Storage.Resources;
19 |
20 | ///
21 | /// Represents a Hadoop file system authentication based on user name.
22 | ///
23 | public class HadoopUsernameAuthentication : IHadoopAuthentication
24 | {
25 | ///
26 | /// Initializes a new instance of the class.
27 | ///
28 | /// The username.
29 | /// The username is null.
30 | /// The username is empty.
31 | public HadoopUsernameAuthentication(String username)
32 | {
33 | if (username == null)
34 | throw new ArgumentNullException(nameof(username));
35 | if (String.IsNullOrEmpty(username))
36 | throw new ArgumentException(StorageMessages.UsernameIsEmpty, nameof(username));
37 |
38 | this.Username = username;
39 | }
40 |
41 | ///
42 | /// Gets the type of the authentication.
43 | ///
44 | /// The type of the authentication.
45 | public StorageAuthenticationType AutenticationType { get { return StorageAuthenticationType.UserCredentials; } }
46 |
47 | ///
48 | /// Gets the request of the authentication.
49 | ///
50 | /// The request form of the authentication.
51 | public String Request { get { return "user.name=" + this.Username; } }
52 |
53 | ///
54 | /// Gets the username.
55 | ///
56 | /// The Hadoop username used for executing operations.
57 | public String Username { get; private set; }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/Storage.Hadoop/Authentication/IHadoopAuthentication.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage.Authentication
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines properties of Hadoop file system authentication.
21 | ///
22 | public interface IHadoopAuthentication : IStorageAuthentication
23 | {
24 | ///
25 | /// Gets the request of the authentication.
26 | ///
27 | /// The request form of the authentication.
28 | String Request { get; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Storage.Hadoop/FileSystems/HadoopRemoteException.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage.FileSystems
16 | {
17 | using System;
18 | using System.Runtime.Serialization;
19 |
20 | ///
21 | /// Represents the exception that is thrown remotely by the Hadoop distributed file system.
22 | ///
23 | public class HadoopRemoteException : Exception
24 | {
25 | ///
26 | /// Initializes a new instance of the class.
27 | ///
28 | public HadoopRemoteException()
29 | : base() { }
30 |
31 | ///
32 | /// Initializes a new instance of the class.
33 | ///
34 | /// The message that describes the error.
35 | public HadoopRemoteException(String message)
36 | : base(message) { }
37 |
38 | ///
39 | /// Initializes a new instance of the class.
40 | ///
41 | /// The error message that explains the reason for the exception.
42 | /// The name of the remote exception.
43 | /// The name of the JAVA exception class.
44 | public HadoopRemoteException(String message, String exceptionName, String javaClassName)
45 | : base(message)
46 | {
47 | this.ExceptionName = exceptionName;
48 | this.JavaClassName = javaClassName;
49 | }
50 |
51 | ///
52 | /// Gets the name of the remote exception.
53 | ///
54 | /// The name of the remote exception.
55 | public String ExceptionName { get; private set; }
56 |
57 | ///
58 | /// Gets the name of the JAVA exception class.
59 | ///
60 | /// The full name of the JAVA exception class.
61 | public String JavaClassName { get; private set; }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/src/Storage.Hadoop/FileSystems/Operations/HadoopBooleanOperationResult.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage.FileSystems.Operations
16 | {
17 | using System;
18 |
19 | ///
20 | /// Represents a Hadoop file system operation result containing a boolean.
21 | ///
22 | public class HadoopBooleanOperationResult : HadoopFileSystemOperationResult
23 | {
24 | ///
25 | /// Gets or sets a value indicating whether the operation was successful.
26 | ///
27 | /// true if the operation was successful; otherwise false.
28 | public Boolean Success { get; set; }
29 |
30 | ///
31 | /// Initializes a new instance of the class.
32 | ///
33 | public HadoopBooleanOperationResult() { }
34 |
35 | ///
36 | /// Initializes a new instance of the class.
37 | ///
38 | /// The request of the operation.
39 | /// A value indicating the success of the operation.
40 | public HadoopBooleanOperationResult(String request, Boolean success)
41 | : base(request)
42 | {
43 | this.Success = success;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/Storage.Hadoop/FileSystems/Operations/HadoopFileListingOperationResult.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage.FileSystems.Operations
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Represents a Hadoop file system operation result containing a file status list.
22 | ///
23 | public class HadoopFileListingOperationResult : HadoopFileSystemOperationResult
24 | {
25 | ///
26 | /// Initializes a new instance of the class.
27 | ///
28 | public HadoopFileListingOperationResult()
29 | {
30 | this.StatusList = new HadoopFileStatusOperationResult[0];
31 | }
32 |
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | /// The request.
37 | /// The list of file status results.
38 | public HadoopFileListingOperationResult(String request, IList statusList)
39 | : base(request)
40 | {
41 | if (statusList == null)
42 | this.StatusList = new HadoopFileStatusOperationResult[0];
43 | else
44 | this.StatusList = statusList;
45 | }
46 |
47 | ///
48 | /// Gets or sets the status list.
49 | ///
50 | /// The status list.
51 | public IList StatusList { get; set; }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/Storage.Hadoop/FileSystems/Operations/HadoopFileStreamingOperationResult.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage.FileSystems.Operations
16 | {
17 | using System;
18 | using System.IO;
19 |
20 | ///
21 | /// Represents a Hadoop file system operation result containing a file stream.
22 | ///
23 | public class HadoopFileStreamingOperationResult : HadoopFileSystemOperationResult
24 | {
25 | ///
26 | /// Initializes a new instance of the class.
27 | ///
28 | public HadoopFileStreamingOperationResult() { }
29 |
30 | ///
31 | /// Initializes a new instance of the class.
32 | ///
33 | /// The request of the operation.
34 | /// The resulting file stream.
35 | public HadoopFileStreamingOperationResult(String request, Stream fileStream)
36 | : base(request)
37 | {
38 | this.FileStream = fileStream;
39 | }
40 |
41 | ///
42 | /// Gets or sets the resulting file stream.
43 | ///
44 | /// The resulting file stream.
45 | public Stream FileStream { get; set; }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/Storage.Hadoop/FileSystems/Operations/HadoopFileSystemOperationResult.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage.FileSystems.Operations
16 | {
17 | using System;
18 |
19 | ///
20 | /// Represents a Hadoop file system operation result.
21 | ///
22 | public abstract class HadoopFileSystemOperationResult
23 | {
24 | ///
25 | /// Initializes a new instance of the class.
26 | ///
27 | protected HadoopFileSystemOperationResult() { }
28 |
29 | ///
30 | /// Initializes a new instance of the class.
31 | ///
32 | /// The request of the operation.
33 | protected HadoopFileSystemOperationResult(String request)
34 | {
35 | this.Request = request;
36 | }
37 |
38 | ///
39 | /// Gets or sets the request of the operation.
40 | ///
41 | /// The request of the operation.
42 | public String Request { get; set; }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/Storage.Hadoop/Storage.Hadoop.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 | AEGIS.Storage.Hadoop
6 | AEGIS.Storage.Hadoop
7 | ..\analyzer.ruleset
8 | 0.1.0
9 | Roberto Giachetta et al.
10 | Eötvös Loránd University (ELTE)
11 | Storage support for Hadoop Distributed File System.
12 | Copyright Roberto Giachetta 2016-2017
13 | http://opensource.org/licenses/ECL-2.0
14 | https://github.com/AegisSpatial/aegis
15 |
16 |
17 |
18 |
19 | full
20 | True
21 | ..\..\docs\AEGIS.Storage.Hadoop.xml
22 |
23 |
24 |
25 |
26 |
27 | all
28 | runtime; build; native; contentfiles; analyzers; buildtransitive
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/src/Storage/Authentication/AnonymousStorageAuthentication.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage.Authentication
16 | {
17 | ///
18 | /// Represents an anonymous storage authentication.
19 | ///
20 | public class AnonymousStorageAuthentication : IStorageAuthentication
21 | {
22 | ///
23 | /// Gets the type of the authentication.
24 | ///
25 | /// The type of the authentication.
26 | public StorageAuthenticationType AutenticationType { get { return StorageAuthenticationType.Anonymous; } }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Storage/DataHandling.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines options for handling of geographic data.
21 | ///
22 | [Flags]
23 | public enum DataHandling
24 | {
25 | ///
26 | /// Indicates that the data is handled in their default manner.
27 | ///
28 | Default = 0,
29 |
30 | ///
31 | /// Indicates that the data is loaded and saved only on request.
32 | ///
33 | Asyncronous = 1,
34 |
35 | ///
36 | /// Indicates that the data is loaded and saved with every modification.
37 | ///
38 | Synchronous = 2,
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Storage/DriverOperation.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage
16 | {
17 | ///
18 | /// Defines possible driver operations.
19 | ///
20 | public enum DriverOperation
21 | {
22 | ///
23 | /// Indicates the creation of a new item.
24 | ///
25 | Create,
26 |
27 | ///
28 | /// Indicates reading of an item.
29 | ///
30 | Read,
31 |
32 | ///
33 | /// Indicates update of an item with the same storage space.
34 | ///
35 | Update,
36 |
37 | ///
38 | /// Indicates update of an item with the extension of storage space.
39 | ///
40 | UpdateExtend,
41 |
42 | ///
43 | /// Indicates update of an item with the reduction of storage space.
44 | ///
45 | UpdateReduce,
46 |
47 | ///
48 | /// Indicates removal of an item.
49 | ///
50 | Delete,
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/Storage/FileSystemEntryType.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage
16 | {
17 | ///
18 | /// Defines file system entry types.
19 | ///
20 | public enum FileSystemEntryType
21 | {
22 | ///
23 | /// Indicates that the entry is a file.
24 | ///
25 | File,
26 |
27 | ///
28 | /// Indicates that the entry is a directory.
29 | ///
30 | Directory,
31 |
32 | ///
33 | /// Indicates that the entry is a link.
34 | ///
35 | Link,
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Storage/FileSystems/FileSystemOperationResult.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage.Organization.FileSystems
16 | {
17 | ///
18 | /// Represent the result of a file system operation.
19 | ///
20 | public class FileSystemOperationResult
21 | {
22 | ///
23 | /// Initializes a new instance of the class.
24 | ///
25 | public FileSystemOperationResult()
26 | {
27 | }
28 |
29 | ///
30 | /// Initializes a new instance of the class.
31 | ///
32 | /// The result code.
33 | public FileSystemOperationResult(FileSystemOperationResultCode code)
34 | {
35 | this.Code = code;
36 | }
37 |
38 | ///
39 | /// Gets or sets the result code of the operation.
40 | ///
41 | /// The result code of the operation.
42 | public FileSystemOperationResultCode Code { get; set; }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/Storage/FileSystems/FileSystemOperationResultCode.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage.Organization.FileSystems
16 | {
17 | ///
18 | /// Defines the result codes for file system operations.
19 | ///
20 | public enum FileSystemOperationResultCode
21 | {
22 | ///
23 | /// Indicates that the operation successfully completed.
24 | ///
25 | Completed,
26 |
27 | ///
28 | /// Indicates that access is denied for the specified authentication.
29 | ///
30 | AccessDenied,
31 |
32 | ///
33 | /// Indicates that the operation is invalid.
34 | ///
35 | InvalidOperation,
36 |
37 | ///
38 | /// Indicates that the path is invalid.
39 | ///
40 | InvalidPath,
41 |
42 | ///
43 | /// Indicates that the path is unavailable.
44 | ///
45 | UnavailablePath,
46 |
47 | ///
48 | /// Indicates that the operation is unsupported.
49 | ///
50 | UnsupportedOperation,
51 |
52 | ///
53 | /// Indicates that the connection is not available.
54 | ///
55 | ConnectionNotAvailable,
56 |
57 | ///
58 | /// Indicates that the result is unknown.
59 | ///
60 | Unknown,
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/Storage/IStorageAuthentication.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines properties of storage authentication.
21 | ///
22 | public interface IStorageAuthentication
23 | {
24 | ///
25 | /// Gets the type of the authentication.
26 | ///
27 | /// The type of the authentication.
28 | StorageAuthenticationType AutenticationType { get; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Storage/IStoredAttributeCollection.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines properties of a collection of attributed located in a store.
21 | ///
22 | public interface IStoredAttributeCollection : IAttributeCollection
23 | {
24 | ///
25 | /// Gets the feature identifier.
26 | ///
27 | /// The feature identifier.
28 | String Identifier { get; }
29 |
30 | ///
31 | /// Gets the driver of the attribute collection.
32 | ///
33 | /// The driver the attribute collection.
34 | IAttributeDriver Driver { get; }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/Storage/IStoredAttributeCollectionFactory.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Defines behavior for factories producing instances located in stores.
22 | ///
23 | public interface IStoredAttributeCollectionFactory : IAttributeCollectionFactory
24 | {
25 | ///
26 | /// Gets the attribute driver of the factory.
27 | ///
28 | /// The attribute driver of the factory.
29 | IAttributeDriver Driver { get; }
30 |
31 | ///
32 | /// Creates an attribute collection.
33 | ///
34 | /// The feature identifier.
35 | /// The produced attribute collection.
36 | /// The identifier is null.
37 | IAttributeCollection CreateCollection(String identifier);
38 |
39 | ///
40 | /// Creates an attribute collection.
41 | ///
42 | /// The feature identifier.
43 | /// The source collection.
44 | /// The produced attribute collection.
45 | ///
46 | /// The identifier is null.
47 | /// or
48 | /// The source is null.
49 | ///
50 | IAttributeCollection CreateCollection(String identifier, IAttributeCollection source);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/Storage/IStoredFeature.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage
16 | {
17 | ///
18 | /// Defines properties of geographic features located in a store.
19 | ///
20 | public interface IStoredFeature : IFeature
21 | {
22 | ///
23 | /// Gets the driver of the feature.
24 | ///
25 | /// The driver the feature.
26 | IFeatureDriver Driver { get; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Storage/IStoredFeatureCollection.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage
16 | {
17 | ///
18 | /// Defines properties of geographic feature collections located in a store.
19 | ///
20 | public interface IStoredFeatureCollection : IFeatureCollection, IStoredFeature
21 | {
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Storage/IStoredFeatureFactory.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage
16 | {
17 | using System;
18 |
19 | ///
20 | /// Defines behavior for factories producing instances located in stores.
21 | ///
22 | public interface IStoredFeatureFactory : IFeatureFactory
23 | {
24 | ///
25 | /// Gets the feature driver of the factory.
26 | ///
27 | /// The feature driver of the factory.
28 | IFeatureDriver Driver { get; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Storage/IStoredGeometry.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 |
20 | ///
21 | /// Defines behavior for geometries located in stores.
22 | ///
23 | public interface IStoredGeometry : IGeometry
24 | {
25 | ///
26 | /// Gets the feature identifier.
27 | ///
28 | /// The unique feature identifier within the store.
29 | String Identifier { get; }
30 |
31 | ///
32 | /// Gets the collection of indexes within the feature.
33 | ///
34 | /// The collection of indexes which determine the location of the geometry within the feature.
35 | IEnumerable Indexes { get; }
36 |
37 | ///
38 | /// Gets the driver of the geometry.
39 | ///
40 | /// The driver of the geometry.
41 | IGeometryDriver Driver { get; }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Storage/Storage.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.1
5 | AEGIS.Storage
6 | Roberto Giachetta et al.
7 | 0.1.0
8 | Eötvös Loránd University (ELTE)
9 | AEGIS.Storage
10 | AEGIS.Storage
11 | AEGIS.Storage
12 | Storage library of the AEGIS framework.
13 | Copyright Roberto Giachetta 2016-2017
14 | http://opensource.org/licenses/ECL-2.0
15 | https://github.com/AegisSpatial/aegis
16 |
17 | ..\analyzer.ruleset
18 |
19 |
20 |
21 |
22 | full
23 | True
24 | ..\..\docs\AEGIS.Storage.xml
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | all
34 | runtime; build; native; contentfiles; analyzers; buildtransitive
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | True
46 | True
47 | StorageMessages.resx
48 |
49 |
50 |
51 |
52 |
53 | PublicResXFileCodeGenerator
54 | StorageMessages.Designer.cs
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/src/Storage/StorageAuthenticationType.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Storage
16 | {
17 | ///
18 | /// Defines possible types for storage authentication.
19 | ///
20 | public enum StorageAuthenticationType
21 | {
22 | ///
23 | /// Indicates that the authentication is anonymous.
24 | ///
25 | Anonymous,
26 |
27 | ///
28 | /// Indicates that the authentication is performed using user credentials.
29 | ///
30 | UserCredentials,
31 |
32 | ///
33 | /// Indicates that the authentication is performed using system credentials.
34 | ///
35 | SystemCredentials,
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Tests.Collections/Tests.Collections.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 | AEGIS.Tests.Collections
6 | AEGIS.Tests.Collections
7 | Roberto Giachetta et al.
8 | Eötvös Loránd University (ELTE)
9 | Numerics library of the AEGIS framework.
10 | Copyright Roberto Giachetta 2016-2017
11 | http://opensource.org/licenses/ECL-2.0
12 | https://github.com/AegisSpatial/aegis
13 | 0.1.0
14 | True
15 |
16 | ..\analyzer.ruleset
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | all
26 | runtime; build; native; contentfiles; analyzers; buildtransitive
27 |
28 |
29 |
30 |
31 |
32 |
33 | all
34 | runtime; build; native; contentfiles; analyzers; buildtransitive
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/src/Tests.Core.Reference/Collections/Formula/Projections/LambertCylindricalEqualAreaEllipsoidalProjectionTest.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/aegis/650a3e70f0fec4bdd04ee52f64f83a811c92b2e5/src/Tests.Core.Reference/Collections/Formula/Projections/LambertCylindricalEqualAreaEllipsoidalProjectionTest.cs
--------------------------------------------------------------------------------
/src/Tests.Core.Reference/Collections/Formula/Projections/VerticalPerspectiveOrthographicProjectionTest.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Tests.Reference.Collections.Formula
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 | using AEGIS.Reference;
20 | using AEGIS.Reference.Collections.Formula;
21 | using NUnit.Framework;
22 |
23 | ///
24 | /// Test fixture for the class.
25 | ///
26 | /// András Fábiám
27 | [TestFixture]
28 | public class VerticalPerspectiveOrthographicProjectionTest
29 | {
30 | ///
31 | /// The projection.
32 | ///
33 | private VerticalPerspectiveOrthographicProjection projection;
34 |
35 | ///
36 | /// Test setup.
37 | ///
38 | [SetUp]
39 | public void SetUp()
40 | {
41 | Dictionary parameters = new Dictionary();
42 | parameters.Add(CoordinateOperationParameters.LatitudeOfTopocentricOrigin, Angle.FromDegree(55));
43 | parameters.Add(CoordinateOperationParameters.LongitudeOfTopocentricOrigin, Angle.FromDegree(5));
44 | parameters.Add(CoordinateOperationParameters.EllipsoidalHeightOfTopocentricOrigin, Length.FromMetre(200));
45 |
46 | Ellipsoid ellipsoid = Ellipsoid.FromSemiMinorAxis("EPSG::7030", "WGS 1984", 6378137, 6356752.314);
47 | AreaOfUse areaOfUse = TestUtilities.ReferenceProvider.AreasOfUse["EPSG::1262"];
48 |
49 | this.projection = new VerticalPerspectiveOrthographicProjection(String.Empty, String.Empty, parameters, ellipsoid, areaOfUse);
50 | }
51 |
52 | ///
53 | /// Tests the reverse computation.
54 | ///
55 | [Test]
56 | public void VerticalPerspectiveOrthographicProjectionForwardTest()
57 | {
58 | GeoCoordinate coordinate = new GeoCoordinate(Angle.FromDegree(53, 48, 33.82), Angle.FromDegree(2, 7, 46.38), Length.FromMetre(73));
59 | Coordinate expected = new Coordinate(-189013.869, -128642.04);
60 | Coordinate transformed = this.projection.Forward(coordinate);
61 |
62 | Assert.AreEqual(expected.X, transformed.X, 0.01);
63 | Assert.AreEqual(expected.Y, transformed.Y, 0.01);
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/src/Tests.Core.Reference/TestUtilities.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Tests.Reference
16 | {
17 | using System;
18 | using AEGIS.Reference.Collections;
19 | using AEGIS.Reference.Collections.Local;
20 |
21 | ///
22 | /// Utility type for performing tests.
23 | ///
24 | internal static class TestUtilities
25 | {
26 | ///
27 | /// The reference provider. This field is read-only.
28 | ///
29 | public static readonly LocalReferenceProvider ReferenceProvider = new LocalReferenceProvider();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Tests.Core.Reference/Tests.Core.Reference.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 | AEGIS.Tests.Core.Reference
6 | AEGIS.Tests.Core.Reference
7 | Roberto Giachetta et al.
8 | Eötvös Loránd University (ELTE)
9 | Numerics library of the AEGIS framework.
10 | Copyright Roberto Giachetta 2016-2017
11 | http://opensource.org/licenses/ECL-2.0
12 | https://github.com/AegisSpatial/aegis
13 | 0.1.0
14 | True
15 |
16 | ..\analyzer.ruleset
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | all
26 | runtime; build; native; contentfiles; analyzers; buildtransitive
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | all
35 | runtime; build; native; contentfiles; analyzers; buildtransitive
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/Tests.Core/Algorithms/GrahamScanAlgorithmTest.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Tests.Algorithms
16 | {
17 | using System;
18 | using System.Collections.Generic;
19 | using AEGIS.Algorithms;
20 | using NUnit.Framework;
21 | using Shouldly;
22 |
23 | ///
24 | /// Test fixture for the class.
25 | ///
26 | [TestFixture]
27 | public class GrahamScanAlgorithmTest
28 | {
29 | ///
30 | /// Tests the method.
31 | ///
32 | [Test]
33 | public void GrahamScanAlgorithmComputeConvexHullTest()
34 | {
35 | // convex polygon
36 | Coordinate[] shell = new[]
37 | {
38 | new Coordinate(0, 0), new Coordinate(10, 0),
39 | new Coordinate(10, 10), new Coordinate(0, 10),
40 | new Coordinate(0, 0),
41 | };
42 |
43 | IReadOnlyList convexHull = GrahamScanAlgorithm.ComputeConvexHull(shell);
44 | convexHull.ShouldBe(shell);
45 |
46 | // concave polygon
47 | shell = new[]
48 | {
49 | new Coordinate(0, 0), new Coordinate(2, 1), new Coordinate(8, 1),
50 | new Coordinate(10, 0), new Coordinate(9, 2), new Coordinate(9, 8),
51 | new Coordinate(10, 10), new Coordinate(8, 9), new Coordinate(2, 9),
52 | new Coordinate(0, 10), new Coordinate(1, 8), new Coordinate(1, 2),
53 | new Coordinate(0, 0),
54 | };
55 |
56 | Coordinate[] expected = new[]
57 | {
58 | new Coordinate(0, 0), new Coordinate(10, 0),
59 | new Coordinate(10, 10), new Coordinate(0, 10),
60 | new Coordinate(0, 0),
61 | };
62 |
63 | convexHull = GrahamScanAlgorithm.ComputeConvexHull(shell);
64 | convexHull.ShouldBe(expected);
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/Tests.Core/Features/FeatureTest.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Tests.Features
16 | {
17 | using System;
18 | using AEGIS.Features;
19 | using Moq;
20 | using NUnit.Framework;
21 | using Shouldly;
22 |
23 | ///
24 | /// Test fixture for the class.
25 | ///
26 | [TestFixture]
27 | public class FeatureTest
28 | {
29 | ///
30 | /// The feature identifier.
31 | ///
32 | private String identifier;
33 |
34 | ///
35 | /// The mocked attribute collection.
36 | ///
37 | private IAttributeCollection mockAttributes;
38 |
39 | ///
40 | /// The mocked geometry.
41 | ///
42 | private IGeometry mockGeometry;
43 |
44 | ///
45 | /// Tests the constructor of the class.
46 | ///
47 | [Test]
48 | public void FeatureConstructorTest()
49 | {
50 | this.identifier = Guid.NewGuid().ToString();
51 | this.mockAttributes = new Mock().Object;
52 | this.mockGeometry = new Mock().Object;
53 |
54 | // without geometry and attributes
55 | Feature feature = new Feature(this.identifier, null, null);
56 | feature.Identifier.ShouldBe(this.identifier);
57 | feature.Geometry.ShouldBeNull();
58 | feature.Attributes.ShouldBeEmpty();
59 |
60 | // with attributes
61 | feature = new Feature(this.identifier, null, this.mockAttributes);
62 | feature.Identifier.ShouldBe(this.identifier);
63 | feature.Geometry.ShouldBeNull();
64 | feature.Attributes.ShouldBe(this.mockAttributes);
65 |
66 | // with geometry
67 | feature = new Feature(this.identifier, this.mockGeometry, null);
68 | feature.Identifier.ShouldBe(this.identifier);
69 | feature.Geometry.ShouldBe(this.mockGeometry);
70 | feature.Attributes.ShouldBeEmpty();
71 |
72 | // with geometry and attributes
73 | feature = new Feature(this.identifier, this.mockGeometry, this.mockAttributes);
74 | feature.Identifier.ShouldBe(this.identifier);
75 | feature.Geometry.ShouldBe(this.mockGeometry);
76 | feature.Attributes.ShouldBe(this.mockAttributes);
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/src/Tests.Core/Tests.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 | AEGIS.Tests.Core
6 | AEGIS.Tests.Core
7 | Roberto Giachetta et al.
8 | Eötvös Loránd University (ELTE)
9 | Numerics library of the AEGIS framework.
10 | Copyright Roberto Giachetta 2016-2017
11 | http://opensource.org/licenses/ECL-2.0
12 | https://github.com/AegisSpatial/aegis
13 | 0.1.0
14 | True
15 |
16 | ..\analyzer.ruleset
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | all
26 | runtime; build; native; contentfiles; analyzers; buildtransitive
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | all
35 | runtime; build; native; contentfiles; analyzers; buildtransitive
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/Tests.Numerics/Integral/SimpsonsMethodTest.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Tests.Numerics.Integral
16 | {
17 | using System;
18 | using AEGIS.Numerics.Integral;
19 | using NUnit.Framework;
20 | using Shouldly;
21 |
22 | ///
23 | /// Test fixture for the class.
24 | ///
25 | [TestFixture]
26 | public class SimpsonsMethodTest
27 | {
28 | ///
29 | /// Tests the method.
30 | ///
31 | [Test]
32 | public void SimpsonMethodComputeIntegralTest()
33 | {
34 | SimpsonsMethod.ComputeIntegral(x => x, 0, 0, 2).ShouldBe(0, 0.0001);
35 | SimpsonsMethod.ComputeIntegral(x => x, 0, 5000, 5000000).ShouldBe(12500000, 0.0001);
36 | SimpsonsMethod.ComputeIntegral(x => x, 0, 6000, 6000000).ShouldBe(18000000, 0.0001);
37 | SimpsonsMethod.ComputeIntegral(x => Math.Pow(x, 3), 0, 1, 100).ShouldBe(0.25, 0.0001);
38 | SimpsonsMethod.ComputeIntegral(x => 1 / x, 1, 100, 1000).ShouldBe(4.605170, 0.0001);
39 |
40 | Should.Throw(() => SimpsonsMethod.ComputeIntegral(null, 0, 10, 10));
41 | Should.Throw(() => SimpsonsMethod.ComputeIntegral(x => x, 0, 10, 0));
42 | Should.Throw(() => SimpsonsMethod.ComputeIntegral(x => x, 0, 10, 1));
43 | Should.Throw(() => SimpsonsMethod.ComputeIntegral(x => x, 0, 10, -10));
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/Tests.Numerics/Tests.Numerics.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 | AEGIS.Tests.Numerics
6 | AEGIS.Tests.Numerics
7 | Roberto Giachetta et al.
8 | Eötvös Loránd University (ELTE)
9 | Numerics library of the AEGIS framework.
10 | Copyright Roberto Giachetta 2016-2017
11 | http://opensource.org/licenses/ECL-2.0
12 | https://github.com/AegisSpatial/aegis
13 | 0.1.0
14 | True
15 |
16 | ..\analyzer.ruleset
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | all
26 | runtime; build; native; contentfiles; analyzers; buildtransitive
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | all
35 | runtime; build; native; contentfiles; analyzers; buildtransitive
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/Tests.Storage.Hadoop/Authentication/HadoopAnonymousAuthenticationTest.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Tests.Storage.Authentication
16 | {
17 | using System;
18 | using AEGIS.Storage;
19 | using AEGIS.Storage.Authentication;
20 | using NUnit.Framework;
21 | using Shouldly;
22 |
23 | ///
24 | /// Test fixture for the class.
25 | ///
26 | [TestFixture]
27 | public class HadoopAnonymousAuthenticationTest
28 | {
29 | ///
30 | /// Tests the constructor of the class.
31 | ///
32 | [Test]
33 | public void HadoopAnonymousAuthenticationConstructorTest()
34 | {
35 | HadoopAnonymousAuthentication authentication = new HadoopAnonymousAuthentication();
36 |
37 | authentication.Request.ShouldBe(String.Empty);
38 | authentication.AutenticationType.ShouldBe(StorageAuthenticationType.Anonymous);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/Tests.Storage.Hadoop/Authentication/HadoopUsernameAuthenticationTest.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Tests.Storage.Authentication
16 | {
17 | using System;
18 | using AEGIS.Storage;
19 | using AEGIS.Storage.Authentication;
20 | using NUnit.Framework;
21 | using Shouldly;
22 |
23 | ///
24 | /// Test fixture for the class.
25 | ///
26 | [TestFixture]
27 | public class HadoopUsernameAuthenticationTest
28 | {
29 | ///
30 | /// Tests the constructor of the class.
31 | ///
32 | [Test]
33 | public void HadoopUserNameAuthenticationConstructorTest()
34 | {
35 | // accepted user name
36 |
37 | HadoopUsernameAuthentication authentication = new HadoopUsernameAuthentication("user");
38 |
39 | authentication.Username.ShouldBe("user");
40 | authentication.Request.ShouldBe("user.name=user");
41 | authentication.AutenticationType.ShouldBe(StorageAuthenticationType.UserCredentials);
42 |
43 | // exceptions
44 |
45 | Should.Throw(() => new HadoopUsernameAuthentication(null));
46 | Should.Throw(() => new HadoopUsernameAuthentication(String.Empty));
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/Tests.Storage.Hadoop/FileSystems/HadoopRemoteExceptionTest.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Tests.Storage.FileSystems
16 | {
17 | using AEGIS.Storage.FileSystems;
18 | using NUnit.Framework;
19 | using Shouldly;
20 |
21 | ///
22 | /// Test fixture for the class.
23 | ///
24 | [TestFixture]
25 | public class HadoopRemoteExceptionTest
26 | {
27 | ///
28 | /// Tests the constructor of the class.
29 | ///
30 | [Test]
31 | public void HadoopRemoteExceptionConstructorTest()
32 | {
33 | // no parameters
34 |
35 | HadoopRemoteException exception = new HadoopRemoteException();
36 | exception.ExceptionName.ShouldBeNull();
37 | exception.JavaClassName.ShouldBeNull();
38 |
39 | // message parameter
40 |
41 | exception = new HadoopRemoteException("Exception message.");
42 |
43 | exception.Message.ShouldBe("Exception message.");
44 | exception.ExceptionName.ShouldBeNull();
45 | exception.JavaClassName.ShouldBeNull();
46 |
47 | // message, name and class parameters
48 |
49 | exception = new HadoopRemoteException("Exception message.", "Exception name.", "Class name.");
50 |
51 | exception.Message.ShouldBe("Exception message.");
52 | exception.ExceptionName.ShouldBe("Exception name.");
53 | exception.JavaClassName.ShouldBe("Class name.");
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/Tests.Storage.Hadoop/FileSystems/Operations/HadoopBooleanOperationResultTest.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Tests.Storage.FileSystems.Operation
16 | {
17 | using AEGIS.Storage.FileSystems.Operations;
18 | using NUnit.Framework;
19 | using Shouldly;
20 |
21 | ///
22 | /// Test fixture for the class.
23 | ///
24 | [TestFixture]
25 | public class HadoopBooleanOperationResultTest
26 | {
27 | ///
28 | /// Tests the constructor of the class.
29 | ///
30 | [Test]
31 | public void HadoopBooleanOperationResultConstructorTest()
32 | {
33 | // no parameters
34 |
35 | HadoopBooleanOperationResult result = new HadoopBooleanOperationResult();
36 |
37 | result.Request.ShouldBeNull();
38 | result.Success.ShouldBe(false);
39 |
40 | // request and success parameters
41 |
42 | result = new HadoopBooleanOperationResult("request", true);
43 |
44 | result.Request.ShouldBe("request");
45 | result.Success.ShouldBe(true);
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/Tests.Storage.Hadoop/FileSystems/Operations/HadoopFileListingOperationResultTest.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2016-2019 Roberto Giachetta. Licensed under the
3 | // Educational Community License, Version 2.0 (the "License"); you may
4 | // not use this file except in compliance with the License. You may
5 | // obtain a copy of the License at
6 | // http://opensource.org/licenses/ECL-2.0
7 | //
8 | // Unless required by applicable law or agreed to in writing,
9 | // software distributed under the License is distributed on an "AS IS"
10 | // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | // or implied. See the License for the specific language governing
12 | // permissions and limitations under the License.
13 | //
14 |
15 | namespace AEGIS.Tests.Storage.FileSystems.Operation
16 | {
17 | using AEGIS.Storage.FileSystems.Operations;
18 | using NUnit.Framework;
19 | using Shouldly;
20 |
21 | ///
22 | /// Test fixture for the class.
23 | ///
24 | [TestFixture]
25 | public class HadoopFileListingOperationResultTest
26 | {
27 | ///
28 | /// Tests the constructor of the class.
29 | ///
30 | [Test]
31 | public void HadoopFileListingOperationResultConstructorTest()
32 | {
33 | // no parameters
34 |
35 | HadoopFileListingOperationResult result = new HadoopFileListingOperationResult();
36 |
37 | result.Request.ShouldBeNull();
38 | result.StatusList.ShouldBeEmpty();
39 |
40 | // request and list parameters
41 |
42 | result = new HadoopFileListingOperationResult("request", new HadoopFileStatusOperationResult[1]);
43 |
44 | result.Request.ShouldBe("request");
45 | result.StatusList.Count.ShouldBe(1);
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/Tests.Storage.Hadoop/Tests.Storage.Hadoop.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 | AEGIS.Tests.Storage.Hadoop
6 | AEGIS.Tests.Storage.Hadoop
7 | Roberto Giachetta et al.
8 | Eötvös Loránd University (ELTE)
9 | Numerics library of the AEGIS framework.
10 | Copyright Roberto Giachetta 2016-2017
11 | http://opensource.org/licenses/ECL-2.0
12 | https://github.com/AegisSpatial/aegis
13 | 0.1.0
14 | True
15 |
16 | ..\analyzer.ruleset
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | all
26 | runtime; build; native; contentfiles; analyzers; buildtransitive
27 |
28 |
29 |
30 |
31 |
32 |
33 | all
34 | runtime; build; native; contentfiles; analyzers; buildtransitive
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/stylecop.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
3 | "settings": {
4 | "documentationRules": {
5 | "companyName": "Eötvös Loránd University (ELTE)",
6 | "copyrightText": " Copyright 2016-2019 Roberto Giachetta. Licensed under the\n Educational Community License, Version 2.0 (the \"License\"); you may\n not use this file except in compliance with the License. You may\n obtain a copy of the License at\n http://opensource.org/licenses/ECL-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an \"AS IS\"\n BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n or implied. See the License for the specific language governing\n permissions and limitations under the License."
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------