using System; namespace GeoAPI.Geometries { /// /// /// public enum Locations { /// /// DE-9IM row index of the interior of the first point and column index of /// the interior of the second point. Location value for the interior of a /// point. /// int value = 0; /// Interior = 0, /// /// DE-9IM row index of the boundary of the first point and column index of /// the boundary of the second point. Location value for the boundary of a /// point. /// int value = 1; /// Boundary = 1, /// /// DE-9IM row index of the exterior of the first point and column index of /// the exterior of the second point. Location value for the exterior of a /// point. /// int value = 2; /// Exterior = 2, /// /// Used for uninitialized location values. /// int value = -1; /// Null = -1, } /// /// /// public class Location { /// /// Converts the location value to a location symbol, for example, EXTERIOR => 'e'. /// /// /// Either 'e', 'b', 'i' or '-'. public static char ToLocationSymbol(Locations locationValue) { switch (locationValue) { case Locations.Exterior: return 'e'; case Locations.Boundary: return 'b'; case Locations.Interior: return 'i'; case Locations.Null: return '-'; } throw new ArgumentException("Unknown location value: " + locationValue); } } }