DotSpatial.Topology Constants representing the dimensions of a point, a curve and a surface. Also, constants representing the dimensions of the empty point and non-empty geometries, and a wildcard dimension meaning "any dimension". Dimension value of a point (0). Dimension value of a curve (1). Dimension value of a surface (2). Dimension value of a empty point (-1). Dimension value of non-empty geometries (= {Point, Curve, A}). Dimension value for any dimension (= {False, True}). An abreviated list for quick classification None specified or custom Point Line Polygon MultiPoint A geometric angle mesured in degrees or radians the angle will wrap around, so setting larger values will result in an appropriate angle. The value of 3.14159 or whatever from Math.PI Creates a new instance of an angle with the radians specified The angle in radians Returns a new instance of the Angle class with the same angle as this object. Angle which has the same values False for anything that is not an angle. Tests two angles to see if they have the same value. An object to test. Boolean, true if the angles have the same value. Gets a hash code Int hash code Returns a new angle object with an angle of Value in radians The double value indicating the angle An Angle structure with the specified value Returns a double specifying the radian value of the angle The angle structure to determine the angle of A Double with the angle in radians Returns true if the two angles are equal to each other. An angle to compare A second angle. Boolean, true if they are equal. Returns true if the two angles are equal to each other. An angle to compare A second angle. Boolean, true if they are equal. Returns the sum of the two angles, cycling if greater than 2 pi. An angle to add A second angle to add A new Angle structure equal to the sum of the two angles Returns the difference of two angles. An angle to subtract from The angle to subtract A new angle structure with a sum equal to the two angles Divides angle A by angle B An angle to divide An angle to divide into A A new angle with the quotient of the division Multiplies angle A by Angle B. An angle to multiply A second angle to multiply. A new angle with the product of the two angles. Returns the mathematical Cos of the angle specified The Angle to find the cosign of Double, the cosign of the angle specified Returns the mathematical Sin of the angle specified The Angle to find the Sin of Double, the Sin of the Angle Returns the mathematical Tan of the angle specified The Angle to find the Tan of Double, the Tan of the Angle Returns the mathematical ATan of the value specified The Double to find the ATan of Angle, the ATan of the Value specified Returns the mathematical ACos of the value specified The Double to find the ACos of Angle, the ACos of the Value specified Returns the mathematical ASin of the value specified The Double to find the ASin of Angle, the ASin of the Value specified Gets or sets the angle in degrees, ranging from -360 to 360 Gets or sets the angle in degrees ranging from 0 to 360 Only allows values from -2PI to 2PI. Buffer styles. Specifies a round line buffer end cap endCapStyle (Default). / Specifies a butt (or flat) line buffer end cap endCapStyle. Specifies a square line buffer end cap endCapStyle. The types of Precision Model which NTS supports. Floating precision corresponds to the standard double-precision floating-point representation, which is based on the IEEE-754 standard Floating single precision corresponds to the standard single-precision floating-point representation, which is based on the IEEE-754 standard Fixed Precision indicates that coordinates have a fixed number of decimal places. The number of decimal places is determined by the log10 of the scale factor. A list of DE-9IM row indices clarifying the interior, boundary or exterior. 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; 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; 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; Used for uninitialized location values. int value = -1; Standard ordinate index values. X Ordinate = 0. Y Ordinate = 1. Z Ordinate = 2. M Ordinate = 3. Extends the class to allow reading values in the BigEndian format. While BigEndianBinaryReader extends BinaryReader adding methods for reading integer values and double values in the BigEndian format, this implementation overrides methods, such and and more, for reading ByteOrder.BigEndian values in the BigEndian format. Initializes a new instance of the class. The stream. Initializes a new instance of the BEBinaryReader class. The supplied stream. The character encoding. encoding is null. The stream does not support reading, the stream is null, or the stream is already closed. Reads a 2-byte signed integer from the current stream using big endian encoding and advances the current position of the stream by two bytes. A 2-byte signed integer read from the current stream. The stream is closed. An I/O error occurs. The end of the stream is reached. Reads a 4-byte signed integer from the current stream using big endian encoding and advances the current position of the stream by four bytes. A 4-byte signed integer read from the current stream. The stream is closed. An I/O error occurs. The end of the stream is reached. Reads an 8-byte signed integer from the current stream using big endian encoding and advances the current position of the stream by eight bytes. An 8-byte signed integer read from the current stream. The stream is closed. An I/O error occurs. The end of the stream is reached. Reads a 4-byte floating point value from the current stream using big endian encoding and advances the current position of the stream by four bytes. A 4-byte floating point value read from the current stream. The stream is closed. An I/O error occurs. The end of the stream is reached. Reads an 8-byte floating point value from the current stream using big endian encoding and advances the current position of the stream by eight bytes. An 8-byte floating point value read from the current stream. The stream is closed. An I/O error occurs. The end of the stream is reached. Extends the class to allow writing values in the BigEndian format. While BigEndianBinaryWriter extends adding methods for writing integer values (BigEndianBinaryWriter.WriteIntBE) and double values (BigEndianBinaryWriter.WriteDoubleBE) in the BigEndian format, this implementation overrides methods, such BinaryWriter.Write(Int32) and BinaryWriter.Write(Double)and more, for writing T:ByteOrder.BigEndian values in the BigEndian format. Initializes a new instance of the class. Initializes a new instance of the class. The supplied stream. output is null. The stream does not support writing, or the stream is already closed. Initializes a new instance of the class. The supplied stream. The character encoding. output or encoding is null. The stream does not support writing, or the stream is already closed. Writes a two-byte signed integer to the current stream using BigEndian encoding and advances the stream position by two bytes. The two-byte signed integer to write. The stream is closed. An I/O error occurs. Writes a four-byte signed integer to the current stream using BigEndian encoding and advances the stream position by four bytes. The four-byte signed integer to write. The stream is closed. An I/O error occurs. Writes an eight-byte signed integer to the current stream using BigEndian encoding and advances the stream position by eight bytes. The eight-byte signed integer to write. The stream is closed. An I/O error occurs. Writes a four-byte floating-point value to the current stream using BigEndian encoding and advances the stream position by four bytes. The four-byte floating-point value to write. The stream is closed. An I/O error occurs. Writes an eight-byte floating-point value to the current stream using BigEndian encoding and advances the stream position by eight bytes. The eight-byte floating-point value to write. The stream is closed. An I/O error occurs. Writes a length-prefixed string to this stream in the current encoding of the , and advances the current position of the stream in accordance with the encoding used and the specific characters being written to the stream. The value to write. The stream is closed. An I/O error occurs. value is null. Writes a decimal value to the current stream and advances the stream position by sixteen bytes. The decimal value to write. The stream is closed. An I/O error occurs. Byte order Big Endian Little Endian The original idea of comming up with a coordinate that used public accessors and an ICoordinate interface was actually quite slow, given that every access point was multiplied across many instances. An optional place holder for a measure value if needed The X or horizontal, or longitudinal ordinate The Y or vertical, or latitudinal ordinate The Z or up or altitude ordinate Creates an empty coordinate Creates a 2D coordinate with NaN for the Z and M values Creates a new coordinate with the specified values Creates a new coordinate with the values in X, Y, Z order, or X, Y order. Constructs a new instance of the coordinate Constructs a new instance of the coordinate Creates a new instance of Coordinate Compares the X, Y and Z values with the specified item. If the Z value is NaN then only the X and Y values are considered This should be either a Coordiante or an ICoordinate Boolean, true if the two are equal returns the simple base.GetHashCode Returns the underlying two dimensional array of coordinates Returns Euclidean 2D distance from ICoordinate p. ICoordinate with which to do the distance comparison. Double, the distance between the two locations. Returns whether the planar projections of the two Coordinates are equal. The ICoordinate with which to do the 2D comparison. true if the x- and y-coordinates are equal; the Z coordinates do not have to be equal. Returns true if other has the same values for x, y and z. The second ICoordiante for a 3D comparison true if other is a ICoordinate with the same values for x, y and z. Returns the distance that is appropriate for N dimensions. In otherwords, if this point is three dimensional, then all three dimensions will be used for calculating the distance. The coordinate to compare to this coordinate A double valued distance measure that is invariant to the number of coordinates The number of dimensions does not match between the points. Returns a string of the form (x, y, z) . string of the form (x, y, z) Compares this object with the specified object for order. Since Coordinates are 2.5D, this routine ignores the z value when making the comparison. Returns -1 : this.x lowerthan other.x || ((this.x == other.x) AND (this.y lowerthan other.y)) 0 : this.x == other.x AND this.y = other.y 1 : this.x greaterthan other.x || ((this.x == other.x) AND (this.y greaterthan other.y)) Coordinate with which this Coordinate is being compared. A negative integer, zero, or a positive integer as this Coordinate is less than, equal to, or greater than the specified Coordinate. Compares this object with the specified object for order. Since Coordinates are 2.5D, this routine ignores the z value when making the comparison. Returns -1 : this.x lowerthan other.x || ((this.x == other.x) AND (this.y lowerthan other.y)) 0 : this.x == other.x AND this.y = other.y 1 : this.x greaterthan other.x || ((this.x == other.x) AND (this.y greaterthan other.y)) Coordinate with which this Coordinate is being compared. A negative integer, zero, or a positive integer as this Coordinate is less than, equal to, or greater than the specified Coordinate. If either X or Y is defined as NaN, then this coordinate is considered empty. Duplicates this coordinate Overloaded + operator. Overloaded + operator. Overloaded + operator. Overloaded * operator. Overloaded * operator. Overloaded * operator. Overloaded - operator. Overloaded - operator. Overloaded - operator. Overloaded / operator. Overloaded / operator. Overloaded / operator. Gets a pre-defined coordinate that has double.NaN for all the values. Gets or sets the double value associated with the specified ordinate index The zero-based integer index of the ordinate A double value representing a single ordinate This is not a true length, but simply tests the Z value. If the Z value is NaN then the value is 2. Otherwise this is 3. Useful utility functions for handling Coordinate arrays. Finds a in a list of s which is not contained in another list of s. The s to test. An array of s to test the input points against. A from which is not in , or null. Compares two arrays in the forward direction of their coordinates, using lexicographic ordering. Determines which orientation of the array is (overall) increasing. In other words, determines which end of the array is "smaller" (using the standard ordering on ). Returns an integer indicating the increasing direction. If the sequence is a palindrome, it is defined to be oriented in a positive direction. The array of Coordinates to test. 1 if the array is smaller at the start or is a palindrome, -1 if smaller at the end. Determines whether two arrays of equal length are equal in opposite directions. Creates a deep copy of the argument Coordinate array. Array of Coordinates. Deep copy of the input. Converts the given of s into a array. of coordinates. If contains not only s. Converts the given of s into a array. of coordinates. Returns whether Equals returns true for any two consecutive coordinates in the given array. Array of Coordinates. true if coord has repeated points; false otherwise. Returns either the given coordinate array if its length is greater than the given amount, or an empty coordinate array. Length amount. Array of Coordinates. New Coordinate array. If the coordinate array argument has repeated points, constructs a new array containing no repeated points. Otherwise, returns the argument. Reverses the coordinates in an array in-place. Array of Coordinates. Returns true if the two arrays are identical, both null, or pointwise equal (as compared using Coordinate.Equals). First array of Coordinates. Second array of Coordinates. true if two Coordinates array are equals; false otherwise Returns true if the two arrays are identical, both null, or pointwise equal, using a user-defined for s. An array of s. Another array of s. A for s. Returns the minimum coordinate, using the usual lexicographic comparison. Array to search. The minimum coordinate in the array, found using CompareTo. Shifts the positions of the coordinates until firstCoordinate is first. Array to rearrange. Coordinate to make first. Returns the index of in . The first position is 0; the second is 1; etc. A to search for. A array to search. The position of coordinate, or -1 if it is not found. Extracts a subsequence of the input array from indices to (inclusive). The input array. The index of the start of the subsequence to extract. The index of the end of the subsequence to extract. A subsequence of the input array. A comparator for arrays modulo their directionality. E.g. if two coordinate arrays are identical but reversed they will compare as equal under this ordering. If the arrays are not equal, the ordering returned is the ordering in the forward direction. Compares two arrays in the forward direction of their coordinates, using lexicographic ordering. Compares the specified s arrays. The ICoordinateSequence implementation that Geometrys use by default. In this implementation, Coordinates returned by ToArray and Coordinate are live -- modifications to them are actually changing the CoordinateSequence's underlying data. The internal representation of a list of coordinates inside a Geometry. There are some cases in which you might want Geometries to store their points using something other than the NTS Coordinate class. For example, you may want to experiment with another implementation, such as an array of x’s and an array of y’s. or you might want to use your own coordinate class, one that supports extra attributes like M-values. You can do this by implementing the ICoordinateSequence and ICoordinateSequenceFactory interfaces. You would then create a GeometryFactory parameterized by your ICoordinateSequenceFactory, and use this GeometryFactory to create new Geometries. All of these new Geometries will use your ICoordinateSequence implementation. An observation on performance: If your ICoordinateSequence is not based on an array of Coordinates, it may incur a performance penalty when its ToArray() method is called because the array needs to be built from scratch. Returns the ordinate of a coordinate in this sequence. Ordinate indices 0 and 1 are assumed to be X and Y. Ordinates indices greater than 1 have user-defined semantics (for instance, they may contain other dimensions or measure values). The coordinate index in the sequence. The ordinate index in the coordinate (in range [0, dimension-1]). Sets the value for a given ordinate of a coordinate in this sequence. The coordinate index in the sequence. The ordinate index in the coordinate (in range [0, dimension-1]). The new ordinate value. Returns (possibly copies of) the Coordinates in this collection. Whether or not the Coordinates returned are the actual underlying Coordinates or merely copies depends on the implementation. Notice that if this implementation does not store its data as an array of Coordinates, this method will incur a performance penalty because the array needs to be built from scratch. Expands the given Envelope to include the coordinates in the sequence. Does not modify the original envelope, but rather returns a copy of the original envelope after being modified. The envelope use as the starting point for expansion. This envelope will not be modified. The newly created envelope that is the expanded version of the original. Returns the dimension (number of ordinates in each coordinate) for this sequence. Direct accessor to an ICoordinate An integer index in this array sequence An ICoordinate for the specified index Every time a member is added to, subtracted from, or edited in the sequence, this VersionID is incremented. This doesn't uniquely separate this sequence from other sequences, but rather acts as a way to rapidly track if changes have occured against a cached version. Increments the version with the understanding that we are using integers. If the user uses too many version, it will cycle around. The statistical odds of accidentally reaching the same value as a previous version should be small enough to prevent conflicts. Creates a new array sequence dimensioned with exactly 1 coordinate that is empty. Creates a new array sequence dimensioned with exactly 1 coordinate, which is set to the coordinate The ICoordinate to use when constructing this sequence Creates a new CoordinateArraySequence whose members are The existing list whose members will be copied to the array. Constructs a sequence based on the given array (the array is not copied). The coordinate array that will be referenced. Constructs a sequence of a given size, populated with new Coordinates. The size of the sequence to create. Constructs a sequence based on the given array (the array is not copied). The coordinate array that will be referenced. Adds a single item to the array. This is very slow for arrays because it has to copy all the values into a new array. Clears the array, reducing the measure to 1 empty coordinate. Tests to see if the array contains the specified item the ICoordinate to test True if the value is in the array. Creates a deep copy of the object. The deep copy. Copies all of the members from this sequence into the specifeid array. The array of Icoordinates to copy values to. The starting index Expands the given Envelope to include the coordinates in the sequence. Does not modify the original envelope, but rather returns a copy of the original envelope after being modified. The envelope use as the starting point for expansion. This envelope will not be modified. The newly created envelope that is the expanded version of the original. Returns an enumerator object for cycling through each of the various members of the array. BEWARE! This will bypass the VersionID code. Since ICoordinateSequence does not contain the GetEnumerator methods, using an ICoordinateSequence should safely advance the version during changes. An Enumerator for this array. Returns the ordinate of a coordinate in this sequence. Ordinate indices 0 and 1 are assumed to be X and Y. Ordinates indices greater than 1 have user-defined semantics (for instance, they may contain other dimensions or measure values). The coordinate index in the sequence. The ordinate index in the coordinate (in range [0, dimension-1]). For arrays, this is very inneficient. This will copy all the members except for the item to a new array. The item to remove. Boolean, true if a match was found and an item was removed, false otherwise. Sets the value for a given ordinate of a coordinate in this sequence. The coordinate index in the sequence. The ordinate index in the coordinate (in range [0, dimension-1]). The new ordinate value. This method exposes the internal Array of Coordinate Objects. Returns the string representation of the coordinate array. Returns the length of the coordinate sequence. Returns the dimension (number of ordinates in each coordinate) for this sequence. CoordinateArraySequences are not ReadOnly Direct accessor to an ICoordinate An integer index in this array sequence An ICoordinate for the specified index Every time a member is added to, subtracted from, or edited in the sequence, this VersionID is incremented. This doesn't uniquely separate this sequence from other sequences, but rather acts as a way to rapidly track if changes have occured against a cached version. CoordinateArraySequenceEnumerator Creates a new instance of CoordinateArraySequenceEnumerator Does nothing Advances the enumerator to the next member Resets the enumerator to the original position Gets the current member Creates CoordinateSequences represented as an array of Coordinates. An object that knows how to build a particular implementation of ICoordinateSequence from an array of Coordinates. Returns a CoordinateSequence based on the given array; whether or not the array is copied is implementation-dependent. Coordinates array, which may not be null nor contain null elements Constructs a new coordinate sequence using a single coordinate. A single coordinate to be used in a coordinate sequence factory. A valid ICoordinateSequence. Constructs either an array with 1 member or an empty list, depending on the implementation. A new seqeunce This appears to be part of a singleton for a coordinate array sequence factory Returns a CoordinateArraySequence based on the given array (the array is not copied). the coordinates, which may not be null nor contain null elements. Constructs a new coordinate sequence using a single coordinate. A single coordinate to be used in a coordinate sequence factory. A valid ICoordinateSequence. Constructs either an array with 1 member or an empty list, depending on the implementation. A new seqeunce A lightweight class used to store coordinates on the 2-dimensional Cartesian plane. It is distinct from Point, which is a subclass of Geometry. Unlike objects of type Point (which contain additional information such as an envelope, a precision model, and spatial reference system information), a Coordinate only contains ordinate values and accessor methods. Coordinates are two-dimensional points, with an additional z-ordinate. NTS does not support any operations on the z-ordinate except the basic accessor functions. Constructed coordinates will have a z-ordinate of NaN. The standard comparison functions will ignore the z-ordinate. Creates a CoordinateF by using the X, Y and Z terms of a FloatVector Constructs a Coordinate at (x, y, z). X value. Y value. Z value. Measure value. Constructs a Coordinate at (x, y, z). X value. Y value. Z value. Creates a Coordinate from any ICoordinate Interface The Vector.IPoint interface to construct a coordinate from Constructs a Coordinate at (0, 0, NaN). Constructs a Coordinate at (x, y, NaN). X value. Y value. Returns whether the planar projections of the two Coordinates are equal. ICoordinate with which to do the 2D comparison. true if the x- and y-coordinates are equal; the Z coordinates do not have to be equal. Returns true if other has the same values for the x and y ordinates. Since Coordinates are 2.5D, this routine ignores the z value when making the comparison. Coordinate with which to do the comparison. true if other is a Coordinate with the same values for the x and y ordinates. Compares this object with the specified object for order. Since Coordinates are 2.5D, this routine ignores the z value when making the comparison. Returns -1 : this.x lowerthan other.x || ((this.x == other.x) AND (this.y lowerthan other.y)) 0 : this.x == other.x AND this.y = other.y 1 : this.x greaterthan other.x || ((this.x == other.x) AND (this.y greaterthan other.y)) Coordinate with which this Coordinate is being compared. A negative integer, zero, or a positive integer as this Coordinate is less than, equal to, or greater than the specified Coordinate. Returns true if other has the same values for x, y and z. ICoordinate with which to do the 3D comparison. true if other is a ICoordinate with the same values for x, y and z. Returns a string of the form (x, y, z) . string of the form (x, y, z) Create a new object as copy of this instance. Creates a new ICoordinate copy of this instance Returns Euclidean 2D distance from ICoordinate p. ICoordinate with which to do the distance comparison. Double, the distance between the two locations. Returns the distance that is appropriate for N dimensions. In otherwords, if this point is three dimensional, then all three dimensions will be used for calculating the distance. The coordinate to compare to this coordinate A double valued distance measure that is invariant to the number of coordinates The number of dimensions does not match between the points. Return HashCode. Return HashCode. Value from HashCode computation. Overloaded + operator. Overloaded + operator. Overloaded + operator. Overloaded * operator. Overloaded * operator. Overloaded * operator. Overloaded - operator. Overloaded - operator. Overloaded - operator. Overloaded / operator. Overloaded / operator. Overloaded / operator. Gets an array of double values for each of the ordinates Direct access to the coordinate works as a float. If you only have the interface, it must involve conversions to and from a float. This may cause errors if the value being set is outside the range of the float values. Direct access to the Y coordinate as a float Z coordinate. A Measure coordinate Gets/Sets Coordinates (x, y, z) values. Gets or sets the double value corresponding to the specific ordinate For now this is 3D Gets or sets the values of this CoordinateF using an array of double values A list of Coordinates, which may be set to prevent repeated coordinates from occuring in the list. Creates a new instance of a coordiante list The basic constructor for a CoordinateArray allows repeated points (i.e produces a CoordinateList with exactly the same set of points). Initial coordinates Constructs a new list from an array of Coordinates, allowing caller to specify if repeated points are to be removed. Array of coordinates to load into the list. If false, repeated points are removed. Returns a deep copy of this collection. The copied object. Add an array of coordinates. Coordinates to be inserted. If set to false, repeated coordinates are collapsed. If false, the array is added in reverse order. Add an array of coordinates. Coordinates to be inserted. If set to false, repeated coordinates are collapsed. Add a coordinate. Coordinate to be inserted. If set to false, repeated coordinates are collapsed. Adds the entire range of coordinates, preventing coordinates with the identical 2D signiture from being added immediately after it's duplicate. Ensure this coordList is a ring, by adding the start point if necessary. Returns the Coordinates in this collection. Coordinater as Coordinate[] array. An ICoordinateSequence based on a list instead of an array. Creates a new instance of a CoordinateListSequence Creates a new instance of a CoordinateListSequence Creates a new instance of a CoordinateListSequence If this is a List of ICoordinates, the sequence will be a shallow list. Otherwise, a List is created and shallow copies of each coordinate is added. Creates a new instance of CoordinateListSequence The sequence to use Adds an item to the end of the CoordinateList An ICoordinate to add Clears the list entirely. Creates a deep copy of this object CoordinateListSequence Tests wheather or not the specified ICoordinate is contained in the list. An ICoordinate to test Boolean, true if the list contains the item. Copies all the members of this list into the specified array. The array to copy values to. The 0 based integer index in the array at which copying begins Expands the given Envelope to include the coordinates in the sequence. Does not modify the original envelope, but rather returns a copy of the original envelope after being modified. The envelope use as the starting point for expansion. This envelope will not be modified. The newly created envelope that is the expanded version of the original. Obtains an enumerator for cycling through the list. BEWARE! This will return an underlying list enumerator, and so code that uses a foreach process or an enumerator will bypass the Version incrementing code. An Enumerator object for cycling through the list. Gets a specific X, Y or Z value depending on the index specified and the ordinate specified Removes the specified ICoordinate from the list. An ICoordinate that should be removed from the list Boolean, true if the item was successfully removed. Sets a specific X, Y or Z value depending on the index specified and the ordinate specified Copies all the members to an ICoordiante[] Increments the version with the understanding that we are using integers. If the user uses too many version, it will cycle around. The statistical odds of accidentally reaching the same value as a previous version should be small enough to prevent conflicts. Gets an integer representing the number of ICoordinates currently stored in this list This always returns 0 The CoordinateListSequence is not readonly Direct accessor to an ICoordinate An integer index in this array sequence An ICoordinate for the specified index This only works as long as an enumeration is not used on the CoordinateListSequence. Since ICoordinateSequence does not support a GetEnumerator object, as long as you are using an ICoordinateSequence interface, VersionID should work. Creates CoordinateSequences represented as an array of Coordinates. Creates an instance of the CoordinateListSequenceFactory Returns a CoordinateArraySequence based on the given array (the array is not copied). the coordinates, which may not be null nor contain null elements. Creates a new CoordinateListSequence and populates it with a single coordinate. CoordinateMismatchException Creates a new instance of CoordinateMismatchException Class containing static methods for conversions between Dimension values and characters. Converts the dimension value to a dimension symbol, for example, True => 'T' Number that can be stored in the IntersectionMatrix. Possible values are True, False, Dontcare, 0, 1, 2. Character for use in the string representation of an IntersectionMatrix. Possible values are T, F, *, 0, 1, 2. Converts the dimension symbol to a dimension value, for example, '*' => Dontcare Character for use in the string representation of an IntersectionMatrix. Possible values are T, F, *, 0, 1, 2. Number that can be stored in the IntersectionMatrix. Possible values are True, False, Dontcare, 0, 1, 2. This is enumerates not only the specific types, but very specifically that the types are the Topology variety, and not simply the vector variety A non-geometry rectangle that strictly shows extents A collective group of geometries A closed linestring that doesn't self intersect Any linear collection of points joined by line segments A collection of independant LineStrings that are not connected A Grouping of points A Collection of unconnected polygons A single coordinate location At least one Linear Ring shell with any number of linear ring "holes" Any other type Shapefile Shape types enumeration Null Shape Point LineString Polygon MultiPoint PointMZ PolyLineMZ PolygonMZ MultiPointMZ PointM LineStringM PolygonM MultiPointM MultiPatch PointZ LineStringZ PolygonZ MultiPointZ Field Types Integer Integer List Real Real List String String List Wide String Side String List Binary Date Time DateTime Invalid Vector Geometry Types Unknown Well Known Binary Point Well Known Binary LineString Well Known Binary Polygon Well Known Binary MultiPoint Well Known Binary MultiLineString Well Known Binary MultiPolygon Well Known Binary Geometry Collection Well Known Binary Linear Ring /* non-standard, just for createGeometry() */ Well Known Binary Point with Z value Well Known Binary Line String with Z values Well Known Binary Polygon with Z values Well Known Binary MultiPoint with Z values Well Known Binary LineString with z values Well Known Binary MultiPolygon with z values Defines a rectangular region of the 2D coordinate plane. It is often used to represent the bounding box of a Geometry, e.g. the minimum and maximum x and y values of the Coordinates. Notice that Envelopes support infinite or half-infinite regions, by using the values of Double.PositiveInfinity and Double.NegativeInfinity. When Envelope objects are created or initialized, the supplies extent values are automatically sorted into the correct order. Defines a rectangular region of the 2D coordinate plane. It is often used to represent the bounding box of a Geometry, e.g. the minimum and maximum x and y values of the Coordinates. Notice that Envelopes support infinite or half-infinite regions, by using the values of Double.PositiveInfinity and Double.NegativeInfinity. When Envelope objects are created or initialized, the supplies extent values are automatically sorted into the correct order. An IRectangle is not as specific to being a geometry, and can apply to anything as long as it is willing to support a double valued height, width, X and Y value. Gets or sets the difference between the maximum and minimum y values. Setting this will change only the minimum Y value, leaving the Top alone max y - min y, or 0 if this is a null Envelope. Gets or Sets the difference between the maximum and minimum x values. Setting this will change only the Maximum X value, and leave the minimum X alone max x - min x, or 0 if this is a null Envelope. In the precedent set by controls, envelopes support an X value and a width. The X value represents the Minimum.X coordinate for this envelope. In the precedent set by controls, envelopes support a Y value and a height. the Y value represents the Top of the envelope, (Maximum.Y) and the Height represents the span between Maximum and Minimum Y. Creates a copy of the current envelope. An IEnvelope Interface that is a duplicate of this envelope Sets maxx to a value less than minx usually, maxx = -1 and minx = 0, maxy = -1 and miny = 0 True only if the M coordinates are not NaN and the max is greater than the min. Boolean True only of the Z ordinates are not NaN and the max is greater than the min. Boolean Because the envelope class attempts to protect users from accidentally manipulating the minimum/maximum conditions in an undesirable way, the init method should effectively initialize the existing envelope based on the new coordinates. This is how values are "Set" for the envelope. It is expected that this method will do a check to prevent larger values from being assigned to "maximum". The first coordinate to test the second coordinate to test This is a coordinate defining the minimum bound in any number of dimensions as controlled by NumOrdinates. This is a coordinate defining the maximum bound in any number of dimensions as controlled by NumOrdinates. Gets the number of ordinates that define both coordinates of this envelope. Returns true if this Envelope is a "null" envelope. true if this Envelope is uninitialized or is the envelope of the empty point. This is usually defined as having a maxx less than a minx, like maxx = -1 and minx = 0. Occurs when there is a basic change in the envelope. Creates a null Envelope. Creates an Envelope for a region defined by maximum and minimum values. The first x-value. The second x-value. The first y-value. The second y-value. Creates an Envelope for a region defined by maximum and minimum values. The first x-value. The second x-value. The first y-value. The second y-value. The first z-value. The second z-value. Creates an Envelope for a region defined by an Vector.IEnvelope The IEnvelope to create an envelope from Creates an Envelope for a region defined by two Coordinates. The first Coordinate. The second Coordinate. Creates an Envelope for a region defined by a single Coordinate. The Coordinate. This is a special constructor. This will not fire the OnEnvelopeChanged event, and expects values to be ordered as: XMin, XMax, YMin, YMax, ZMin, ZMax, higher dimenions... This constructor. The ordinal extents. The minimum m value. The max M value. This is a special constructor. This will not fire the OnEnvelopeChanged event, and expects values to be ordered as: XMin, XMax, YMin, YMax, ZMin, ZMax, higher dimenions... This constructor sets M bounds to be 0. The ordinal extents. Initialize an Envelope of any dimension for a region defined by two Coordinates. The number of ordinates (dimension) of the coordinates must match. M values will also be considered. The first Coordinate. The second Coordinate. This initializes the values without passing any coordinates and creates the default, 2D null envelope. This is an internal method forcing assignments to the internal coordinates The coordinate to use for the minimum in X, Y, Z etc. The coordinate to use for the maximum in X, Y, Z etc. Initialize to a null Envelope. Initialize an Envelope for a region defined by maximum and minimum values. The first x-value. The second x-value. The first y-value. The second y-value. This will set all 3 dimensions. Be warned, the Z dimensions are just place holders for any topology opperations and do not have any true functionality. Whichever is smaller becomes the minimum and whichever is larger becomes the maximum. An X coordinate Another X coordinate A Y coordinate Another Y coordinate A Z coordinate Another Z coordinate Initialize an Envelope for a region defined by a single Coordinate. The Coordinate. Initialize an Envelope from an existing Envelope. The Envelope to initialize from. True only if the M coordinates are not NaN and the max is greater than the min. Boolean True only of the Z ordinates are not NaN and the max is greater than the min. Boolean Creates a copy of the current envelope. An object satisfying ICloneable Makes this Envelope a "null" envelope. Internaly, envelopes that vioate that sacred criteria of min being less than max will be counted as a null case Creates a copy of the current envelope. An IEnvelope Interface that is a duplicate of this envelope Test the point q to see whether it intersects the Envelope defined by p1-p2. One extremal point of the envelope. Another extremal point of the envelope. Point to test for intersection. true if q intersects the envelope p1-p2. Test the envelope defined by p1-p2 for intersection with the envelope defined by q1-q2 One extremal point of the envelope Point. Another extremal point of the envelope Point. One extremal point of the envelope Q. Another extremal point of the envelope Q. true if Q intersects Point Generates a string form of this envelope. This should not be an extension method because it overrides ToString. Fires the EnvelopeChanged event Specifies that this is in fact an envelope Gets the Horizontal boundaries in geographic coordinates Gets the vertical boundaries in geographic coordinates Gets the minimum coordinate Gets the maximum coordinate Gets the number of ordinates for this envelope. Returns true if this Envelope is a "null" envelope. true if this Envelope is uninitialized or is the envelope of the empty point. Gets or sets the difference between the maximum and minimum y values. Setting this will only change the _yMin value (leaving the top alone) max y - min y, or 0 if this is a null Envelope. To resemble the precedent set by the dot net framework controls, this is left as a property Gets or Sets the difference between the maximum and minimum x values. Setting this will change only the Maximum X value, and leave the minimum X alone max x - min x, or 0 if this is a null Envelope. Gets or sets the Left extent of the envelope, keeping the width the same. In the precedent set by controls, envelopes support an X value and a width. The X value represents the Minimum.X coordinate for this envelope. Gets or sets the Y coordinate for the top of the envelope. (YMax) In the precedent set by controls, envelopes support a Y value and a height. the Y value represents the Top of the envelope, (Maximum.Y) and the Height represents the span between Maximum and Minimum Y. Occurs when there is a basic change in the envelope. My concept for the Envelope is that there are several methods that are derived calculations. These are so straight forward that it is unlikey that "new" implementations of those derived values will be needed or wanted. However, we want lots of different kinds of things to be able to "become" an envelope with a minimum of fuss. Calculates the area of this envelope. Because the word Area, like Volume, is dimension specific, this method only looks at the X and Y ordinates, and requires at least 2 ordinates. The IEnvelope to use with this method The 2D area as a double value. Gets a linear ring built clockwise around the border, starting from the TopLeft. The IEnvelope to use with this method Gets an array of 4 line segments working clockwise from the top segment. The IEnvelope to use with this method Gets the minY, which is Y - Height. The IEnvelope that this calculation is for. Gets an ILineSegment from the top right corner to the bottom right corner The IEnvelope to use with this method Gets the bottom left corner of this rectangle as a 2D coordinate. The IEnvelope that this calculation is for. An ICoordinate at the lower left corner of this rectangle Gets the bottom right corner of this rectangle as a 2D coordinate The IEnvelope that this calculation is for. An ICoordinate at the lower right corner of this rectangle Gets the coordinate defining the center of this envelope in all of the dimensions of this envelope. The IEnvelope to find the center for An ICoordinate Gets the left value for this rectangle. This should be the X coordinate, but is added for clarity. The IEnvelope that this calculation is for. Gets an ILineSegment from the bottom left to the top left corners The IEnvelope that is being extended by this method Gets the right value, which is X + Width. The IEnvelope that this calculation is for. Gets an ILineSegment from the bottom right corner to the bottom left corner The IEnvelope to use with this method Converts this envelope into a linear ring. The IEnvelope to use with this method A Linear ring describing the border of this envelope. Gets an ILineSegment from the top left to the top right corners The IEnvelope to use with this method Calculates the TopLeft 2D coordinate from this envelope. The IEnvelope to use with this method Technically an Evelope object is not actually a geometry. This creates a polygon from the extents. The IEnvelope to use with this method A Polygon, which technically qualifies as an IGeometry Calcualte the TopRight 2D Coordinate from this envelope The IEnvelope to use with this method An ICoordinate in the position of maximum X, Maximum Y Changes the envelope extent by the specified amount relative to it's current extent in that dimension (preserving the aspect ratio). So Zoom(10) on a 100 unit wide envelope creates a 110 unit wide envlope, while Zoom(-10) on a 100 unit wide envelope creates a 90 unit wide envelope. Zoom(-100) on an envelope makes it 100% smaller, or effectively a point. Tragically, a point cannot be "zoomed" back in, so a check should be used to ensure that the envelope is not currently a point before attempting to zoom in. The IEnvelope that this zoom method modifies Positive 50 makes the envelope 50% larger Negative 50 makes the envelope 50% smaller perCent = -50 compact the envelope a 50% (make it smaller). perCent = 200 enlarge envelope by 2. Returns a new envelope that is a copy of this envelope, but modified to include the specified coordinate. Calculates the union of the current box and the given box. Moves the envelope to the indicated coordinate. The IEnvelope to use with this method The new center coordinate. Resizes the envelope to the indicated point. The IEnvelope to use with this method The new width. The new height. Moves and resizes the current envelope. The IEnvelope to use with this method The new centre coordinate. The new width. The new height. This handles setting the center and scale in N dimensions. The size is equivalent to the span in each dimension, while the center is the central position in each dimension. The envelope will have values in each dimension where either the existing envelope or both the specified center and size values have been specified. If only the existing envelope and a size is specified for dimension 3, for example, the existing center will be used. The envelope to modify The center position. This can also be null. The size (or span) in each dimension. This can also be null. Despite the naming of the extents, this will force the larger of the two x values to become Xmax etc. The IEnvelope to use with this method An X coordinate A Y coordinate A Z coordinate Another X coordinate Another Y coordinate Another Z coordinate The two dimensional overload for consistency with other code. Despite the names, this will force the smallest X coordinate given to become maxX. The IEnvelope to use with this method An X coordinate A Y coordinate Another X coordinate Another Y coordinate Gets the maxY value, which should be Y. The IEnvelope that this calculation is for. The double value representing the Max Y value of this rectangle Translates this envelope by given amounts in the X and Y direction. The IEnvelope to use with this method The amount to translate along the X axis. The amount to translate along the Y axis. Translates the envelope by given amounts up to the minimum dimension between the envelope and the shift coordinate. (e.g., A 2D envelope will only be shifted in 2 dimensions because it has no Z, while a 2D coordinate can only shift a cube based on the X and Y positions, leaving the Z info alone. The IEnvelope to use with this method This does nothing to a "NULL" envelope Overlaps is defined as intersecting, but having some part of each envelope that is also outside of the other envelope. Therefore it would amount to saying "Intersects And Not Contains And Not Within" The IEnvelope to use with this method For a point, or coordinate, this is a degenerate case and will simply perform an intersection test instead. The IEnvelope to use with this method For a point, or coordinate, this is a degenerate case and will simply perform an intersection test instead. The IEnvelope to use with this method The x coordinate The y coordinate Boolean, true if the specified point intersects with this envelope Evaluates if the specified coordinate is found inside or on the border. This will test all the dimensions shared by both the envelope and point. Returns true if the given point lies in or on the envelope. The IEnvelope that this is for the x-coordinate of the point which this Envelope is being checked for containing. the y-coordinate of the point which this Envelope is being checked for containing. true if (x, y) lies in the interior or on the boundary of this Envelope. Returns true if the other IEnvelope is within this envelope in all dimensions. If the boundaries touch, this will true. This will test the number of dimensions that is the smallest dimensionality. This will ignore M values. The first envelope (this object when extending) the Envelope which this Envelope is being checked for containing. true if other is contained in this Envelope. Computes the distance between this and another Envelope. The distance between overlapping Envelopes is 0. Otherwise, the distance is the hyper Euclidean distance between the closest points. M values are ignored, but every dimension is considered, up to the minimum of the number of ordinates between the two envelopes. Use Distance with a dimension specified to force 2D distance calculations. The first envelope (this object when extending) The other envelope to calculate the distance to The distance between this and another Envelope. Null cases produce a distance of -1 Sometimes only two dimensions are important, and the full dimensionality is not needed. The Distance 2D performs the same distance check but only in X and Y, regardless of how many dimensions exist in the envelopes. Both envelopes should have at least two ordinates however. (Not a criteria of the Distance() method) The first envelope (this object when extending) The other envelope to calculate the distance to Calculates the distance specifically in 3D, even if the envelope exists in higher dimensions. The NumOrdinates of both envelopes must be at least 3. The first envelope (this object when extending) The other envelope to calculate the distance to Uses the specified distance to expand the envelope by that amount in all dimensions. Uses the dimensions of the specified distances coordinate to specify the amount to expand the envelopes in each ordinate. This will apply the method to the minimum dimensions between the distances coordinate and this envelope. (eg. A 2D distances coordinate will not affect Z values in the envelope). The first envelope (this object when extending) The distance to expand the envelope. Expands this envelope by a given distance in all directions. Both positive and negative distances are supported. The first envelope (this object when extending) The distance to expand the envelope along the the X axis. The distance to expand the envelope along the the Y axis. Enlarges the boundary of the Envelope so that it contains (p). Does nothing if (p) is already on or within the boundaries. This executes to the minimum of dimensions between p and this envelope. The first envelope (this object when extending) The Coordinate. Enlarges the boundary of the Envelope so that it contains (x, y). Does nothing if (x, y) is already on or within the boundaries. The first envelope (this object when extending) The value to lower the minimum x to or to raise the maximum x to. The value to lower the minimum y to or to raise the maximum y to. Enlarges the boundary of the Envelope so that it contains other. Does nothing if other is wholly on or within the boundaries. The first envelope (this object when extending) the Envelope to merge with. Returns the intersection of the specified segment with this bounding box. If there is no intersection, then this returns null. If the intersection is a corner, then the LineSegment will be degenerate, that is both the coordinates will be the same. Otherwise, the segment will be returned so that the direction is the same as the original segment. The IEnvelope to use with this method The LineSegment to intersect. An ILineSegment that is cropped to fit within the bounding box. Finds an envelope that represents the intersection between this envelope and the specified IEnvelope. The number of dimensions of the returned envelope is the maximum of the NumOrdinates between the two envelopes, since a 2D envelope will only constrain a cube in 2 dimensions, and allow the z bounds to remain unaltered. The IEnvelope that is being extended by this method An IEnvelope to compare against an IEnvelope that bounds the intersection area Using an envelope intersection has some optimizations by checking against the envelope of the geometry. In the worst case scenario, the envelope crops the geometry, and a new geometry is created. This will be much faster if the envelope contains the geometries envelope, however, simply returning the original geometry. The IEnvelope that is being extended by this method A geometric intersection against the area of this envelope A geometry, cropped to the space of this envelope if necessary. Check if the point p overlaps (lies inside) the region of this Envelope. The IEnvelope that is being extended by this method the Coordinate to be tested. true if the point overlaps this Envelope. Check if the point (x, y) overlaps (lies inside) the region of this Envelope. The IEnvelope that is being extended by this method the x-ordinate of the point. the y-ordinate of the point. true if the point overlaps this Envelope. This should only be used if the Intersection is not actually required because it uses the Intersection method and returns false if the return value is null. The IEnvelope that is being extended by this method The segment to be tested against this envelope. The line segment to compare against. Tests for intersection (any overlap) between the two envelopes. In cases of unequal dimensions, the smaller dimension is used (e.g., if a 2D rectangle doesn't intersect a cube in its own plane, this would return false.) The IEnvelope that is being extended by this method the Envelope which this Envelope is being checked for overlapping. true if the Envelopes overlap. EnumerableEM cycles through any strong typed collection where the type implements ICLoneable and clones each member, inserting that member into the new list. The type of the values in the list. The original enumerable collection of type T. A deep copy of the list. A Generic Safe Casting method that should simply exist as part of the core framework The type of the member to attempt to cast to. The original object to attempt to System.Convert. An output variable of type T. InsufficientDimensionsException Creates a new instance of InsufficientDimensionsException Creates a new instance of InsufficientDimesionsException, but specifies the name of the argument, or a similar string like "both envelopes". The string name of the argument to introduce in to exception message IFloatVector3 X Y Z Copies the X, Y and Z values from the CoordinateF without doing a conversion. X, Y Z Creates a new FloatVector3 with the specified values X Y Z Uses the X, Y and Z values from the coordinate to create a new FloatVector3 The coordinate to obtain X, Y and Z values from tests to see if the specified object has the same X, Y and Z values Not sure what I should be doing here since Int can't really contain this much info very well Adds all the scalar members of the the two vectors Left hand side Right hand side Adds the specified v A FloatVector3 to add to this vector Subtracts all the scalar members of the the two vectors Left hand side Right hand side Subtracts the specified value A FloatVector3 Returns the Cross Product of two vectors lhs and V Vector, the first input vector Vector, the second input vector A FloatVector3 containing the cross product of lhs and V Multiplies all the scalar members of the the two vectors Left hand side Right hand side Multiplies the source vector by a scalar. Multiplies this vector by a scalar value. The scalar to multiply by Normalizes the vectors Adds the vectors lhs and V using vector addition, which adds the corresponding components One vector to be added A second vector to be added The sum of the vectors Tests two float vectors for equality. The left hand side FloatVector3 to test. The right hand side FloatVector3 to test. Returns true if X, Y and Z are all equal. Tests two float vectors for inequality. The left hand side FloatVector3 to test. The right hand side FloatVector3 to test. Returns true if any of X, Y and Z are unequal. Returns the Cross Product of two vectors lhs and rhs Vector, the first input vector Vector, the second input vector A FloatVector3 containing the cross product of lhs and V Divides the components of vector lhs by the respective components ov vector V and returns the resulting vector. FloatVector3 Dividend (Numbers to be divided) FloatVector3 Divisor (Numbers to divide by) A FloatVector3 quotient of lhs and V To prevent divide by 0, if a 0 is in V, it will return 0 in the result Multiplies each component of vector lhs by the Scalar value A vector representing the vector to be multiplied Double, the scalar value to mulitiply the vector components by A FloatVector3 representing the vector product of vector lhs and the Scalar Returns the Inner Product also known as the dot product of two vectors, lhs and V The input vector The vector to take the inner product against lhs a Double containing the dot product of lhs and V Multiplies the vectors lhs and V using vector multiplication, which adds the corresponding components A scalar to multpy to the vector A vector to be multiplied The scalar product for the vectors Multiplies each component of vector lhs by the Scalar value A vector representing the vector to be multiplied Double, the scalar value to mulitiply the vector components by A FloatVector3 representing the vector product of vector lhs and the Scalar Subtracts FloatVector3 V from FloatVector3 lhs A FloatVector3 to subtract from A FloatVector3 to subtract The FloatVector3 difference lhs - V Gets the length of the vector Gets the square of length of this vector Converts a Well-Known Binary byte data to a Geometry. Initialize reader with a standard GeometryFactory. Initialize reader with the given GeometryFactory. Geometry builder. Basic implementation of Geometry. Clone returns a deep copy of the object. Binary Predicates: Because it is not clear at this time what semantics for spatial analysis methods involving GeometryCollections would be useful, GeometryCollections are not supported as arguments to binary predicates (other than ConvexHull) or the Relate method. Set-Theoretic Methods: The spatial analysis methods will return the most specific class possible to represent the result. If the result is homogeneous, a Point, LineString, or Polygon will be returned if the result contains a single element; otherwise, a MultiPoint, MultiLineString, or MultiPolygon will be returned. If the result is heterogeneous a GeometryCollection will be returned. Representation of Computed Geometries: The SFS states that the result of a set-theoretic method is the "point-set" result of the usual set-theoretic definition of the operation (SFS 3.2.21.1). However, there are sometimes many ways of representing a point set as a Geometry. The SFS does not specify an unambiguous representation of a given point set returned from a spatial analysis method. One goal of NTS is to make this specification precise and unambiguous. NTS will use a canonical form for Geometrys returned from spatial analysis methods. The canonical form is a Geometry which is simple and noded: Simple means that the Geometry returned will be simple according to the NTS definition of IsSimple. Noded applies only to overlays involving LineStrings. It means that all intersection points on LineStrings will be present as endpoints of LineStrings in the result. This definition implies that non-simple geometries which are arguments to spatial analysis methods must be subjected to a line-dissolve process to ensure that the results are simple. Constructed Points And The Precision Model: The results computed by the set-theoretic methods may contain constructed points which are not present in the input Geometry s. These new points arise from intersections between line segments in the edges of the input Geometrys. In the general case it is not possible to represent constructed points exactly. This is due to the fact that the coordinates of an intersection point may contain twice as many bits of precision as the coordinates of the input line segments. In order to represent these constructed points explicitly, NTS must truncate them to fit the PrecisionModel. Unfortunately, truncating coordinates moves them slightly. Line segments which would not be coincident in the exact result may become coincident in the truncated representation. This in turn leads to "topology collapses" -- situations where a computed element has a lower dimension than it would in the exact result. When NTS detects topology collapses during the computation of spatial analysis methods, it will throw an exception. If possible the exception will report the location of the collapse. and are not overridden, so that when two topologically equal Geometries are added to Collections and Dictionaries, they remain distinct. This behaviour is desired in many cases. This has the methods and properties associated with any topology Supports the specific methods associated with relationships, usually returning a boolean style test if the relationship is true. Contains Returns true if other.within(this) returns true. The Geometry with which to compare this Geometry. true if this Geometry contains other. CoveredBy Returns true if this geometry is covered by the specified geometry. The CoveredBy predicate has the following equivalent definitions: - Every point of this geometry is a point of the other geometry. - The DE-9IM Intersection Matrix for the two geometries is T*F**F*** or *TF**F*** or **FT*F*** or **F*TF***. - g.Covers(this) (CoveredBy is the inverse of Covers). Notice the difference between CoveredBy and Within: CoveredBy is a more inclusive relation. The Geometry with which to compare this Geometry. true if this Geometry is covered by . Covers Returns true if this geometry covers the specified geometry. The Covers predicate has the following equivalent definitions: - Every point of the other geometry is a point of this geometry. - The DE-9IM Intersection Matrix for the two geometries is T*****FF* or *T****FF* or ***T**FF* or ****T*FF*. - g.CoveredBy(this) (Covers is the inverse of CoveredBy). Notice the difference between Covers and Contains: Covers is a more inclusive relation. In particular, unlike Contains it does not distinguish between points in the boundary and in the interior of geometries. For most situations, Covers should be used in preference to Contains. As an added benefit, Covers is more amenable to optimization, and hence should be more performant. The Geometry with which to compare this Geometry true if this Geometry covers Crosses Returns true if the DE-9IM intersection matrix for the two Geometrys is T*T****** (for a point and a curve, a point and an area or a line and an area) 0******** (for two curves). The Geometry with which to compare this Geometry. true if the two Geometrys cross. For this function to return true, the Geometry s must be a point and a curve; a point and a surface; two curves; or a curve and a surface. Disjoint Returns true if the DE-9IM intersection matrix for the two Geometrys is DE-9IM: FF*FF****. The Geometry with which to compare this Geometry. true if the two Geometrys are disjoint. Intersects Returns true if disjoint returns false. The Geometry with which to compare this Geometry. true if the two Geometrys intersect. Overlaps Returns true if the DE-9IM intersection matrix for the two Geometrys is T*T***T** (for two points or two surfaces) 1*T***T** (for two curves). The Geometry with which to compare this Geometry. true if the two Geometrys overlap. For this function to return true, the Geometry s must be two points, two curves or two surfaces. Relate Returns true if the elements in the DE-9IM intersection matrix for the two Geometrys match the elements in intersectionPattern , which may be: 0 1 2 T ( = 0, 1 or 2) F ( = -1) * ( = -1, 0, 1 or 2) For more information on the DE-9IM, see the OpenGIS Simple Features Specification. The Geometry with which to compare this Geometry. The pattern against which to check the intersection matrix for the two Geometrys. true if the DE-9IM intersection matrix for the two Geometrys match intersectionPattern. Returns the DE-9IM intersection matrix for the two Geometrys. The Geometry with which to compare this Geometry A matrix describing the intersections of the interiors, boundaries and exteriors of the two Geometrys. Touches Returns true if the DE-9IM intersection matrix for the two Geometrys is FT*******, F**T***** or F***T****. The Geometry with which to compare this Geometry. true if the two Geometrys touch; Returns false if both Geometrys are points. Within Returns true if the DE-9IM intersection matrix for the two Geometrys is T*F**F***. The Geometry with which to compare this Geometry. true if this Geometry is within other. An interface for supporting the functions specific to geometry overlay opperations Difference Returns a Geometry representing the points making up this Geometry that do not make up other. This method returns the closure of the resultant Geometry. The Geometry with which to compute the difference. The point set difference of this Geometry with other. Intersection Returns a Geometry representing the points shared by this Geometry and other. The Geometry with which to compute the intersection. The points common to the two Geometrys. SymmetricDifference Returns a set combining the points in this Geometry not in other, and the points in other not in this Geometry. This method returns the closure of the resultant Geometry. The Geometry with which to compute the symmetric difference. The point set symmetric difference of this Geometry with other. Union Returns a Geometry representing all the points in this Geometry and other. The Geometry with which to compute the union. A set combining the points of this Geometry and the points of other. This is a lightweight version of the components that represent the strictly data related commands. This returns the index'th BasicGeometry where index is between 0 and NumGeometries - 1. If there is only one geometry, this will return this object. An integer index between 0 and NumGeometries - 1 specifying the basic geometry A BasicGeometry representing only the specific sub-geometry specified Returns the string that is the valid GML markup string. A String containing the valid GML Returns the Well-known Binary representation of this Geometry. For a definition of the Well-known Binary format, see the OpenGIS Simple Features Specification. The Well-known Binary representation of this Geometry. ToString Returns the Well-known Text representation of this Geometry. For a definition of the Well-known Text format, see the OpenGIS Simple Features Specification. The Well-known Text representation of this Geometry. Forces the cached envelope to be re-calculated using the coordinates. Coordinates Using an IList guarantees that we can access indexed coordinates, but the actual implementation can be either in the form of an array or a list. Returns this Geometry's bounding box. If this Geometry is the empty point, returns an empty Point. If the Geometry is a point, returns a non-empty Point. Otherwise, returns a Polygon whose points are (minx, miny), (maxx, miny), (maxx, maxy), (minx, maxy), (minx, miny). NumGeometries Returns the number of Geometries in a Geometry Collection, or 1, if the geometry is not a collection NumPoints Returns the count of this geometry's vertices. The geometries contained by composite geometries must be geometries. That is, they must implement NumPoints. Clarifies the subtype of geometry in string format in accordance with OGC convenction, but most internal identification simply uses the type identification. Specifies either a Point, Line, Polygon or Empty feature type for simple flow control Performs an operation with or on this Geometry's coordinates. If you are using this method to modify the point, be sure to call GeometryChanged() afterwards. Notice that you cannot use this method to modify this Geometry if its underlying CoordinateSequence's Get method returns a copy of the Coordinate, rather than the actual Coordinate stored (if it even stores Coordinates at all). The filter to apply to this Geometry's coordinates Performs an operation with or on this Geometry and its subelement Geometrys (if any). Only GeometryCollections and subclasses have subelement Geometry's. The filter to apply to this Geometry (and its children, if it is a GeometryCollection). Performs an operation with or on this Geometry and its component Geometry's. Only GeometryCollections and Polygons have component Geometry's; for Polygons they are the LinearRings of the shell and holes. The filter to apply to this Geometry. Returns a buffer region around this Geometry having the given width. The buffer of a Geometry is the Minkowski sum or difference of the Geometry with a disc of radius distance. The width of the buffer, interpreted according to the PrecisionModel of the Geometry. All points whose distance from this Geometry are less than or equal to distance. Buffer Returns a buffer region around this Geometry having the given width. The buffer of a Geometry is the Minkowski sum or difference of the Geometry with a disc of radius distance. The width of the buffer, interpreted according to the PrecisionModel of the Geometry. Cap Style to use for compute buffer. All points whose distance from this Geometry are less than or equal to distance. Buffer Returns a buffer region around this Geometry having the given width and with a specified number of segments used to approximate curves. The buffer of a Geometry is the Minkowski sum of the Geometry with a disc of radius distance. Curves in the buffer polygon are approximated with line segments. This method allows specifying the accuracy of that approximation. The width of the buffer, interpreted according to the PrecisionModel of the Geometry. The number of segments to use to approximate a quadrant of a circle. All points whose distance from this Geometry are less than or equal to distance. Buffer Returns a buffer region around this Geometry having the given width and with a specified number of segments used to approximate curves. The buffer of a Geometry is the Minkowski sum of the Geometry with a disc of radius distance. Curves in the buffer polygon are approximated with line segments. This method allows specifying the accuracy of that approximation. The width of the buffer, interpreted according to the PrecisionModel of the Geometry. The number of segments to use to approximate a quadrant of a circle. Cap Style to use for compute buffer. All points whose distance from this Geometry are less than or equal to distance. Clears any cached envelopes Given the specified test point, this returns the closest point in this geometry. ConvexHull Returns the smallest convex Polygon that contains all the points in the Geometry. This obviously applies only to Geometry s which contain 3 or more points. the minimum-area convex polygon containing this Geometry's points. Returns whether this Geometry is greater than, equal to, or less than another Geometry having the same class. A Geometry having the same class as this Geometry. A positive number, 0, or a negative number, depending on whether this object is greater than, equal to, or less than o, as defined in "Normal Form For Geometry" in the NTS Technical Specifications. Distance Returns the minimum distance between this Geometry and the Geometry g. The Geometry from which to compute the distance. Equals Returns true if the DE-9IM intersection matrix for the two Geometrys is T*F**FFF*. The Geometry with which to compare this Geometry. true if the two Geometrys are equal. EqualsExact Returns true if the two Geometrys are exactly equal, up to a specified tolerance. Two Geometries are exactly within a tolerance equal iff: they have the same class, they have the same values of Coordinates, within the given tolerance distance, in their internal Coordinate lists, in exactly the same order. If this and the other Geometrys are composites and any children are not Geometrys, returns false. The Geometry with which to compare this Geometry Distance at or below which two Coordinates will be considered equal. true if this and the other Geometry are of the same class and have equal internal data. EqualsExact Returns true if the two Geometrys are exactly equal. Two Geometries are exactly equal iff: they have the same class, they have the same values of Coordinates in their internal Coordinate lists, in exactly the same order. If this and the other Geometrys are composites and any children are not Geometrys, returns false. This provides a stricter test of equality than equals. The Geometry with which to compare this Geometry. true if this and the other Geometry are of the same class and have equal internal data. Notifies this Geometry that its Coordinates have been changed by an external party. When GeometryChanged is called, this method will be called for this Geometry and its component Geometries. Notifies this Geometry that its Coordinates have been changed by an external party (using a CoordinateFilter, for example). The Geometry will flush and/or update any information it has cached (such as its Envelope). GetGeometryN Returns an element Geometry from a GeometryCollection, or this, if the geometry is not a collection. The index of the geometry element. The n'th geometry contained in this geometry. IsWithinDistance Tests whether the distance from this Geometry to another is less than or equal to a specified value. the Geometry to check the distance to. the distance value to compare. true if the geometries are less than distance apart. Normalize Converts this Geometry to normal form (or canonical form ). Normal form is a unique representation for Geometry s. It can be used to test whether two Geometrys are equal in a way that is independent of the ordering of the coordinates within them. Normal form equality is a stronger condition than topological equality, but weaker than pointwise equality. The definitions for normal form use the standard lexicographical ordering for coordinates. "Sorted in order of coordinates" means the obvious extension of this ordering to sequences of coordinates. Returns the feature representation as GML 2.1.1 XML document. This XML document is based on Geometry.xsd schema. NO features or XLink are implemented here! Area Returns the area of this Geometry. Areal Geometries have a non-zero area. They override this function to compute the area. Others return 0.0 The area of the Geometry. Boundary Returns the boundary, or the empty point if this Geometry is empty. For a discussion of this function, see the OpenGIS Simple Features Specification. As stated in SFS Section 2.1.13.1, "the boundary of a Geometry is a set of Geometries of the next lower dimension." The closure of the combinatorial boundary of this Geometry. Returns the dimension of this Geometrys inherent boundary. The dimension of the boundary of the class implementing this interface, whether or not this object is the empty point. Returns Dimension.False if the boundary is the empty point. Centroid Computes the centroid of this Geometry. The centroid is equal to the centroid of the set of component Geometries of highest dimension (since the lower-dimension geometries contribute zero "weight" to the centroid). A Point which is the centroid of this Geometry. Coordinate Returns a vertex of this Geometry Dimension Gets or sets the DotSpatial.Geometries.Dimensions of this Geometry. EnvelopeInternal Returns the interior geometry Factory Gets the factory which contains the context in whcih this geometry was created InteriorPoint Computes an interior point of this Geometry. An interior point is guaranteed to lie in the interior of the Geometry, if it possible to calculate such a point exactly. Otherwise, the point may lie on the boundary of the point. IsEmpty Returns whether or not the set of points in this geometry is empty IsRectangle Essentially is false for anything other than a polygon, which does a check to see if the polygon in question is a rectangle. IsSimple Returns false if the Geometry not simple. Subclasses provide their own definition of "simple". If this Geometry is empty, returns true. In general, the SFS specifications of simplicity seem to follow the following rule: A Geometry is simple if the only self-intersections are at boundary points. For all empty Geometrys, IsSimple==true. IsValid Tests the validity of this Geometry. Subclasses provide their own definition of "valid" Length Returns the length of this Geometry. Linear geometries return their length. Areal geometries return their perimeter. Others return 0.0 There used to be a class for precision model stuff, but for Interface purposes, this will be communicated as a an enumeration which can later be converted into a full fledged PrecisionModel. SRID Gets/Sets the ID of the Spatial Reference System used by the Geometry. NTS supports Spatial Reference System information in the simple way defined in the SFS. A Spatial Reference System ID (SRID) is present in each Geometry object. Geometry provides basic accessor operations for this field, but no others. The SRID is represented as an integer. UserData Gets/Sets the user data object for this point, if any. A simple scheme for applications to add their own custom data to a Geometry. An example use might be to add an object representing a Coordinate Reference System. Notice that user data objects are not present in geometries created by construction methods. Creates a sort of default geometry object from the default geometry factory, or creates a new one if one doesn't exist yet. A predefined with == . Returns an element Geometry from a GeometryCollection, or this, if the geometry is not a collection. The index of the geometry element. The n'th geometry contained in this geometry. This returns the index'th BasicGeometry where index is between 0 and NumGeometries - 1. If there is only one geometry, this will return this object. An integer index between 0 and NumGeometries - 1 specifying the basic geometry A BasicGeometry representing only the specific sub-geometry specified Returns the minimum distance between this Geometry and the Geometry g. The Geometry from which to compute the distance. Tests whether the distance from this Geometry to another is less than or equal to a specified value. the Geometry to check the distance to. the distance value to compare. true if the geometries are less than distance apart. Given the specified test point, this returns the closest point in this geometry. Notifies this Geometry that its Coordinates have been changed by an external party (using a CoordinateFilter, for example). The Geometry will flush and/or update any information it has cached (such as its Envelope). Notifies this Geometry that its Coordinates have been changed by an external party. When GeometryChanged is called, this method will be called for this Geometry and its component Geometries. Returns true if the DE-9IM intersection matrix for the two Geometrys is FF*FF****. The Geometry with which to compare this Geometry. true if the two Geometrys are disjoint. Returns true if the DE-9IM intersection matrix for the two Geometrys is FT*******, F**T***** or F***T****. The Geometry with which to compare this Geometry. true if the two Geometrys touch; Returns false if both Geometrys are points. Returns true if disjoint returns false. The Geometry with which to compare this Geometry. true if the two Geometrys intersect. Returns true if the DE-9IM intersection matrix for the two Geometrys is T*T****** (for a point and a curve, a point and an area or a line and an area) 0******** (for two curves). The Geometry with which to compare this Geometry. true if the two Geometrys cross. For this function to return true, the Geometry s must be a point and a curve; a point and a surface; two curves; or a curve and a surface. Returns true if the DE-9IM intersection matrix for the two Geometrys is T*F**F***. The Geometry with which to compare this Geometry. true if this Geometry is within other. Returns true if the DE-9IM intersection matrix for the two Geometrys is T*T***T** (for two points or two surfaces) 1*T***T** (for two curves). The Geometry with which to compare this Geometry. true if the two Geometrys overlap. For this function to return true, the Geometry s must be two points, two curves or two surfaces. Returns true if this geometry covers the specified geometry. The Covers predicate has the following equivalent definitions: - Every point of the other geometry is a point of this geometry. - The DE-9IM Intersection Matrix for the two geometries is T*****FF* or *T****FF* or ***T**FF* or ****T*FF*. - g.CoveredBy(this) (Covers is the inverse of CoveredBy). Notice the difference between Covers and Contains: Covers is a more inclusive relation. In particular, unlike Contains it does not distinguish between points in the boundary and in the interior of geometries. For most situations, Covers should be used in preference to Contains. As an added benefit, Covers is more amenable to optimization, and hence should be more performant. The Geometry with which to compare this Geometry true if this Geometry covers Returns true if this geometry is covered by the specified geometry. The CoveredBy predicate has the following equivalent definitions: - Every point of this geometry is a point of the other geometry. - The DE-9IM Intersection Matrix for the two geometries is T*F**F*** or *TF**F*** or **FT*F*** or **F*TF***. - g.Covers(this) (CoveredBy is the inverse of Covers). Notice the difference between CoveredBy and Within: CoveredBy is a more inclusive relation. The Geometry with which to compare this Geometry. true if this Geometry is covered by . Returns true if the elements in the DE-9IM intersection matrix for the two Geometrys match the elements in intersectionPattern , which may be: 0 1 2 T ( = 0, 1 or 2) F ( = -1) * ( = -1, 0, 1 or 2) For more information on the DE-9IM, see the OpenGIS Simple Features Specification. The Geometry with which to compare this Geometry. The pattern against which to check the intersection matrix for the two Geometrys. true if the DE-9IM intersection matrix for the two Geometrys match intersectionPattern. Returns the DE-9IM intersection matrix for the two Geometrys. The Geometry with which to compare this Geometry A matrix describing the intersections of the interiors, boundaries and exteriors of the two Geometrys. Returns true if the DE-9IM intersection matrix for the two Geometrys is T*F**FFF*. The Geometry with which to compare this Geometry. true if the two Geometrys are equal. Returns the Well-known Text representation of this Geometry. For a definition of the Well-known Text format, see the OpenGIS Simple Features Specification. The Well-known Text representation of this Geometry. Returns the Well-known Binary representation of this Geometry. For a definition of the Well-known Binary format, see the OpenGIS Simple Features Specification. The Well-known Binary representation of this Geometry. Returns the feature representation as GML 2.1.1 XML document. This XML document is based on Geometry.xsd schema. NO features or XLink are implemented here! Returns a GML string for this geometry A String with the GML Returns the smallest convex Polygon that contains all the points in the Geometry. This obviously applies only to Geometry s which contain 3 or more points. the minimum-area convex polygon containing this Geometry's points. Returns a Geometry representing the points shared by this Geometry and other. The Geometry with which to compute the intersection. The points common to the two Geometrys. Forces the cached envelope to be re-calculated using the coordinates. Clears any cached envelopes Returns a Geometry representing all the points in this Geometry and other. The Geometry with which to compute the union. A set combining the points of this Geometry and the points of other. Returns a Geometry representing the points making up this Geometry that do not make up other. This method returns the closure of the resultant Geometry. The Geometry with which to compute the difference. The point set difference of this Geometry with other. Returns a set combining the points in this Geometry not in other, and the points in other not in this Geometry. This method returns the closure of the resultant Geometry. The Geometry with which to compute the symmetric difference. The point set symmetric difference of this Geometry with other. Returns true if the two Geometrys are exactly equal, up to a specified tolerance. Two Geometries are exactly within a tolerance equal iff: they have the same class, they have the same values of Coordinates, within the given tolerance distance, in their internal Coordinate lists, in exactly the same order. If this and the other Geometrys are composites and any children are not Geometrys, returns false. The Geometry with which to compare this Geometry Distance at or below which two Coordinates will be considered equal. true if this and the other Geometry are of the same class and have equal internal data. Returns true if the two Geometrys are exactly equal. Two Geometries are exactly equal iff: they have the same class, they have the same values of Coordinates in their internal Coordinate lists, in exactly the same order. If this and the other Geometrys are composites and any children are not Geometrys, returns false. This provides a stricter test of equality than equals. The Geometry with which to compare this Geometry. true if this and the other Geometry are of the same class and have equal internal data. Performs an operation with or on this Geometry's coordinates. If you are using this method to modify the point, be sure to call GeometryChanged() afterwards. Notice that you cannot use this method to modify this Geometry if its underlying CoordinateSequence's Get method returns a copy of the Coordinate, rather than the actual Coordinate stored (if it even stores Coordinates at all). The filter to apply to this Geometry's coordinates Performs an operation with or on this Geometry and its subelement Geometrys (if any). Only GeometryCollections and subclasses have subelement Geometry's. The filter to apply to this Geometry (and its children, if it is a GeometryCollection). Performs an operation with or on this Geometry and its component Geometry's. Only GeometryCollections and Polygons have component Geometry's; for Polygons they are the LinearRings of the shell and holes. The filter to apply to this Geometry. Converts this Geometry to normal form (or canonical form ). Normal form is a unique representation for Geometry s. It can be used to test whether two Geometrys are equal in a way that is independent of the ordering of the coordinates within them. Normal form equality is a stronger condition than topological equality, but weaker than pointwise equality. The definitions for normal form use the standard lexicographical ordering for coordinates. "Sorted in order of coordinates" means the obvious extension of this ordering to sequences of coordinates. Returns whether this Geometry is greater than, equal to, or less than another Geometry. If their classes are different, they are compared using the following ordering: Point (lowest), MultiPoint, LineString, LinearRing, MultiLineString, Polygon, MultiPolygon, GeometryCollection (highest). If the two Geometrys have the same class, their first elements are compared. If those are the same, the second elements are compared, etc. A Geometry with which to compare this Geometry A positive number, 0, or a negative number, depending on whether this object is greater than, equal to, or less than o, as defined in "Normal Form For Geometry" in the NTS Technical Specifications. Returns whether this Geometry is greater than, equal to, or less than another Geometry having the same class. A Geometry having the same class as this Geometry. A positive number, 0, or a negative number, depending on whether this object is greater than, equal to, or less than o, as defined in "Normal Form For Geometry" in the NTS Technical Specifications. Returns a buffer region around this Geometry having the given width and with a specified number of segments used to approximate curves. The buffer of a Geometry is the Minkowski sum of the Geometry with a disc of radius distance. Curves in the buffer polygon are approximated with line segments. This method allows specifying the accuracy of that approximation. The width of the buffer, interpreted according to the PrecisionModel of the Geometry. The number of segments to use to approximate a quadrant of a circle. Cap Style to use for compute buffer. All points whose distance from this Geometry are less than or equal to distance. Returns a buffer region around this Geometry having the given width and with a specified number of segments used to approximate curves. The buffer of a Geometry is the Minkowski sum of the Geometry with a disc of radius distance. Curves in the buffer polygon are approximated with line segments. This method allows specifying the accuracy of that approximation. The width of the buffer, interpreted according to the PrecisionModel of the Geometry. The number of segments to use to approximate a quadrant of a circle. All points whose distance from this Geometry are less than or equal to distance. Returns a buffer region around this Geometry having the given width. The buffer of a Geometry is the Minkowski sum or difference of the Geometry with a disc of radius distance. The width of the buffer, interpreted according to the PrecisionModel of the Geometry. Cap Style to use for compute buffer. All points whose distance from this Geometry are less than or equal to distance. Returns a buffer region around this Geometry having the given width. The buffer of a Geometry is the Minkowski sum or difference of the Geometry with a disc of radius distance. The width of the buffer, interpreted according to the PrecisionModel of the Geometry. All points whose distance from this Geometry are less than or equal to distance. Returns true if other.within(this) returns true. The Geometry with which to compare this Geometry. true if this Geometry contains other. This is convenient for casting troublesome basic geometries into fully fledged geometries without having to parse them each time. It uses the constructors, and effectively the default factory. Returns true if the array contains any non-empty Geometrys. an array of Geometrys; no elements may be null true if any of the Geometrys IsEmpty methods return false. Returns true if the array contains any null elements. an array to validate. true if any of arrays elements are null. Returns the Well-known Text representation of this Geometry. For a definition of the Well-known Text format, see the OpenGIS Simple Features Specification. The Well-known Text representation of this Geometry. Allows each geometry to control any custom behavior that cannot be solved with MemberwiseClone. The Coordinates of the geometry are already duplicated. Returns whether the two Geometrys are equal, from the point of view of the EqualsExact method. Called by EqualsExact . In general, two Geometry classes are considered to be "equivalent" only if they are the same class. An exception is LineString , which is considered to be equivalent to its subclasses. The Geometry with which to compare this Geometry for equality. true if the classes of the two Geometry s are considered to be equal by the equalsExact method. Throws an exception if g's class is GeometryCollection. (Its subclasses do not trigger an exception). The Geometry to check; throws ArgumentException if g is a GeometryCollection but not one of its subclasses. Returns the minimum and maximum x and y values in this Geometry , or a null Envelope if this Geometry is empty. Unlike EnvelopeInternal, this method calculates the Envelope each time it is called; EnvelopeInternal caches the result of this method. This Geometrys bounding box; if the Geometry is empty, Envelope.IsNull will return true. Returns the first non-zero result of CompareTo encountered as the two Collections are iterated over. If, by the time one of the iterations is complete, no non-zero result has been encountered, returns 0 if the other iteration is also complete. If b completes before a, a positive number is returned; if a before b, a negative number. The left hand side ArrayList to compare. The right hand side ArrayList to compare. The first non-zero compareTo result, if any; otherwise, zero. Tests the specified IEnvelope for an intersection with this Geometry The IEnvelope to test True if the envelope intersects this geometry Tests the specified location to see if it intersects with this geometry The double X coordinate to test The double Y coordinate to test Boolean, true if the specified coordinates intersect this geometry Returns this Geometrys bounding box. If this Geometry is the empty point, returns an empty Point. If the Geometry is a point, returns a non-empty Point. Otherwise, returns a Polygon whose points are (minx, miny), (maxx, miny), (maxx, maxy), (minx, maxy), (minx, miny). An empty Point (for empty Geometrys), a Point (for Points) or a Polygon (in all other cases). Gets the factory which contains the context in which this point was created. The factory for this point. Gets/Sets the user data object for this point, if any. A simple scheme for applications to add their own custom data to a Geometry. An example use might be to add an object representing a Coordinate Reference System. notice that user data objects are not present in geometries created by construction methods. Gets/Sets the ID of the Spatial Reference System used by the Geometry. NTS supports Spatial Reference System information in the simple way defined in the SFS. A Spatial Reference System ID (SRID) is present in each Geometry object. Geometry provides basic accessor operations for this field, but no others. The SRID is represented as an integer. Clarifies which subtype of geometry we are working with Returns the PrecisionModel used by the Geometry. the specification of the grid of allowable points, for this Geometry and all other Geometrys. Returns a vertex of this Geometry. a Coordinate which is a vertex of this Geometry. Returns null if this Geometry is empty. Returns this Geometry s vertices. If you modify the coordinates in this array, be sure to call GeometryChanged afterwards. The Geometrys contained by composite Geometrys must be Geometry's; that is, they must implement Coordinates. The vertices of this Geometry. Returns the count of this Geometrys vertices. The Geometry s contained by composite Geometrys must be Geometry's; that is, they must implement NumPoints. The number of vertices in this Geometry. Returns the number of Geometryes in a GeometryCollection, or 1, if the geometry is not a collection. Returns false if the Geometry not simple. Subclasses provide their own definition of "simple". If this Geometry is empty, returns true. In general, the SFS specifications of simplicity seem to follow the following rule: A Geometry is simple if the only self-intersections are at boundary points. For all empty Geometrys, IsSimple==true. false if this Geometry has any points of self-tangency, self-intersection or other anomalous points. Tests the validity of this Geometry. Subclasses provide their own definition of "valid". true if this Geometry is valid. Returns whether or not the set of points in this Geometry is empty. true if this Geometry equals the empty point. Returns the area of this Geometry. Areal Geometries have a non-zero area. They override this function to compute the area. Others return 0.0 The area of the Geometry. Returns the length of this Geometry. Linear geometries return their length. Areal geometries return their perimeter. They override this function to compute the length. Others return 0.0 The length of the Geometry. Computes an interior point of this Geometry. An interior point is guaranteed to lie in the interior of the Geometry, if it possible to calculate such a point exactly. Otherwise, the point may lie on the boundary of the point. A Point which is in the interior of this Geometry. Returns the dimension of this Geometry. The dimension of the class implementing this interface, whether or not this object is the empty point. Returns the dimension of this Geometrys inherent boundary. The dimension of the boundary of the class implementing this interface, whether or not this object is the empty point. Returns Dimension.False if the boundary is the empty point. Returns the minimum and maximum x and y values in this Geometry , or a null Envelope if this Geometry is empty. This Geometrys bounding box; if the Geometry is empty, Envelope.IsNull will return true. Gets the IEnvelope that contains this geometry Returns the boundary, or the empty point if this Geometry is empty. For a discussion of this function, see the OpenGIS Simple Features Specification. As stated in SFS Section 2.1.13.1, "the boundary of a Geometry is a set of Geometries of the next lower dimension." The closure of the combinatorial boundary of this Geometry. Computes the centroid of this Geometry. The centroid is equal to the centroid of the set of component Geometries of highest dimension (since the lower-dimension geometries contribute zero "weight" to the centroid). A Point which is the centroid of this Geometry. This will be overridden by the specific feature type since this is abstract Geometry classes support the concept of applying an IGeometryComponentFilter filter to the Geometry. The filter is applied to every component of the Geometry which is itself a Geometry. (For instance, all the LinearRings in Polygons are visited.) An IGeometryComponentFilter filter can either record information about the Geometry or change the Geometry in some way. IGeometryComponentFilter is an example of the Gang-of-Four Visitor pattern. Performs an operation with or on geom. A Geometry to which the filter is applied. Basic implementation of GeometryCollection. Specific topology functions for Mutigeometry code Returns the number of geometries contained by this . Returns the iTh element in the collection. Return true if all features in collection are of the same type. Gets a System.Array of all the geometries in this collection Represents an empty GeometryCollection. Internal representation of this GeometryCollection. The Geometrys for this GeometryCollection, or null or an empty array to create the empty point. Elements may be empty Geometrys, but not nulls. For create this is used a standard with == . This should only be used by derived classes because it does not actually set the geometries This should only be used by derived classes because it does not actually set the geometries Specifies the factory that should be used when creating shapes in this multigeometry The Geometrys for this GeometryCollection, or null or an empty array to create the empty point. Elements may be empty Geometrys, but not nulls. If the input geometry is a singular basic geometry, this will become a collection of 1 geometry. If the input geometry is a multi- basic geometry, this will simply ensure that each member is upgraded to a full geometry. Creates a new Geometry Collection Given the specified test point, this checks each segment, and will return the closest point on the specified segment. The point to test. This returns the index'th BasicGeometry where index is between 0 and NumGeometries - 1. If there is only one geometry, this will return this object. An integer index between 0 and NumGeometries - 1 specifying the basic geometry A BasicGeometry representing only the specific sub-geometry specified Returns a GeometryCollectionEnumerator: this IEnumerator returns the parent geometry as first element. In most cases is more useful the code geometryCollectionInstance.Geometries.GetEnumerator(): this returns an IEnumerator over geometries composing GeometryCollection. Handles the duplication process for geometry collections Collects all coordinates of all subgeometries into an Array. Notice that while changes to the coordinate objects themselves may modify the Geometries in place, the returned Array as such is only a temporary container which is not synchronized back. The collected coordinates. Uses an Enumeration to clarify the type of geometry Returns the area of this GeometryCollection. Returns the length of this GeometryCollection. Return true if all features in collection are of the same type. Returns the iTh element in the collection. Returns the number of geometries contained by this . Gets the Envelope that envelops this GeometryCollection Iterates over all Geometry's in a GeometryCollection. Implements a pre-order depth-first traversal of the GeometryCollection (which may be nested). The original GeometryCollection is returned as well (as the first object), as are all sub-collections. It is simple to ignore the GeometryCollection objects if they are not needed. The number of Geometrys in the the GeometryCollection. The GeometryCollection being iterated over. Indicates whether or not the first element (the GeometryCollection ) has been returned. The index of the Geometry that will be returned when next is called. The iterator over a nested GeometryCollection, or null if this GeometryCollectionIterator is not currently iterating over a nested GeometryCollection. Constructs an iterator over the given GeometryCollection. The collection over which to iterate; also, the first element returned by the iterator. A GeometryCollectionNotSupportedException Class Creates a new instance of GeometryCollectionNotSupportedException Supplies a set of utility methods for building Geometry objects from lists of Coordinates. Factory for Geometry stuff Generic constructor that parses a list and tries to form a working object that implements MapWindow.Interfaces.IGeometry some list of things An object that implements DotSpatial.Geometries.IGeometry Method to produce a point given a coordinate An object that implements DotSpatial.Geometries.ICoordinate An object that implements DotSpatial.Geometries.IPoint Creates a new object that implements DotSpatial.Geometries.MultiLineString given an array of objects that implement DotSpatial.Geometries.ILineStringBase The Array of objects that implement DotSpatial.Geometries.IlineStringBase A new MultiLineString that implements IMultiLineString Creates an object that implements DotSpatial.Geometries.IGeometryCollection from an array of objects that implement DotSpatial.Geometries.IGeometry An array of objects that implement DotSpatial.Geometries.IGeometry A new object that implements DotSpatial.Geometries.IGeometryCollection Creates an object that implements DotSpatial.Geometries.IMultiPolygon from an array of objects that implement DotSpatial.Geometries.IPolygon An Array of objects that implement DotSpatial.Geometries.IPolygon An object that implements DotSpatial.Geometries.IMultiPolygon Creates an object that implements DotSpatial.Geometries.ILinearRing from an array of DotSpatial.Geometries.ICoordinates An array of objects that implement ICoordinate An object that implements DotSpatial.Geometries.ILinearRing Creates an object that implements DotSpatial.Geometries.IMultiPoint from an array of objects that implement DotSpatial.Geometries.ICoordinate An array of objects that implement DotSpatial.Geometries.ICoordinate An object that implements DotSpatial.Geometries.IMultiPoint Creates an object that implements DotSpatial.Geometries.IMultiPoint from an array of objects that implement DotSpatial.Geometries.ICoordinate An array of objects that implement DotSpatial.Geometries.ICoordinate An object that implements DotSpatial.Geometries.IMultiPoint Creates an object that implements DotSpatial.Geometries.ILineString from an array of objects that implement DotSpatial.Geometries.ICoordinate An array of objects that implement DotSpatial.Geometries.ICoordinate A DotSpatial.Geometries.ILineString Creates an object that implements DotSpatial.Geometries.IGeometry that is a copy of the specified object that implements DotSpatial.Geometries.IGeometry An object that implements DotSpatial.Geometries.IGeometry An copy of the original object that implements DotSpatial.Geometries.IGeometry Creates an object that implements DotSpatial.Geometries.IPolygon given a specified DotSpatial.Geometries.ILinearRing shell and an array of DotSpatial.Geometries.ILinearRing that represent the holes The outer perimeter of the polygon, represented by an object that implements DotSpatial.Geometries.ILinearRing The interior holes in the polygon, represented by an array of objects that implements DotSpatial.Geometries.ILinearRing An object that implements DotSpatial.Geometries.IPolygon Floating reference CoordinateSequenceFactory that can manufacture a coordinate sequence A predefined with == . A predefined with == . A shortcut for . A predefined with == . A predefined with == . Constructs a GeometryFactory that generates Geometries having the given PrecisionModel, spatial-reference ID, and CoordinateSequence implementation. Constructs a GeometryFactory object from any valid IGeometryFactory interface Constructs a GeometryFactory pertaining to a specific _coordinateSequenceFactory using any valid IGeometryFactory and ICoordinateSequenceFactory interface An IGeometryFactory Interface An ICoordianteSequenceFactory interface Constructs a GeometryFactory that generates Geometries having the given CoordinateSequence implementation, a double-precision floating PrecisionModel and a spatial-reference ID of 0. Constructs a GeometryFactory that generates Geometries having the given {PrecisionModel} and the default CoordinateSequence implementation. The PrecisionModel to use. Constructs a GeometryFactory that generates Geometries having the given PrecisionModel and spatial-reference ID, and the default CoordinateSequence implementation. The PrecisionModel to use. The SRID to use. Constructs a GeometryFactory that generates Geometries having a floating PrecisionModel and a spatial-reference ID of 0. Creates a Point using the given Coordinate; a null Coordinate will create an empty Geometry. Creates a MultiLineString using the given LineStrings; a null or empty array will create an empty MultiLineString. LineStrings, each of which may be empty but not null- Creates a GeometryCollection using the given Geometries; a null or empty array will create an empty GeometryCollection. Geometries, each of which may be empty but not null. Creates a MultiPolygon using the given Polygons; a null or empty array will create an empty Polygon. The polygons must conform to the assertions specified in the OpenGIS Simple Features Specification for SQL. Polygons, each of which may be empty but not null. Creates a LinearRing using the given Coordinates; a null or empty array will create an empty LinearRing. The points must form a closed and simple linestring. Consecutive points must not be equal. An array without null elements, or an empty array, or null. Creates a MultiPoint using the given Points; a null or empty array will create an empty MultiPoint. An array without null elements, or an empty array, or null. Creates an object that implements DotSpatial.Geometries.IMultiPoint from an array of objects that implement DotSpatial.Geometries.ICoordinate An array of objects that implement DotSpatial.Geometries.ICoordinate An object that implements DotSpatial.Geometries.IMultiPoint Constructs a Polygon with the given exterior boundary and interior boundaries. The outer boundary of the new Polygon, or null or an empty LinearRing if the empty point is to be created. The inner boundaries of the new Polygon, or null or empty LinearRing s if the empty point is to be created. Build an appropriate Geometry, MultiGeometry, or GeometryCollection to contain the Geometrys in it. If geomList contains a single Polygon, the Polygon is returned. If geomList contains several Polygons, a MultiPolygon is returned. If geomList contains some Polygons and some LineStrings, a GeometryCollection is returned. If geomList is empty, an empty GeometryCollection is returned. Notice that this method does not "flatten" Geometries in the input, and hence if any MultiGeometries are contained in the input a GeometryCollection containing them will be returned. The Geometrys to combine. A Geometry of the "smallest", "most type-specific" class that can contain the elements of geomList. Creates a LineString using the given Coordinates; a null or empty array will create an empty LineString. Consecutive points must not be equal. An array without null elements, or an empty array, or null. A clone of g based on a CoordinateSequence created by this GeometryFactory's CoordinateSequenceFactory. Converts the List to an array. The List of Points to convert. The List in array format. Converts the List to an array. The list of Geometry's to convert. The List in array format. Converts the List to an array. The List of LinearRings to convert. The List in array format. Converts the List to an array. The List of LineStrings to convert. The List in array format. Converts the List to an array. The List of Polygons to convert. The List in array format. Converts the List to an array. The List of MultiPolygons to convert. The List in array format. Converts the List to an array. The List of MultiLineStrings to convert. The List in array format. Converts the List to an array. The List of MultiPoints to convert. The List in array format. If the Envelope is a null Envelope, returns an empty Point. If the Envelope is a point, returns a non-empty Point. If the Envelope is a rectangle, returns a Polygon whose points are (minx, miny), (maxx, miny), (maxx, maxy), (minx, maxy), (minx, miny). The Envelope to convert to a Geometry. An empty Point (for null Envelope s), a Point (when min x = max x and min y = max y) or a Polygon (in all other cases) throws a TopologyException if coordinates is not a closed linestring, that is, if the first and last coordinates are not equal. Creates a MultiPoint using the given CoordinateSequence; a null or empty CoordinateSequence will create an empty MultiPoint. A CoordinateSequence possibly empty, or null. A default IGeometryFactory. Returns the Fixed geometry factory The floating IGeometryFactory A floating Single IGeometryFactory Returns the PrecisionModel that Geometries created by this factory will be associated with. A GeometryEditorOperation which modifies the coordinate list of a Geometry. Operates on Geometry subclasses which contains a single coordinate list. A interface which specifies an edit operation for Geometries. Supports creating a new Geometry which is a modification of an existing one. Geometry objects are intended to be treated as immutable. This class allows you to "modify" a Geometry by traversing it and creating a new Geometry with the same overall structure but possibly modified components. The following kinds of modifications can be made: The values of the coordinates may be changed. Changing coordinate values may make the result Geometry invalid; this is not checked by the GeometryEditor. The coordinate lists may be changed (e.g. by adding or deleting coordinates). The modifed coordinate lists must be consistent with their original parent component (e.g. a LinearRing must always have at least 4 coordinates, and the first and last coordinate must be equal). Components of the original point may be deleted (e.g. holes may be removed from a Polygon, or LineStrings removed from a MultiLineString). Deletions will be propagated up the component tree appropriately. Notice that all changes must be consistent with the original Geometry's structure (e.g. a Polygon cannot be collapsed into a LineString). The resulting Geometry is not checked for validity. If validity needs to be enforced, the new Geometry's IsValid should be checked. The factory used to create the modified Geometry. Creates a new GeometryEditor object which will create an edited Geometry with the same {GeometryFactory} as the input Geometry. Creates a new GeometryEditor object which will create the edited Geometry with the given GeometryFactory. The GeometryFactory to create the edited Geometry with. Edit the input Geometry with the given edit operation. Clients will create subclasses of GeometryEditorOperation or CoordinateOperation to perform required modifications. The Geometry to edit. The edit operation to carry out. A new Geometry which is the result of the editing. A GeometryEditorOperation which modifies the coordinate list of a Geometry. Operates on Geometry subclasses which contains a single coordinate list. A interface which specifies an edit operation for Geometries. Edits a Geometry by returning a new Geometry with a modification. The returned Geometry might be the same as the Geometry passed in. The Geometry to modify. The factory with which to construct the modified Geometry (may be different to the factory of the input point). A new Geometry which is a modification of the input Geometry. Edits the array of Coordinates from a Geometry. The coordinate array to operate on. The point containing the coordinate list. An edited coordinate array (which may be the same as the input). Writes the GML representation of the features of Topology model. Uses GML 2.1.1 Geometry.xsd schema for base for features. Returns an XmlReader with feature informations. Use XmlDocument.Load(XmlReader) for obtain a XmlDocument to work. Writes a GML feature into a generic Stream, such a FileStream or other streams. Sets corrent length for Byte Stream. Sets corrent length for Byte Stream. Formatter for double values of coordinates This is the simpler interface to implement This is a BasicGeometry that contains information about a specific point. The easier way to do this is have the IPoint inherit the IBasicGeometry and the store implementations for ICoordinate. Adds any topology functions to the basic Vector ICoordinate Return HashCode. A Measure coordinate A 1D coordinate only has a valid X. A 2D coordinate has X and Y, while a 3D coordinate has X, Y, and Z. Presumably this is open ended and could support higher coordinates, but this coordinate is not responsible for storing values beyond its dimension and may cause exceptions if a value higher than the dimension is used. Gets a double value for the specified zero based ordinate. The zero based integer ordinate. A double value. Gets or sets the values as a one dimensional array of doubles. The X coordinate The Y coordinate The Z coordinate This supports some of the basic data-related capabilities of a polygon, but no topology functions. Each of these uses the specifically different nomenclature so that the parallel concepts in a full Polygon can return the appropriate datatype. Since Polygon will Implement IPolygonBase, it is the responsibility of the developer to perform the necessary casts when returning this set from the more complete topology classes. Gets the list of Interior Rings in the form of ILineStringBase objects Gets the exterior ring of the polygon as an ILineStringBase. Gets the count of holes or interior rings ICoordinateF Gets or sets the X coordinate using a single precision floating point Gets or sets the Y coordinate using a single precision floating point value Gets or sets the Z coordinate using a single precision floating point value Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geometry. A coordinate filter can either record information about each coordinate or change the coordinate in some way. Coordinate filters implement the interface ICoordinateFilter. ICoordinateFilter is an example of the Gang-of-Four Visitor pattern. Coordinate filters can be used to implement such things as coordinate transformations, centroid and envelope computation, and many other functions. Performs an operation with or on coord. Coordinate to which the filter is applied. GeometryCollection classes support the concept of applying a IGeometryFilter to the Geometry. The filter is applied to every element Geometry. A IGeometryFilter can either record information about the Geometry or change the Geometry in some way. IGeometryFilter is an example of the Gang-of-Four Visitor pattern. Performs an operation with or on geom. A Geometry to which the filter is applied. A Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix. This class can used to represent both computed DE-9IM's (like 212FF1FF2) as well as patterns for matching them (like T*T******). Methods are provided to: Set and query the elements of the matrix in a convenient fashion convert to and from the standard string representation (specified in SFS Section 2.1.13.2). Test to see if a matrix matches a given pattern string. For a description of the DE-9IM, see the OpenGIS Simple Features Specification for SQL. Adds one matrix to another. Addition is defined by taking the maximum dimension value of each position in the summand matrices. The matrix to add. Changes the value of one of this IntersectionMatrixs elements. The row of this IntersectionMatrix, indicating the interior, boundary or exterior of the first Geometry The column of this IntersectionMatrix, indicating the interior, boundary or exterior of the second Geometry The new value of the element Changes the elements of this IntersectionMatrix to the dimension symbols in dimensionSymbols. Nine dimension symbols to which to set this IntersectionMatrix s elements. Possible values are {T, F, *, 0, 1, 2} Changes the specified element to minimumDimensionValue if the element is less. The row of this IntersectionMatrix , indicating the interior, boundary or exterior of the first Geometry. The column of this IntersectionMatrix , indicating the interior, boundary or exterior of the second Geometry. The dimension value with which to compare the element. The order of dimension values from least to greatest is True, False, Dontcare, 0, 1, 2. If row >= 0 and column >= 0, changes the specified element to minimumDimensionValue if the element is less. Does nothing if row is smaller to 0 or column is smaller to 0. For each element in this IntersectionMatrix, changes the element to the corresponding minimum dimension symbol if the element is less. Nine dimension symbols with which to compare the elements of this IntersectionMatrix. The order of dimension values from least to greatest is Dontcare, True, False, 0, 1, 2. Changes the elements of this IntersectionMatrix to dimensionValue. The dimension value to which to set this IntersectionMatrix s elements. Possible values True, False, Dontcare, 0, 1, 2}. Returns the value of one of this IntersectionMatrixs elements. The row of this IntersectionMatrix, indicating the interior, boundary or exterior of the first Geometry. The column of this IntersectionMatrix, indicating the interior, boundary or exterior of the second Geometry. The dimension value at the given matrix position. Returns true if this IntersectionMatrix is FF*FF****. true if the two Geometrys related by this IntersectionMatrix are disjoint. Returns true if isDisjoint returns false. true if the two Geometrys related by this IntersectionMatrix intersect. Returns true if this IntersectionMatrix is FT*******, F**T***** or F***T****. The dimension of the first Geometry. The dimension of the second Geometry. true if the two Geometry s related by this IntersectionMatrix touch; Returns false if both Geometrys are points. Returns true if this IntersectionMatrix is T*T****** (for a point and a curve, a point and an area or a line and an area) 0******** (for two curves). The dimension of the first Geometry. The dimension of the second Geometry. true if the two Geometry s related by this IntersectionMatrix cross. For this function to return true, the Geometrys must be a point and a curve; a point and a surface; two curves; or a curve and a surface. Returns true if this IntersectionMatrix is T*F**F***. true if the first Geometry is within the second. Returns true if this IntersectionMatrix is T*****FF*. true if the first Geometry contains the second. Returns true if this IntersectionMatrix is T*****FF* or *T****FF* or ***T**FF* or ****T*FF*. true if the first Geometry covers the second Returns true if this IntersectionMatrix is T*F**FFF*. The dimension of the first Geometry. The dimension of the second Geometry. true if the two Geometry s related by this IntersectionMatrix are equal; the Geometrys must have the same dimension for this function to return true. Returns true if this IntersectionMatrix is T*T***T** (for two points or two surfaces) 1*T***T** (for two curves). The dimension of the first Geometry. The dimension of the second Geometry. true if the two Geometry s related by this IntersectionMatrix overlap. For this function to return true, the Geometrys must be two points, two curves or two surfaces. Returns whether the elements of this IntersectionMatrix satisfies the required dimension symbols. Nine dimension symbols with which to compare the elements of this IntersectionMatrix. Possible values are {T, F, *, 0, 1, 2}. true if this IntersectionMatrix matches the required dimension symbols. Transposes this IntersectionMatrix. This IntersectionMatrix as a convenience, Returns a nine-character String representation of this IntersectionMatrix. The nine dimension symbols of this IntersectionMatrix in row-major order. A closed, non-self intersecting Linestring This adds the basic functionality of a Retrieves a topologically complete IPoint for the n'th coordinate in the 0 based index of point values. Integer index specifying the point to retrieve IPoint to retrieve Returns an ILineString that has its coordinates completely reversed Returns true if the given point is a vertex of this LineString. The Coordinate to check. true if pt is one of this LineString's vertices. Gets a topologically complete IPoint for the first coordinate Gets a topologically complete IPoint for the last coordinate If the first coordinate is the same as the final coordinate, then the linestring is closed. If the coordinates listed for the linestring are both closed and simple then they qualify as a linear ring. Returns the value of the angle between the and the . Represents a line segment defined by two Coordinates. Provides methods to compute various geometric properties and relationships of line segments. This class is designed to be easily mutable (to the extent of having its contained points public). This supports a common pattern of reusing a single LineSegment object as a way of computing segment properties on the segments defined by arrays or lists of Coordinates. This is a low-level place holder for a linestring with only two points. This does not inherit geometry (Use ILineString for those features). The Idea is that this provides just enough information to communicate the definition of a LineSegment. The first of two coordinates that defines the segment The second of two endpoints that defines the segment Returns an ICoordinate for the point specified by index i. Integer point index. 0 returns the first point, 1 returns the second. ICoordinate Sets the two coordinates to match the coordinates in the specified ILineSegment Sets the two coordinates of this ILineString based on the ICoordinate values passed. An ICoordinate that specifies the startpoint of the segment An ICoordinate that specifies the location of the endpoint of the segment Determines the orientation of a LineSegment relative to this segment. The concept of orientation is specified as follows: Given two line segments A and L, A is to the left of a segment L if A lies wholly in the closed half-plane lying to the left of L A is to the right of a segment L if A lies wholly in the closed half-plane lying to the right of L otherwise, A has indeterminate orientation relative to L. This happens if A is collinear with L or if A crosses the line determined by L. The LineSegment to compare. 1 if seg is to the left of this segment, -1 if seg is to the right of this segment, 0 if seg has indeterminate orientation relative to this segment. Reverses the direction of the line segment. Puts the line segment into a normalized form. This is useful for using line segments in maps and indexes when topological equality rather than exact equality is desired. Computes the distance between this line segment and another one. Computes the distance between this line segment and a point. Computes the perpendicular distance between the (infinite) line defined by this line segment and a point. Compute the projection factor for the projection of the point p onto this LineSegment. The projection factor is the constant k by which the vector for this segment must be multiplied to equal the vector for the projection of p. Compute the projection of a point onto the line determined by this line segment. Notice that the projected point may lie outside the line segment. If this is the case, the projection factor will lie outside the range [0.0, 1.0]. Project a line segment onto this line segment and return the resulting line segment. The returned line segment will be a subset of the target line line segment. This subset may be null, if the segments are oriented in such a way that there is no projection. Notice that the returned line may have zero length (i.e. the same endpoints). This can happen for instance if the lines are perpendicular to one another. The line segment to project. The projected line segment, or null if there is no overlap. Computes the closest point on this line segment to another point. The point to find the closest point to. A Coordinate which is the closest point on the line segment to the point p. Computes the closest points on a line segment. A pair of Coordinates which are the closest points on the line segments. Computes an intersection point between two segments, if there is one. There may be 0, 1 or many intersection points between two segments. If there are 0, null is returned. If there is 1 or more, a single one is returned (chosen at the discretion of the algorithm). If more information is required about the details of the intersection, the {RobustLineIntersector} class should be used. An intersection point, or null if there is none. Performs an intersection of this line segment with the specified envelope The envelope to compare against An ILineSegment, or null if there is no intersection. Determines if any portion of this segment intersects the specified extent. The Boolean, true if this line segment intersects the specified envelope Returns true if other is topologically equal to this LineSegment (e.g. irrespective of orientation). A LineSegment with which to do the comparison. true if other is a LineSegment with the same values for the x and y ordinates. Returns Well Known Text for a LineString with just 2 points String: Well Known Text Computes the length of the line segment. The length of the line segment. Tests whether the segment is horizontal. true if the segment is horizontal. Tests whether the segment is vertical. true if the segment is vertical. The angle this segment makes with the x-axis (in radians). IMatrix Performs the matrix multiplication against the specified matrix Gets the number of rows Gets the number of columns Operations on 3D vectors can be carried out using a 4D Matrix. This interface provides access to methods that are specific to 3D vector opperations. IMatrix4 Multiplies every value in the specified n x m matrix by the specified double inScalar. The double precision floating point to multiply all the members against A new n x m matrix This replaces the underlying general multiplication with a more specific type. Gets or sets the values for this matrix of double precision coordinates Specifies amount to rotate Multiplies the current matrix by a rotation matrix corresponding to the specified angle to create rotation in the Z direction. The angle to rotate in degrees. Rotates the current matrix around the Y axis by multiplying the current matrix by a rotation matrix. Translates the matrix by the specified amount in each of the directions by multiplying by a translation matrix created from the specified values. The translation in the X coordinate The translation in the Y coordinate The translation in the Z coordinate A type specific Geometry collection that deals with ILineStrings Changes the default indexer to assume that the members are ILineString instead of simply IGeometry A type specific MultiGeometry that specifically uses points Gets or sets the point that resides at the specified index A zero-based integer index specifying the point to get or set specifically for handling A Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix. This class can used to represent both computed DE-9IM's (like 212FF1FF2) as well as patterns for matching them (like T*T******). Methods are provided to: Set and query the elements of the matrix in a convenient fashion convert to and from the standard string representation (specified in SFS Section 2.1.13.2). Test to see if a matrix matches a given pattern string. For a description of the DE-9IM, see the OpenGIS Simple Features Specification for SQL. Internal representation of this IntersectionMatrix. Creates an IntersectionMatrix with Null location values. Creates an IntersectionMatrix with the given dimension symbols. A string of nine dimension symbols in row major order. Creates an IntersectionMatrix with the same elements as other. An IntersectionMatrix to copy. Adds one matrix to another. Addition is defined by taking the maximum dimension value of each position in the summand matrices. The matrix to add. Changes the value of one of this IntersectionMatrixs elements. The row of this IntersectionMatrix, indicating the interior, boundary or exterior of the first Geometry The column of this IntersectionMatrix, indicating the interior, boundary or exterior of the second Geometry The new value of the element Changes the elements of this IntersectionMatrix to the dimension symbols in dimensionSymbols. Nine dimension symbols to which to set this IntersectionMatrix s elements. Possible values are {T, F, *, 0, 1, 2} Changes the specified element to minimumDimensionValue if the element is less. The row of this IntersectionMatrix , indicating the interior, boundary or exterior of the first Geometry. The column of this IntersectionMatrix , indicating the interior, boundary or exterior of the second Geometry. The dimension value with which to compare the element. The order of dimension values from least to greatest is True, False, Dontcare, 0, 1, 2. If row >= 0 and column >= 0, changes the specified element to minimumDimensionValue if the element is less. Does nothing if row is smaller to 0 or column is smaller to 0. For each element in this IntersectionMatrix, changes the element to the corresponding minimum dimension symbol if the element is less. Nine dimension symbols with which to compare the elements of this IntersectionMatrix. The order of dimension values from least to greatest is Dontcare, True, False, 0, 1, 2. Changes the elements of this IntersectionMatrix to dimensionValue. The dimension value to which to set this IntersectionMatrix s elements. Possible values True, False, Dontcare, 0, 1, 2}. Returns the value of one of this IntersectionMatrixs elements. The row of this IntersectionMatrix, indicating the interior, boundary or exterior of the first Geometry. The column of this IntersectionMatrix, indicating the interior, boundary or exterior of the second Geometry. The dimension value at the given matrix position. Returns true if this IntersectionMatrix is FF*FF****. true if the two Geometrys related by this IntersectionMatrix are disjoint. Returns true if isDisjoint returns false. true if the two Geometrys related by this IntersectionMatrix intersect. Returns true if this IntersectionMatrix is FT*******, F**T***** or F***T****. The dimension of the first Geometry. The dimension of the second Geometry. true if the two Geometry s related by this IntersectionMatrix touch; Returns false if both Geometrys are points. Returns true if this IntersectionMatrix is T*T****** (for a point and a curve, a point and an area or a line and an area) 0******** (for two curves). The dimension of the first Geometry. The dimension of the second Geometry. true if the two Geometry s related by this IntersectionMatrix cross. For this function to return true, the Geometrys must be a point and a curve; a point and a surface; two curves; or a curve and a surface. Returns true if this IntersectionMatrix is T*F**F***. true if the first Geometry is within the second. Returns true if this IntersectionMatrix is T*****FF*. true if the first Geometry contains the second. Returns true if this IntersectionMatrix is T*****FF* or *T****FF* or ***T**FF* or ****T*FF*. true if the first Geometry covers the second Returns true if this IntersectionMatrix is T*F**FFF*. The dimension of the first Geometry. The dimension of the second Geometry. true if the two Geometry s related by this IntersectionMatrix are equal; the Geometrys must have the same dimension for this function to return true. Returns true if this IntersectionMatrix is T*T***T** (for two points or two surfaces) 1*T***T** (for two curves). The dimension of the first Geometry. The dimension of the second Geometry. true if the two Geometry s related by this IntersectionMatrix overlap. For this function to return true, the Geometrys must be two points, two curves or two surfaces. Returns whether the elements of this IntersectionMatrix satisfies the required dimension symbols. Nine dimension symbols with which to compare the elements of this IntersectionMatrix. Possible values are {T, F, *, 0, 1, 2}. true if this IntersectionMatrix matches the required dimension symbols. Transposes this IntersectionMatrix. This IntersectionMatrix as a convenience, Returns a nine-character String representation of this IntersectionMatrix. The nine dimension symbols of this IntersectionMatrix in row-major order. Returns true if the dimension value satisfies the dimension symbol. A number that can be stored in the IntersectionMatrix . Possible values are True, False, Dontcare, 0, 1, 2. A character used in the string representation of an IntersectionMatrix. Possible values are T, F, *, 0, 1, 2. True if the dimension symbol encompasses the dimension value. Returns true if each of the actual dimension symbols satisfies the corresponding required dimension symbol. Nine dimension symbols to validate. Possible values are T, F, *, 0, 1, 2. Nine dimension symbols to validate against. Possible values are T, F, *, 0, 1, 2. True if each of the required dimension symbols encompass the corresponding actual dimension symbol. See methods Get(int, int) and Set(int, int, int value) This combines the full Topology.Geometry functions to the complete Vector.IPoint set of functions. Full powered topology style Polygon Gets a specific ILinearRing identified by the 0 based index n A 0 based integer index enumerating the rings ILinearRing outlining the n'th hole in the polygon Gets the ILinearRing for the Exterior Ring. Gets the System.Array of ILinearRings that make up the holes in the polygon. ISize interface for expressing a length in the X, Y or Z directions Gets or sets the size in the x direction or longitude Gets or sets the size in the y direction or latitude Gets or sets the size in the z direction or altitude Contains a magnitude and direction Supports more fundamental calculations than LineSegment, rather than topological functions Transforms a point that has 3 dimensions by multiplying it by the specified 3 x 3 matrix in the upper left, but treats the bottom row as supplying the translation coordinates. Rotations and transformations work by applying matrix mathematics, so this creates a 1 x 4 version of this vector. The 4th value is always 1, and allows for the translation terms to work. Returns the square of the distance of the vector without taking the square root This is the same as doting the vector with itself Double, the square of the distance between the vectors Assuming the vector starts at the origin of 0, 0, 0, this function returns a Point representing the tip of the vector. Converts this vector to a coordinate by assuming that the X, Y and Z values are the X, Y and Z values of the locaiton. An ICoordinate Returns a new segment from this vector, where the StartPoint is 0, 0, 0 and the End Point is the tip of this vector An implementation of ILineSegment Normalizes the vector. Returns the cross product of this vector with the specified vector V The vector to perform a cross product against A vector result from the inner product Returns the dot product of this vector with V2 The vector to perform an inner product against A Double result from the inner product Compares the values of each element, and if all the elements are equal, returns true. The vector to compare against this vector. Boolean, true if all the elements have the same value. Override for definition of equality for vectors A vector to compare with true if the X, Y, and Z coordinates are all equal Subtracts each element of V from each element of this vector Vector, the vector to subtract from this vector A vector result from the subtraction Adds each of the elements of V to the elements of this vector Vector, the vector to add to this vector A vector result from the addition Returns the scalar product of this vector against a scalar Double, a value to multiply against all the members of this vector A vector multiplied by the scalar Rotates the vector about the X axis as though the tail of the vector were at the origin The angle in degrees to rotate counter-clockwise when looking at the origin from the positive axis. A new IVector that has been rotated Rotates the vector about the Y axis as though the tail of the vector were at the origin The angle in degrees to rotate counter-clockwise when looking at the origin from the positive axis. A new IVector that has been rotated Rotates the vector about the Z axis as though the tail of the vector were at the origin The angle in degrees to rotate counter-clockwise when looking at the origin from the positive axis. A new IVector that has been rotated The Euclidean distance from the origin to the tip of the 3 dimensional vector Setting the magntiude won't change the direction. Returns the magnitude of the projection of the vector onto the X-Y plane Setting this magnitude will not affect Z, which should be adjusted separately Obtains the angle above the X-Y plane. Positive towards positive Z. Values are in radians from -Pi/2 to Pi/2 Setting this value when no magnitude exists results in a unit vector with angle phi in the X direction. Represents the angle in the X-Y plane. 0 along the positive X axis, and increasing counterclockwise Values are in Radians. Setting this value when no X-Y magnitude exists results in a unit vector between X and Y, but does not affect Z, so you may have something other than a unit vector in 3-D. Set theta before phi in order to obtain a unit vector in 3-D space. Vector Adds each of the elements of V to the elements of this vector Vector, the vector to add to this vector A vector result from the addition Returns the cross product of this vector with the specified vector V The vector to perform a cross product against A vector result from the inner product Returns the dot product of this vector with V2 The vector to perform an inner product against A Double result from the inner product Returns the scalar product of this vector against a scalar Double, a value to multiply against all the members of this vector A vector multiplied by the scalar Normalizes the vector. Subtracts each element of V from each element of this vector Vector, the vector to subtract from this vector A vector result from the subtraction The Euclidean distance from the origin to the tip of the 3 dimensional vector Setting the magntiude won't change the direction. A Depth object records the topological depth of the sides of an Edge for up to two Geometries. A Depth object is null (has never been initialized) if all depths are null. Normalize the depths for each point, if they are non-null. A normalized depth has depth values in the set { 0, 1 }. Normalizing the depths involves reducing the depths by the same amount so that at least one of them is 0. If the remaining value is > 0, it is set to 1. Calls GetDepth and SetDepth. Models the end of an edge incident on a node. EdgeEnds have a direction determined by the direction of the ray from the initial point to the next point. EdgeEnds are IComparable under the ordering "a has a greater angle with the x-axis than b". This ordering is used to sort EdgeEnds around a node. The parent edge of this edge end. Implements the total order relation: a has a greater angle with the positive x-axis than b. Using the obvious algorithm of simply computing the angle is not robust, since the angle calculation is obviously susceptible to roundoff. A robust algorithm is: - first compare the quadrant. If the quadrants are different, it it trivial to determine which vector is "greater". - if the vectors lie in the same quadrant, the computeOrientation function can be used to decide the relative orientation of the vectors. Subclasses should override this if they are using labels The depth of each side (position) of this edge. The 0 element of the array is never used. Creates a new instance of a directed edge The edge to use in order to create a directed edge A boolean that forces whether or not this edge is counted as forward Compute the label in the appropriate orientation for this DirEdge. Retrieves an integer that describes the depth A Positions enumeration An integer showing the depth Sets the depth value for this edge based on the specified position A Position The integer depth to specify Assigned depths do not match Set both edge depths. One depth for a given side is provided. The other is computed depending on the Location transition and the depthDelta of the edge. Computes the factor for the change in depth when moving from one location to another. E.g. if crossing from the Interior to the Exterior the depth decreases, so the factor is -1. Obtains the chaing in depth Gets or sets the EdgeRing Gets a boolean indicating whether this edge is directed forward Gets a boolean that is true if this edge is in the result This is an interior Area edge if its label is an Area label for both Geometries and for each Geometry both sides are in the interior. true if this is an interior Area edge. This edge is a line edge if at least one of the labels is a line label any labels which are not line labels have all Locations = Exterior. Gets or sets a boolean that is true if this edge has been visited Gets or sets the minimum Edge Ring Gets or sets the next directed edge relative to this directed edge Gets or sets a directed edge for Next Min VisitedEdge get property returns true if bot Visited and Sym.Visited are true. VisitedEdge set property marks both DirectedEdges attached to a given Edge. This is used for edges corresponding to lines, which will only appear oriented in a single direction in the result. A DirectedEdgeStar is an ordered list of outgoing DirectedEdges around a node. It supports labelling the edges as well as linking the edges to form both MaximalEdgeRings and MinimalEdgeRings. A EdgeEndStar is an ordered list of EdgeEnds around a node. They are maintained in CCW order (starting with the positive x-axis) around the node for efficient lookup and topology building. A map which maintains the edges in sorted order around the node. The location of the point for this star in Geometry i Areas. Insert a EdgeEnd into this EdgeEndStar. Insert an EdgeEnd into the map, and clear the edgeList cache, since the list of edges has now changed. Iterator access to the ordered list of edges is optimized by copying the map collection to a list. (This assumes that once an iterator is requested, it is likely that insertion into the map is complete). Initializes the edges in the _edgeList Gets the EdgeMap A list of all outgoing edges in the result, in CCW order. The coordinate for the node this star is based at. A list of all outgoing edges in the result, in CCW order. Insert a directed edge in the list. Compute the labelling for all dirEdges in this star, as well as the overall labelling. For each dirEdge in the star, merge the label . Update incomplete dirEdge labels from the labelling for the node. Traverse the star of DirectedEdges, linking the included edges together. To link two dirEdges, the next pointer for an incoming dirEdge is set to the next outgoing edge. DirEdges are only linked if: they belong to an area (i.e. they have sides) they are marked as being in the result Edges are linked in CCW order (the order they are stored). This means that rings have their face on the Right (in other words, the topological location of the face is given by the RHS label of the DirectedEdge). PRECONDITION: No pair of dirEdges are both marked as being in the result. Traverse the star of edges, maintaing the current location in the result area at this node (if any). If any L edges are found in the interior of the result, mark them as covered. Compute the DirectedEdge depths for a subsequence of the edge array. The last depth assigned (from the R side of the last edge visited). A GraphComponent is the parent class for the objects' that form a graph. Each GraphComponent can carry a Label. Compute the contribution to an IM for this component. Update the IM with the contribution for this component. A component only contributes if it has a labelling for both parent geometries. A coordinate in this component (or null, if there are none). An isolated component is one that does not intersect or touch any other component. This is the case if the label has valid locations for only a single Geometry. true if this component is isolated. Updates an IM from the label for an edge. Handles edges from both L and A geometries. Adds EdgeIntersections for one or both intersections found for a segment of an edge to the edge intersection list. Add an EdgeIntersection for intersection intIndex. An intersection that falls exactly on a vertex of the edge is normalized to use the higher of the two possible segmentIndexes. Update the IM with the contribution for this component. A component only contributes if it has a labelling for both parent geometries. Equals is defined to be: e1 equals e2 iff the coordinates of e1 are the same or the reverse of the coordinates in e2. Equals is defined to be: e1 equals e2 iff the coordinates of e1 are the same or the reverse of the coordinates in e2. true if the coordinate sequences of the Edges are identical. The depthDelta is the change in depth as an edge is crossed from R to L. The change in depth as the edge is crossed from R to L. An Edge is collapsed if it is an Area edge and it consists of two segments which are equal and opposite (eg a zero-width V). An EdgeIntersection represents a point on an edge which intersects with another edge. The intersection may either be a single point, or a line segment (in which case this point is the start of the line segment) The label attached to this intersection point applies to the edge from this point forwards, until the next intersection or the end of the edge. The intersection point must be precise. -1 this EdgeIntersection is located before the argument location, 0 this EdgeIntersection is at the argument location, 1 this EdgeIntersection is located after the argument location. The point of intersection. The index of the containing line segment in the parent edge. The edge distance of this point along the containing line segment. A list of edge intersections along an Edge. Adds an intersection into the list, if it isn't already there. The input segmentIndex and dist are expected to be normalized. Returns an iterator of EdgeIntersections. Adds entries for the first and last points of the edge to the list. Creates new edges for all the edges that the intersections in this list split the parent edge into. Adds the edges to the input list (this is so a single list can be used to accumulate all split edges for a Geometry). Create a new "split edge" with the section of points between (and including) the two intersections. The label for the new edge is the same as the label for the parent edge. A EdgeList is a list of Edges. It supports locating edges that are pointwise equals to a target edge. An index of the edges, for fast lookup. a Quadtree is used, because this index needs to be dynamic (e.g. allow insertions after queries). An alternative would be to use an ordered set based on the values of the edge coordinates. Remove the selected Edge element from the list if present. Edge element to remove from list Insert an edge unless it is already in the list. If there is an edge equal to e already in the list, return it. Otherwise return null. equal edge, if there is one already in the list, null otherwise. If the edge e is already in the list, return its index. Index, if e is already in the list, -1 otherwise. Validates that a collection of SegmentStrings is correctly noded. Throws an appropriate exception if an noding error is found. Compute a LinearRing from the point list previously collected. Test if the ring is a hole (i.e. if it is CCW) and set the hole flag accordingly. Collect all the points from the DirectedEdges of this ring into a contiguous list. Merge the RHS label from a DirectedEdge into the label for this EdgeRing. The DirectedEdge label may be null. This is acceptable - it results from a node which is NOT an intersection node between the Geometries (e.g. the end node of a LinearRing). In this case the DirectedEdge label does not contribute any information to the overall labelling, and is simply skipped. This method will cause the ring to be computed. It will also check any holes, if they have been assigned. Gets the inner geometry factory Returns the list of DirectedEdges that make up this EdgeRing. The directed edge which starts the list of edges for this EdgeRing. A GeometryGraph is a graph that models a given Geometry. The computation of the IntersectionMatrix relies on the use of a structure called a "topology graph". The topology graph contains nodes and edges corresponding to the nodes and line segments of a Geometry. Each node and edge in the graph is labeled with its topological location relative to the source point. Notice that there is no requirement that points of self-intersection be a vertex. Thus to obtain a correct topology graph, Geometrys must be self-noded before constructing their graphs. Two fundamental operations are supported by topology graphs: Computing the intersections between all the edges and nodes of a single graph Computing the intersections between the edges and nodes of two different graphs Creates a new instance of a Planar Graph A node Factory Creates a new instance of a Planar Graph using a default NodeFactory Adds a new EdgeEnd to the planar graph The EdgeEnd to add Add a set of edges to the graph. For each edge two DirectedEdges will be created. DirectedEdges are NOT linked by this method. Adds the specified node to the geometry graph's NodeMap The node to add The node after the addition Adds a new ICoordinate as though it were a Node to the node map An ICoordinate to add The newly added node The node if found; null otherwise Returns the EdgeEnd which has edge e as its base edge (MD 18 Feb 2002 - this should return a pair of edges). The edge, if found null if the edge was not found. Returns the edge whose first two coordinates are p0 and p1. The edge, if found null if the edge was not found. Returns the edge which starts at p0 and whose first segment is parallel to p1. The edge, if found null if the edge was not found. Adds a new EdgeEnd to the planar graph Link the DirectedEdges at the nodes of the graph. This allows clients to link only a subset of nodes in the graph, for efficiency (because they know that only a subset is of interest). Link the DirectedEdges at the nodes of the graph. This allows clients to link only a subset of nodes in the graph, for efficiency (because they know that only a subset is of interest). The coordinate pairs match if they define line segments lying in the same direction. E.g. the segments are parallel and in the same quadrant (as opposed to parallel and opposite!). For nodes in the Collection, link the DirectedEdges at the node that are in the result. This allows clients to link only a subset of nodes in the graph, for efficiency (because they know that only a subset is of interest). Gets a list of edge ends Gets or sets the list of edges. Gets or sets the NodeMap for this graph Gets a list of the actual values contained in the nodes The lineEdgeMap is a map of the linestring components of the parentGeometry to the edges which are derived from them. This is used to efficiently perform findEdge queries If this flag is true, the Boundary Determination Rule will used when deciding whether nodes are in the boundary or not This method implements the Boundary Determination Rule for determining whether a component (node or edge) that appears multiple times in elements of a MultiGeometry is in the boundary or the interior of the Geometry. The SFS uses the "Mod-2 Rule", which this function implements. An alternative (and possibly more intuitive) rule would be the "At Most One Rule": isInBoundary = (componentCount == 1) The left and right topological location arguments assume that the ring is oriented CW. If the ring is in the opposite orientation, the left and right locations must be interchanged. Add an Edge computed externally. The label on the Edge is assumed to be correct. Add a point computed externally. The point is assumed to be a Point Geometry part, which has a location of INTERIOR. Compute self-nodes, taking advantage of the Geometry type to minimize the number of intersection tests. (E.g. rings are not tested for self-intersection, since they are assumed to be valid). The LineIntersector to use. If false, intersection checks are optimized to not test rings for self-intersection. The SegmentIntersector used, containing information about the intersections found. Adds points using the mod-2 rule of SFS. This is used to add the boundary points of dim-1 geometries (Curves/MultiCurves). According to the SFS, an endpoint of a Curve is on the boundary if it is in the boundaries of an odd number of Geometries. Add a node for a self-intersection. If the node is a potential boundary node (e.g. came from an edge which is a boundary) then insert it as a potential boundary node. Otherwise, just add it as a regular node. An EdgeSetIntersector computes all the intersections between the edges in the set. It adds the computed intersections to each edge they are found on. It may be used in two scenarios: determining the internal intersections between a single set of edges determining the mutual intersections between two different sets of edges It uses a SegmentIntersector to compute the intersections between segments and to record statistics about what kinds of intersections were found. Computes all self-intersections between edges in a set of edges, allowing client to choose whether self-intersections are computed. A list of edges to test for intersections. The SegmentIntersector to use. true if self-intersections are to be tested as well. Computes all mutual intersections between two sets of edges. MonotoneChains are a way of partitioning the segments of an edge to allow for fast searching of intersections. They have the following properties: the segments within a monotone chain will never intersect each other, and the envelope of any contiguous subset of the segments in a monotone chain is simply the envelope of the endpoints of the subset. Property 1 means that there is no need to test pairs of segments from within the same monotone chain for intersection. Property 2 allows binary search to be used to find the intersection points of two monotone chains. For many types of real-world data, these properties eliminate a large number of segment comparisons, producing substantial speed gains. MonotoneChains are a way of partitioning the segments of an edge to allow for fast searching of intersections. They have the following properties: the segments within a monotone chain will never intersect each other, and the envelope of any contiguous subset of the segments in a monotone chain is simply the envelope of the endpoints of the subset. Property 1 means that there is no need to test pairs of segments from within the same monotone chain for intersection. Property 2 allows binary search to be used to find the intersection points of two monotone chains. For many types of real-world data, these properties eliminate a large number of segment comparisons, producing substantial speed gains. The index of the last point in the monotone chain. Testing only. A trivial intersection is an apparent self-intersection which in fact is simply the point shared by adjacent line segments. Notice that closed edges require a special check for the point shared by the beginning and end segments. This method is called by clients of the EdgeIntersector class to test for and add intersections for two segments of the edges being intersected. Notice that clients (such as MonotoneChainEdges) may choose not to intersect certain pairs of segments for efficiency reasons. The proper intersection point, or null if none was found. A proper intersection is an intersection which is interior to at least two line segments. Notice that a proper intersection is not necessarily in the interior of the entire Geometry, since another edge may have an endpoint equal to the intersection, which according to SFS semantics can result in the point being on the Boundary of the Geometry. A proper interior intersection is a proper intersection which is not contained in the set of boundary nodes set for this SegmentIntersector. Finds all intersections in one or two sets of edges, using the straightforward method of comparing all segments. This algorithm is too slow for production use, but is useful for testing purposes. Performs a brute-force comparison of every segment in each Edge. This has n^2 performance, and is about 100 times slower than using monotone chains. Finds all intersections in one or two sets of edges, using an x-axis sweepline algorithm in conjunction with Monotone Chains. While still O(n^2) in the worst case, this algorithm drastically improves the average-case time. The use of MonotoneChains as the items in the index seems to offer an improvement in performance over a sweep-line alone. Because Delete Events have a link to their corresponding Insert event, it is possible to compute exactly the range of events which must be compared to a given Insert event object. Finds all intersections in one or two sets of edges, using a simple x-axis sweepline algorithm. While still O(n^2) in the worst case, this algorithm drastically improves the average-case time. Because Delete Events have a link to their corresponding Insert event, it is possible to compute exactly the range of events which must be compared to a given Insert event object. ProjectionEvents are ordered first by their x-value, and then by their eventType. It is important that Insert events are sorted before Delete events, so that items whose Insert and Delete events occur at the same x-value will be correctly handled. A Label indicates the topological relationship of a component of a topology graph to a given Geometry. This class supports labels for relationships to two Geometrys, which is sufficient for algorithms for binary operations. Topology graphs support the concept of labeling nodes and edges in the graph. The label of a node or edge specifies its topological relationship to one or more geometries. (In fact, since NTS operations have only two arguments labels are required for only two geometries). A label for a node or edge has one or two elements, depending on whether the node or edge occurs in one or both of the input Geometrys. Elements contain attributes which categorize the topological location of the node or edge relative to the parent Geometry; that is, whether the node or edge is in the interior, boundary or exterior of the Geometry. Attributes have a value from the set {Interior, Boundary, Exterior}. In a node each element has a single attribute On. For an edge each element has a triplet of attributes Left, On, Right. It is up to the client code to associate the 0 and 1 TopologyLocations with specific geometries. Construct a Label with a single location for both Geometries. Initialize the locations to Null. Construct a Label with a single location for both Geometries. Initialize the location for the Geometry index. Construct a Label with On, Left and Right locations for both Geometries. Initialize the locations for both Geometries to the given values. Construct a Label with On, Left and Right locations for both Geometries. Initialize the locations for the given Geometry index. Construct a Label with the same values as the argument for the given Geometry index. Construct a Label with the same values as the argument Label. Converts a Label to a Line label (that is, one with no side Locations). Label to convert. Label as Line label. Merge this label with another one. Merging updates any null attributes of this label with the attributes from lbl. Converts one GeometryLocation to a Line location. Basic nodes do not compute IMs. Add the edge to the list of edges at this node. To merge labels for two nodes, the merged location for each LabelElement is computed. The location for the corresponding node LabelElement is set to the result, as long as the location is non-null. Updates the label of a node to BOUNDARY, obeying the mod-2 boundaryDetermination rule. The location for a given eltIndex for a node will be one of { Null, Interior, Boundary }. A node may be on both the boundary and the interior of a point; in this case, the rule is that the node is considered to be in the boundary. The merged location is the maximum of the two input values. A Coordinate for this node Gets the edges for this node Gets a boolean that is true if this node is isolated The basic node constructor does not allow for incident edges. A map of nodes, indexed by the coordinate of the node. This method expects that a node has a coordinate value. Adds a node for the start point of this EdgeEnd (if one does not already exist in this map). Adds the EdgeEnd to the (possibly new) node. The node if found; null otherwise. An indicator that a Location is on a GraphComponent (0) An indicator that a Location is to the left of a GraphComponent (1) An indicator that a Location is to the right of a GraphComponent (2) An indicator that a Location is is parallel to x-axis of a GraphComponent (-1) /// A Position indicates the position of a Location relative to a graph component (Node, Edge, or Area). Returns Positions.Left if the position is Positions.Right, Positions.Right if the position is Left, or the position otherwise. Utility functions for working with quadrants, which are numbered as follows: 1 | 0 --+-- 2 | 3 Only static methods! Returns the quadrant of a directed line segment (specified as x and y displacements, which cannot both be 0). Returns the quadrant of a directed line segment from p0 to p1. Returns true if the quadrants are 1 and 3, or 2 and 4. Returns the right-hand quadrant of the halfplane defined by the two quadrants, or -1 if the quadrants are opposite, or the quadrant if they are identical. Returns whether the given quadrant lies within the given halfplane (specified by its right-hand quadrant). Returns true if the given quadrant is 0 or 1. A TopologyLocation is the labelling of a GraphComponent's topological relationship to a single Geometry. If the parent component is an area edge, each side and the edge itself have a topological location. These locations are named: On: on the edge Left: left-hand side of the edge Right: right-hand side If the parent component is a line edge or node, there is a single topological relationship attribute, On. The possible values of a topological location are { Location.Null, Location.Exterior, Location.Boundary, Location.Interior } The labelling is stored in an array location[j] where where j has the values On, Left, Right. Constructs a TopologyLocation specifying how points on, to the left of, and to the right of some GraphComponent relate to some Geometry. Possible values for the parameters are Location.Null, Location.Exterior, Location.Boundary, and Location.Interior. Merge updates only the Null attributes of this object with the attributes of another. Get calls Get(Positions posIndex), Set calls SetLocation(Positions locIndex, Locations locValue) true if all locations are Null. true if any locations are Null. A TwoHorizontalEdgesException Class Creates a new instance of TwoHorizontalEdgesException Basic implementation of LinearRing. The first and last point in the coordinate sequence must be equal. Either orientation of the ring is allowed. A valid ring must not self-intersect. Basic implementation of LineString. Represents an empty LineString. The points of this LineString. The points of the linestring, or null to create the empty point. Consecutive points may not be equal. Creates a new LineString using the default factory The points of the linestring, or null to create the empty point. Consecutive points may not be equal. Creates a new topologically complete LineString from a LineStringBase Constructor The points of the linestring, or null to create the empty point. Consecutive points may not be equal. Creates an empty linestring using the specified factory. An IGeometryFactory to use when specifying this linestring. Rather than using the factory trends, this will create a coordinate sequence by simply using the specified list of coordinates. The list of coordinates to use as a new ICoordinateSequence Rather than using the factory trends, this will create a coordinate sequence by simply using the specified list of coordinates. The list of coordinates to use as a new ICoordinateSequence Applys a given ICoordinateFilter to this LineString Performs a CompareTo opperation assuming that the specified object is a LineString Tests the coordinates of this LineString against another geometry and returns true if they are identical. Given the specified test point, this checks each segment, and will return the closest point on the specified segment. The point to test. Returns the N'th point as an Implementation of IPoint. The specific implementation is just the DotSpatial.Geometries.Point Returns true if the given point is a vertex of this LineString. The Coordinate to check. true if pt is one of this LineString's vertices. Normalizes a LineString. A normalized linestring has the first point which is not equal to it's reflected point less than the reflected point. Creates a whose coordinates are in the reverse order of this objects. A with coordinates in the reverse order. Returns the Envelope of this LineString An IEnvelope interface for the envelope containing this LineString Returns a copy of this ILineString Returns the Nth coordinate of the coordinate sequence making up this LineString Tests other and returns true if other is a LineString Calculates a new linestring representing a linestring that is offset by distance to the left. Negative distances will be to the right. The final LineString may be shorter or longer than the original. Left is determined by the vector direction of the segment between the 0th and 1st points. Outside bends will be circular curves, rather than extended angles. The double distance to create the offset LineString A valid ILineString interface created from calculations performed on this LineString Gets the integer count of the number of points in this LineString Gets the ICoordinate that exists at the Nth index Gets the value of the angle between the and the . Gets a MultiPoint geometry that contains the StartPoint and Endpoint Gets False if the LineString is closed, or Point (0) otherwise, representing the endpoints Gets the 0th coordinate Gets a System.Array of the coordinates Gets the dimensionality of a Curve(1) Gets the point corresponding to NumPoints-1 and returns it as an IPoint interface This will always contain Line, even if it is technically empty Gets a string that says "LineString" Gets a boolean that is true if the EndPoint is geometrically equal to the StartPoint in 2 Dimensions Gets a boolean value that returns true if the count of points in this LineString is 0. Gets a boolean that is true if this LineString is both closed (has the same start and end point) and simple (does not self-intersect) Gets a boolean that is true if any part of this LineString intersects with itself Returns the length of this LineString The length of the polygon. Gets an integer count of the points. Gets the 0 index point as a valid implementation of IPoint interface Creates a new instance of a linear ring where the enumerable collection of coordinates represents the set of coordinates to add to the ring. Creates a new instance of a linear ring where the enumerable collection of coordinates represents the set of coordinates to add to the ring. Constructor Correct constructions with non-closed sequences. Geometry Type Gets a boolean that is true if the EndPoint is geometrically equal to the StartPoint in 2 Dimensions. This will always contain Line, even if it is technically empty Represents a line segment defined by two Coordinates. Provides methods to compute various geometric properties and relationships of line segments. This class is designed to be easily mutable (to the extent of having its contained points public). This supports a common pattern of reusing a single LineSegment object as a way of computing segment properties on the segments defined by arrays or lists of Coordinates. Creates an instance of LineSegment from two coordiantes The first point of the segment The second point of the segment Creates a new instance of a LineSegment which implements ILineSegment and ILineSegmentBase from an ILineSegmentBase Creates a new instance of a LineSegment which implements ILineSegment and ILineSegmentBase Retrieves the i'th coordiante. Since there are only two, i can be either 0 or 1. Integer, specifies the coordiante A topologically complete ICoordinate Defines a new LineSegment based on the previous line segment The ILineSegmentBase Sets the new coordinates using the ICoordinate interfaces specified The first endpoint The second endpoint Determines the orientation of a LineSegment relative to this segment. The concept of orientation is specified as follows: Given two line segments A and L, A is to the left of a segment L if A lies wholly in the closed half-plane lying to the left of L A is to the right of a segment L if A lies wholly in the closed half-plane lying to the right of L otherwise, A has indeterminate orientation relative to L. This happens if A is collinear with L or if A crosses the line determined by L. The LineSegment to compare. 1 if seg is to the left of this segment, -1 if seg is to the right of this segment, 0 if seg has indeterminate orientation relative to this segment. Reverses the direction of the line segment. Puts the line segment into a normalized form. This is useful for using line segments in maps and indexes when topological equality rather than exact equality is desired. Computes the distance between this line segment and another one. Computes the distance between this line segment and a point. Computes the perpendicular distance between the (infinite) line defined by this line segment and a point. Compute the projection factor for the projection of the point p onto this LineSegment. The projection factor is the constant k by which the vector for this segment must be multiplied to equal the vector for the projection of p. Compute the projection of a point onto the line determined by this line segment. Notice that the projected point may lie outside the line segment. If this is the case, the projection factor will lie outside the range [0.0, 1.0]. Project a line segment onto this line segment and return the resulting line segment. The returned line segment will be a subset of the target line line segment. This subset may be null, if the segments are oriented in such a way that there is no projection. Notice that the returned line may have zero length (i.e. the same endpoints). This can happen for instance if the lines are perpendicular to one another. The line segment to project. The projected line segment, or null if there is no overlap. Computes the closest point on this line segment to another point. The point to find the closest point to. A Coordinate which is the closest point on the line segment to the point p. Computes the closest points on a line segment. A pair of Coordinates which are the closest points on the line segments. Computes an intersection point between two segments, if there is one. There may be 0, 1 or many intersection points between two segments. If there are 0, null is returned. If there is 1 or more, a single one is returned (chosen at the discretion of the algorithm). If more information is required about the details of the intersection, the {RobustLineIntersector} class should be used. An intersection point, or null if there is none. Performs an intersection of this line segment with the specified envelope The envelope to compare against An ILineSegment, or null if there is no intersection. Determines if any portion of this segment intersects the specified extent. The Boolean, true if this line segment intersects the specified envelope Compares this object with the specified object for order. Uses the standard lexicographic ordering for the points in the LineSegment. The LineSegment with which this LineSegment is being compared. A negative integer, zero, or a positive integer as this LineSegment is less than, equal to, or greater than the specified LineSegment. Returns true if other is topologically equal to this LineSegment (e.g. irrespective of orientation). A LineSegment with which to do the comparison. true if other is a LineSegment with the same values for the x and y ordinates. Returns true if o has the same values for its points. A LineSegment with which to do the comparison. true if o is a LineSegment with the same values for the x and y ordinates. Return HashCode. returns the one of the ICoordinate that defines this linesegment returns the ICoordianteBase defining the second endpoint of the segment Computes the length of the line segment. The length of the line segment. Tests whether the segment is horizontal. true if the segment is horizontal. Tests whether the segment is vertical. true if the segment is vertical. The angle this segment makes with the x-axis (in radians). Converts the location value to a location symbol, for example, EXTERIOR => 'e'. Either 'e', 'b', 'i' or '-'. Matrix4 A 4 x 4 matrix is required for transformations in 3 dimensions Creates a new squre identity matrix of the specified size The size of the matrix to create Creates a new instance of Matrix with m rows and n columns Creates a matrix using the specified values. Matrix multiplication only works if the number of columns of the first matrix is the same as the number of rows of the second matrix. The first matrix is this object, so this will only work if inMatrix has the same number of rows as this matrix has columns. The IMatrix to multiply against this matrix Multiplies this matrix by the specified scalar value. Gets the number of rows Gets the number of columns Gets the number of rows Gets the number of columns Gets or sets the values for this matrix Creates a new instance of Matrix4 that is an identity matrix Rotates this matrix by the specified angle in degrees about the X axis. Specified the angle in degrees to rotate counter clockwise about the positive axis Rotates this matrix by the specified angle in degrees about the Y axis. Rotates this matrix by the specified angle in degrees about the Z axis. Translates the matrix by the specified amount in each of the directions by multiplying by a translation matrix created from the specified values. The translation in the X coordinate The translation in the Y coordinate The translation in the Z coordinate Creates a 4 x 4 matrix that can be used to rotate a 3D vector about the X axis. The counter-clockwise angle of rotation when looking at the origin from the positive axis A 4x4 rotation matrix Creates a 4 x 4 matrix that can be used to rotate a 3D vector about the Y axis. The counter-clockwise angle of rotation when looking at the origin from the positive axis A 4x4 rotation matrix Creates a 4 x 4 matrix that can be used to rotate a 3D vector about the Z axis. The counter-clockwise angle of rotation when looking at the origin from the positive axis A 4x4 rotation matrix Creates a 4 x 4 matrix where all the values represent an identity matrix except that the bottom row has been set to be the translation values. The result is that if a 3D vector is transformed by this matrix, the last row will control the translation terms. The translation in the x direction The translation in the y direction The translation in the z direction The translation matrix Basic implementation of MultiLineString. Represents an empty MultiLineString. Constructs a multiLineString from the list of IBasicLineStrings, creating new full geometries where necessary. An IBasicLineString that is either a full IGeometry itself, or will be cast into one by this step Constructs a MultiLineString. The LineStrings for this MultiLineString, or null or an empty array to create the empty point. Elements may be empty LineStrings, but not nulls. This will attempt to create a new MultiLineString from the specified basic geometry. A Basic geometry that shoule be a LineString or MultiLineString This will attempt to create a new MultiLineString from the specified basic geometry. A Basic geometry that shoule be a LineString or MultiLineString Any valid Geometry Factory Constructs a MultiLineString. The LineStrings for this MultiLineString, or null or an empty array to create the empty point. Elements may be empty LineStrings, but not nulls. For create this is used a standard with == . Constructor for a MultiLineString that is empty Creates a in the reverse order to this object. Both the order of the component LineStrings and the order of their coordinate sequences are reversed. a in the reverse order. Gets a value indicating whether this instance is closed. true if this instance is closed; otherwise, false. Always returns FeatureTypes.Line Gets the ILineString that corresponds to the specified index The integer index to get a linestring An ILineString Models a collection of Points. Represents an empty MultiPoint. Constructs a MultiPoint. The Points for this MultiPoint , or null or an empty array to create the empty point. Elements may be empty Points, but not nulls. This will attempt to create a new MultiPoint from the specified basic geometry. A Point or MultiPoint Creates new Multipoint using interface points Creates new Multipoint using interface points Converts an array of point interface variables into local points. Eventually I hope to reduce the amount of "casting" necessary, in order to allow as much as possible to occur via an interface. Converts an array of point interface variables into local points. Eventually I hope to reduce the amount of "casting" necessary, in order to allow as much as possible to occur via an interface. Returns the Coordinate at the given position. The index of the Coordinate to retrieve, beginning at 0. The nth Coordinate. Gets or sets the point that resides at the specified index A zero-based integer index specifying the point to get or set Basic implementation of MultiPolygon. Represents an empty MultiPolygon. Constructs a MultiPolygon. The Polygons for this MultiPolygon , or null or an empty array to create the empty point. Elements may be empty Polygons, but not null s. The polygons must conform to the assertions specified in the OpenGIS Simple Features Specification for SQL. For create this is used a standard with == . This was added by Ted Dunsford to allow the construction of MultiPolygons from an array of basic polygon interfaces. This will attempt to create a new MultiPolygon from the specified basic geometry. A Polygon or MultiPolygon This will attempt to create a new MultiPolygon from the specified basic geometry. A Polygon or MultiPolygon An implementation of the IGeometryFactory interface Constructs a MultiPolygon. The Polygons for this MultiPolygon , or null or an empty array to create the empty point. Elements may be empty Polygons, but not null s. The polygons must conform to the assertions specified in the OpenGIS Simple Features Specification for SQL. Presuming that the specified basic geometry describes a MultiPolygon, this will perform the necessary casting in order to create a MultiPolygon. If, in fact, it is only a BasicMultiPolygon, this will create a new, fully functional MultiPolygon based on the same coordinates. The IBasicGeometry to turn into a MultiPolygon. Always returns "MultiPolygon" Always Polygon Basic implementation of Point. Creates a null point with X = 0, Y = 0, which can have its properties set later. Creates a null point with X = 0, Y = 0 but using the specified factory for precision and SRID stuff. The factory to use when creating this geometry. Initializes a new instance of the Point class. The coordinate used for create this . For create this is used a standard with == . Initializes a new instance of the Point class. The coordinate used for create this . For create this is used a standard with == . Constructs a Point with the given coordinate. Contains the single coordinate on which to base this Point, or null to create the empty point. Initializes a new instance of the Point class. The x coordinate. The y coordinate. The z coordinate. /// For create this is used a standard with set to . Initializes a new instance of the Point class. The x coordinate. The y coordinate. /// For create this is used a standard with set to . Represents an empty Point. Performs an operation with or on this Geometry's coordinates. If you are using this method to modify the point, be sure to call GeometryChanged() afterwards. Notice that you cannot use this method to modify this Geometry if its underlying CoordinateSequence's Get method returns a copy of the Coordinate, rather than the actual Coordinate stored (if it even stores Coordinates at all). The filter to apply to this Geometry's coordinates Performs an operation with or on this Geometry and its subelement Geometrys (if any). Only GeometryCollections and subclasses have subelement Geometry's. The filter to apply to this Geometry (and its children, if it is a GeometryCollection). Performs an operation with or on this Geometry and its component Geometry's. Only GeometryCollections and Polygons have component Geometry's; for Polygons they are the LinearRings of the shell and holes. The filter to apply to this Geometry. Returns whether this Geometry is greater than, equal to, or less than another Geometry having the same class. A Geometry having the same class as this Geometry. A positive number, 0, or a negative number, depending on whether this object is greater than, equal to, or less than o, as defined in "Normal Form For Geometry" in the NTS Technical Specifications. Given the specified test point, this returns the closest point in this geometry. EqualsExact Returns true if the two Geometrys are exactly equal, up to a specified tolerance. Two Geometries are exactly within a tolerance equal iff: they have the same class, they have the same values of Coordinates, within the given tolerance distance, in their internal Coordinate lists, in exactly the same order. If this and the other Geometrys are composites and any children are not Geometrys, returns false. The Geometry with which to compare this Geometry Distance at or below which two Coordinates will be considered equal. true if this and the other Geometry are of the same class and have equal internal data. Normalize Converts this Geometry to normal form (or canonical form ). Normal form is a unique representation for Geometry s. It can be used to test whether two Geometrys are equal in a way that is independent of the ordering of the coordinates within them. Normal form equality is a stronger condition than topological equality, but weaker than pointwise equality. The definitions for normal form use the standard lexicographical ordering for coordinates. "Sorted in order of coordinates" means the obvious extension of this ordering to sequences of coordinates. This does nothing for points. Creates a copy of this Point with the same factory specifications and values. Calculates the vector distance. (This is a 2D operation) Any valid implementation of the ICoordinate Interface The Euclidean distance between two points {Sqrt((X2 - X1)^2 + (Y2 - Y1)^2) Returns the distance that is appropriate for N dimensions. In otherwords, if this point is three dimensional, then all three dimensions will be used for calculating the distance. The coordinate to compare to this coordinate A double valued distance measure that is invariant to the number of coordinates The number of dimensions does not match between the points. Tests to see if the X coordinate and Y coordinate are the same between this point and the specified Coordinate Any valid implementation of the ICoordinate Interface True if the coordinates are equal, false otherwise Tests to see if the X, Y, and Z coordinate are the same between this point and the specified Coordinate Any valid implementation of the ICoordinate Interface True if the coordinates are equal, false otherwise Sets the coordinate. The value to set. Creates an array of ordinate values that is the size of NumDimensions. This will not include an M value. An Array of double values, with one value for each ordinate. Gets or sets the double value of the specific ordinate This is an optional recordnumber index, used specifically for Shapefile points. Boundary Returns the boundary, or the empty point if this Geometry is empty. For a discussion of this function, see the OpenGIS Simple Features Specification. As stated in SFS Section 2.1.13.1, "the boundary of a Geometry is a set of Geometries of the next lower dimension." The closure of the combinatorial boundary of this Geometry. Returns the dimension of this Geometrys inherent boundary. The dimension of the boundary of the class implementing this interface, whether or not this object is the empty point. Returns Dimension.False if the boundary is the empty point. Coordinate Returns a vertex of this Geometry People might access "Coordinates". If we spontaneously generate a list from our single coordinate, thne we will have problems. They cannot SET the coordinate like myPoint.Coordinates[0].X = 5. Dimension Gets or sets the DotSpatial.Geometries.Dimensions of this Geometry. Gets the number of ordinates that are being used by the underlying coordinate for this point. Envelope containing this This will always contain points, even if it is technically empty returns Point IsEmpty Returns whether or not the set of points in this geometry is empty IsSimple Returns false if the Geometry not simple. Subclasses provide their own definition of "simple". If this Geometry is empty, returns true. In general, the SFS specifications of simplicity seem to follow the following rule: A Geometry is simple if the only self-intersections are at boundary points. For all empty Geometrys, IsSimple==true. IsValid Tests the validity of this Geometry. Subclasses provide their own definition of "valid" The measure coordinate The integer number of points. In this case it is either 1 or 0 if the point is empty. Gets or sets the ordinates directly as an array of double values for this point. The X coordinate The Y coordinate The Z coordinate Represents a linear polygon, which may include holes. The shell and holes of the polygon are represented by {LinearRing}s. In a valid polygon, holes may touch the shell or other holes at a single point. However, no sequence of touching holes may split the polygon into two pieces. The orientation of the rings in the polygon does not matter. The shell and holes must conform to the assertions specified in the OpenGIS Simple Features Specification for SQL. Constructs a Polygon with the given exterior boundary. The outer boundary of the new Polygon, or null or an empty LinearRing if the empty polygon is to be created. Constructs a Polygon with the given exterior boundary. The outer boundary of the new Polygon, or null or an empty LinearRing if the empty polygon is to be created. Generates a new polygon using the default geometry factory from the specified set of coordinates, where the coordinates will become the polygon shell. The shell of the polygon expressed as an enumerable collection of ICoordinate Initializes a new instance of the Polygon class. The outer boundary of the new Polygon, or null or an empty LinearRing if the empty point is to be created. The inner boundaries of the new Polygon , or null or empty LinearRings if the empty point is to be created. For create this is used a standard with == . Constructs a Polygon with the given exterior boundary and interior boundaries. The outer boundary of the new Polygon, or null or an empty LinearRing if the empty point is to be created. The inner boundaries of the new Polygon , or null or empty LinearRings if the empty point is to be created. Holes must not contain null elements Constructor for a polygon A simpler BasicPolygon to empower with topology functions Clears any cached envelopes Given the specified test point, this checks each segment, and will return the closest point on the specified segment. The point to test. Occurs during the copy process and ensures that the shell and holes are all duplicated and not direct references Hole data might actually already be cast appropriately, but it might need to be converted into an array of linear rings. Represents an empty Polygon. This is just the Shell, but modified to work with IBasicPolygon Returns the area of this Polygon Area in Meters (by default) when using projected coordinates. Gets all the coordinates for the polygon. Setting this assumes that all the coordintes belong in the shell. This will always contain points, even if it is technically empty Specifically returns a Polygon type Returns the perimeter of this Polygon. For polygons, this returns the complete number of points, including all the points from the outer ring as well as from the interior holes. This returns a full ILinearRing geometry PolygonException Creates a new instance of PolygonException Specifies the precision model of the Coordinates in a Geometry. In other words, specifies the grid of allowable points for all Geometrys. The makePrecise method allows rounding a coordinate to a "precise" value; that is, one whose precision is known exactly. Coordinates are assumed to be precise in geometries. That is, the coordinates are assumed to be rounded to the precision model given for the point. NTS input routines automatically round coordinates to the precision model before creating Geometries. All internal operations assume that coordinates are rounded to the precision model. Constructive methods (such as bool operations) always round computed coordinates to the appropriate precision model. Currently three types of precision model are supported: Floating: represents full double precision floating point. This is the default precision model used in NTS FloatingSingle: represents single precision floating point. Fixed: represents a model with a fixed number of decimal places. A Fixed Precision Model is specified by a scale factor. The scale factor specifies the grid which numbers are rounded to. Input coordinates are mapped to fixed coordinates according to the following equations: jtsPt.x = round((inputPt.x * scale ) / scale jtsPt.y = round((inputPt.y * scale ) / scale Coordinates are represented internally as double-precision values. Since .NET uses the IEEE-394 floating point standard, this provides 53 bits of precision. (Thus the maximum precisely representable integer is 9, 007, 199, 254, 740, 992). NTS methods currently do not handle inputs with different precision models. The maximum precise value representable in a double. Since IEE754 double-precision numbers allow 53 bits of mantissa, the value is equal to 2^53 - 1. This provides almost 16 decimal digits of precision. The type of PrecisionModel this represents. The scale factor which determines the number of decimal places in fixed precision. Creates a PrecisionModel with a default precision of Floating. Creates a PrecisionModel that specifies an explicit precision model type. If the model type is Fixed the scale factor will default to 1. The type of the precision model. Creates a PrecisionModel that specifies Fixed precision. Fixed-precision coordinates are represented as precise internal coordinates, which are rounded to the grid defined by the scale factor. Amount by which to multiply a coordinate after subtracting the offset, to obtain a precise coordinate. Copy constructor to create a new PrecisionModel from an existing one. Compares this PrecisionModel object with the specified object for order. A PrecisionModel is greater than another if it provides greater precision. The comparison is based on the value returned by the {getMaximumSignificantDigits) method. This comparison is not strictly accurate when comparing floating precision models to fixed models; however, it is correct when both models are either floating or fixed. The PrecisionModel with which this PrecisionModel is being compared. A negative integer, zero, or a positive integer as this PrecisionModel is less than, equal to, or greater than the specified PrecisionModel. Return HashCode. Gets the type of this PrecisionModel. Sets internal to the precise representation of external. The original coordinate. The coordinate whose values will be changed to the precise representation of external. Returns the precise representation of external. The original coordinate. The coordinate whose values will be changed to the precise representation of external Returns the external representation of internal. The original coordinate. The coordinate whose values will be changed to the external representation of internal. Sets external to the external representation of internal. The original coordinate. The coordinate whose values will be changed to the external representation of internal. Rounds a numeric value to the PrecisionModel grid. Symmetric Arithmetic Rounding is used, to provide uniform rounding behaviour no matter where the number is on the number line. Rounds a Coordinate to the PrecisionModel grid. Tests whether the precision model supports floating point. true if the precision model supports floating point. Returns the maximum number of significant digits provided by this precision model. Intended for use by routines which need to print out precise values. The maximum number of decimal places provided by this precision model. Returns the multiplying factor used to obtain a precise coordinate. This method is private because PrecisionModel is intended to be an immutable (value) type. the amount by which to multiply a coordinate after subtracting the offset. Returns the x-offset used to obtain a precise coordinate. The amount by which to subtract the x-coordinate before multiplying by the scale. Returns the y-offset used to obtain a precise coordinate. The amount by which to subtract the y-coordinate before multiplying by the scale SizeD is just like a Size class except that it has double valued measures, and expresses sizes in three dimensions. Creates a new instance of SizeD Creates a new SizeD structure. X or longitude size Y or latitude size Z or altitude size Gets or sets the size in the x direction or longitude Gets or sets the size in the y direction or latitude Gets or sets the size in the z direction or altitude Indicates an invalid or inconsistent topological situation encountered during processing Represents a planar triangle, and provides methods for calculating various properties of triangles. The inCentre of a triangle is the point which is equidistant from the sides of the triangle. This is also the point at which the bisectors of the angles meet. The point which is the InCentre of the triangle. A framework for processes which transform an input Geometry into an output Geometry, possibly changing its structure and type(s). This class is a framework for implementing subclasses which perform transformations on various different Geometry subclasses. It provides an easy way of applying specific transformations to given point types, while allowing unhandled types to be simply copied. Also, the framework handles ensuring that if subcomponents change type the parent geometries types change appropriately to maintain valid structure. Subclasses will override whichever TransformX methods they need to to handle particular Geometry types. A typically usage would be a transformation that may transform Polygons into Polygons, LineStrings or Points. This class would likely need to override the TransformMultiPolygon method to ensure that if input Polygons change type the result is a GeometryCollection, not a MultiPolygon. The default behaviour of this class is to simply recursively transform each Geometry component into an identical object by copying. Notice that all TransformX methods may return null, to avoid creating empty point objects. This will be handled correctly by the transformer. The Transform method itself will always return a point object. true if empty geometries should not be included in the result. true if the type of the input should be preserved. Convenience method which provides standard way of creating a CoordinateSequence. The coordinate array to copy. A coordinate sequence for the array. Convenience method which provides statndard way of copying {CoordinateSequence}s The sequence to copy. A deep copy of the sequence. Extracts all the 1-dimensional (LineString) components from a Geometry. Constructs a LineExtracterFilter with a list in which to store LineStrings found. Extracts the linear components from a single point. If more than one point is to be processed, it is more efficient to create a single LineExtracterFilter instance and pass it to multiple geometries. The point from which to extract linear components. The list of linear components. Extracts all the 0-dimensional (Point) components from a Geometry. Constructs a PointExtracterFilter with a list in which to store Points found. Returns the Point components from a single point. If more than one point is to be processed, it is more efficient to create a single PointExtracterFilter instance and pass it to multiple geometries. Extracts all the 2-dimensional (Polygon) components from a Geometry. Constructs a PolygonExtracterFilter with a list in which to store Polygons found. Returns the Polygon components from a single point. If more than one point is to be processed, it is more efficient to create a single PolygonExtracterFilter instance and pass it to multiple geometries. A visitor to Geometry elements which can be short-circuited by a given condition. Unsupported geometry Exception Creates a new instance of the unsupported geometry exception Contains a magnitude and direction Supports more fundamental calculations than LineSegment, rather than topological functions Creates a new empty vector Creates a new instance of a vector where the X, Y and Z terms are the same as the specified coordinate. The ICoordinate to use Creates a new vector from the Point, assuming the tail of the vector is the origin The Point to create a vector from Creates a new vector from a line segment, assuming that the direction is from the start point to the end point A Topology.LineSegment object to turn into a vector Creates a vector that points from the start coordinate to the end coordinate and uses the distance between the two coordinates to form its length. The start coordinate The end coordinate for the vector Creates a mathematical vector from X1, Y1 to X2, Y2 Double, The X coordinate of the start point for the vector Double, The Y coordinate of the start point for the vector Double, the Z coordinate of the start point for the vector Double, The X coordinate of the end point for the vector Double, The Y coordinate of the end point for the vector Double, the Z coordinate of the end point for the vector Creates a mathemtacal vector from the origin to the x, y, z coordinates Double, the X coordinate from the origin Double, the Y coordinate from the origin Double, the Z coordinate from the origin Creates a mathematical vector from the origin with the new magnitude and directions specified Double, the length of the vector The angle in the x-y plane The angle in the z direction Creates a mathematical vector in the X-Y plane with angle Theta Double, The magnitude of the vector Angle, The direction measured counterclockwise from Positive X Axis Creates a new vector from a vector that can be longer or shorter than 3 ordinates. If an X, Y or Z value is not specified, it will become 0. Values greater than the Z ordinate are lost. Creates a new vector based on the first three values on the first row of the matrix. This is useful for working with the result of a transformation matrix. An IMatrixD that should represent the vector Adds each of the elements of V to the elements of this vector Vector, the vector to add to this vector A vector result from the addition Returns the square of the distance of the vector without taking the square root This is the same as doting the vector with itself Double, the square of the distance between the vectors Rotates the vector about the X axis as though the tail of the vector were at the origin The angle in degrees to rotate counter-clockwise when looking at the origin from the positive axis. A new Vector that has been rotated Rotates the vector about the Y axis as though the tail of the vector were at the origin The angle in degrees to rotate counter-clockwise when looking at the origin from the positive axis. A new Vector that has been rotated Rotates the vector about the Z axis as though the tail of the vector were at the origin The angle in degrees to rotate counter-clockwise when looking at the origin from the positive axis. A new Vector that has been rotated Assuming the vector starts at the origin of 0, 0, 0, this function returns a Point representing the tip of the vector. Returns a new segment from this vector, where the StartPoint is 0, 0, 0 and the End Point is the tip of this vector Returns an ICoordinate from this vector, where the X, Y and Z value match the values in this vector an ICoordinate, where the X, Y and Z value match the values in this vector Transforms a point that has 3 dimensions by multiplying it by the specified 3 x 3 matrix in the upper left, but treats the bottom row as supplying the translation coordinates. Rotations and transformations work by applying matrix mathematics, so this creates a 1 x 4 version of this vector. The 4th value is always 1, and allows for the translation terms to work. Subtracts each element of V from each element of this vector Vector, the vector to subtract from this vector A vector result from the subtraction Normalizes the vector. Returns the cross product of this vector with the specified vector V The vector to perform a cross product against A vector result from the inner product Returns the dot product of this vector with V2 The vector to perform an inner product against A Double result from the inner product Compares the values of each element, and if all the elements are equal, returns true. The vector to compare against this vector. Boolean, true if all the elements have the same value. Override for definition of equality for vectors A vector to compare with true if the X, Y, and Z coordinates are all equal Checks first to make sure that both objects are vectors. If they are, then it checks to determine whether or not the X, Y and Z values are equal. The object to test against Returns the hash code.. or something A hash code I guess Returns the scalar product of this vector against a scalar Double, a value to multiply against all the members of this vector A vector multiplied by the scalar Adds the vectors U and V using vector addition, which adds the corresponding components One vector to be added A second vector to be added Returns the Cross Product of two vectors U and V Vector, the first input vector Vector, the second input vector A Vector containing the cross product of U and V Multiplies each component of vector U by the Scalar value A vector representing the vector to be multiplied Double, the scalar value to mulitiply the vector components by A Vector representing the vector product of vector U and the Scalar Returns the Inner Product also known as the dot product of two vectors, U and V The input vector The vector to take the inner product against U a Double containing the dot product of U and V Non-static version of taking the square distance for a vector The vector to find the square of the distance of Double, the square of the distance Multiplies each component of vector U by the Scalar value A vector representing the vector to be multiplied Double, the scalar value to mulitiply the vector components by A Vector representing the vector product of vector U and the Scalar Subtracts Vector V from Vector U A Vector to subtract from A Vector to subtract The Vector difference U - V Adds the vectors U and V using vector addition, which adds the corresponding components One vector to be added A second vector to be added The sum of the vectors Tests equality of the X, Y, and Z members. The left hand side vector to test for equality. The right hand side vector to test for equality. Returns true if X, Y and Z are equal. Tests inequality of the X, Y and Z members. The left hand side vector to test inequality for. The right hand side vector to test inequality for Returns true if X, Y and Z are equal Returns the Cross Product of two vectors U and V Vector, the first input vector Vector, the second input vector A Vector containing the cross product of U and V Returns the Inner Product also known as the dot product of two vectors, U and V The input vector The vector to take the inner product against U a Double containing the dot product of U and V Multiplies the vectors U and V using vector multiplication, which adds the corresponding components A scalar to multpy to the vector A vector to be multiplied The scalar product for the vectors Multiplies each component of vector U by the Scalar value A vector representing the vector to be multiplied Double, the scalar value to mulitiply the vector components by A Vector representing the vector product of vector U and the Scalar Subtracts Vector V from Vector U A Vector to subtract from A Vector to subtract The Vector difference U - V The Euclidean distance from the origin to the tip of the 3 dimensional vector Setting the magntiude won't change the direction. Returns the magnitude of the projection of the vector onto the base.X-Y plane Setting this magnitude will not affect Z, which should be adjusted separately Obtains the angle above the X-Y plane. Positive towards positive Z. Values are in radians from -Pi/2 to Pi/2 Setting this value when no magnitude exists results in a unit vector with angle phi in the X direction. Represents the angle in the X-Y plane. 0 along the positive X axis, and increasing counterclockwise Values are in Radians. Setting this value when no X-Y magnitude exists results in a unit vector between X and Y, but does not affect Z, so you may have something other than a unit vector in 3-D. Set theta before phi in order to obtain a unit vector in 3-D space. WkbGeometryTypes Point. LineString. Polygon. MultiPoint. MultiLineString. MultiPolygon. GeometryCollection. Writes a Well-Known Binary byte data representation of a Geometry. Standard byte size for each complex point. Each complex point (LineString, Polygon, ...) contains: 1 byte for ByteOrder and 4 bytes for WKBType. Initializes writer with LittleIndian byte order. Initializes writer with the specified byte order. Encoding type Writes a WKB representation of a given point. Writes a WKB representation of a given point. Writes LittleIndian ByteOrder. Sets corrent length for Byte Stream. Sets corrent length for Byte Stream. Outputs the textual representation of a Geometry. The WktWriter outputs coordinates rounded to the precision model. No more than the maximum number of necessary decimal places will be output. The Well-known Text format is defined in the OpenGIS Simple Features Specification (http://www.opengis.org/techno/specs.htm) for SQL. A non-standard "LINEARRING" tag is used for LinearRings. The WKT spec does not define a special tag for LinearRings. The standard tag to use is "LINESTRING". Generates the WKT for a Point. The point coordinate. Generates the WKT for a N-point LineString. The sequence to output. Generates the WKT for a 2-point LineString. The first coordinate. The second coordinate. Creates the NumberFormatInfo used to write doubles with a sufficient number of decimal places. The PrecisionModel used to determine the number of decimal places to write. A NumberFormatInfo that write double s without scientific notation. Returns a String of repeated characters. The character to repeat. The number of times to repeat the character. A string of characters. Converts a Geometry to its Well-known Text representation. A Geometry to process. A Geometry Tagged Text string (see the OpenGIS Simple Features Specification). Converts a Geometry to its Well-known Text representation. A Geometry to process. Same as write, but with newlines and spaces to make the well-known text more readable. A Geometry to process A "Geometry Tagged Text" string (see the OpenGIS Simple Features Specification), with newlines and spaces. Same as write, but with newlines and spaces to make the well-known text more readable. A Geometry to process Converts a Geometry to its Well-known Text representation. A Geometry to process Converts a Geometry to <Geometry Tagged Text format, then appends it to the writer. /he Geometry to process. /he output writer to append to. Converts a Coordinate to Point Tagged Text format, then appends it to the writer. The Coordinate to process. The output writer to append to. Converts a LineString to <LineString Tagged Text format, then appends it to the writer. The LineString to process. The output writer to append to. Converts a LinearRing to <LinearRing Tagged Text format, then appends it to the writer. The LinearRing to process. The output writer to append to. Converts a Polygon to Polygon Tagged Text format, then appends it to the writer. The Polygon to process. The output writer to append to. Converts a MultiPoint to <MultiPoint Tagged Text format, then appends it to the writer. The MultiPoint to process. The output writer to append to. Converts a MultiLineString to MultiLineString Tagged Text format, then appends it to the writer. The MultiLineString to process. The output writer to append to. Converts a MultiPolygon to MultiPolygon Tagged Text format, then appends it to the writer. The MultiPolygon to process. The output writer to append to. Converts a GeometryCollection to GeometryCollection Tagged Text format, then appends it to the writer. The GeometryCollection to process. The output writer to append to. Converts a Coordinate to Point Text format, then appends it to the writer. The Coordinate to process. The output writer to append to. Converts a Coordinate to Point format, then appends it to the writer. The Coordinate to process. The output writer to append to. The PrecisionModel to use to convert from a precise coordinate to an external coordinate. Converts a to a , not in scientific notation. The to convert. The as a , not in scientific notation. Converts a LineString to <LineString Text format, then appends it to the writer. The LineString to process. The output writer to append to. Converts a Polygon to Polygon Text format, then appends it to the writer. The Polygon to process. The output writer to append to. Converts a MultiPoint to <MultiPoint Text format, then appends it to the writer. The MultiPoint to process. The output writer to append to. Converts a MultiLineString to <MultiLineString Text format, then appends it to the writer. The MultiLineString to process. The output writer to append to. Converts a MultiPolygon to <MultiPolygon Text format, then appends it to the writer. The MultiPolygon to process. The output writer to append to. Converts a GeometryCollection to GeometryCollectionText format, then appends it to the writer. The GeometryCollection to process. The output writer to append to. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The argument %S cannot be negative.. Looks up a localized string similar to The argument %S1 could not be successfully cast into %S2.. Looks up a localized string similar to The argument %S was outside the range of accepted values.. Looks up a localized string similar to The class %S is not supported.. Looks up a localized string similar to The number of ordinates did not match between the dimensions, so the hyperdistance cannot be accurately calculated.. Looks up a localized string similar to The same directed edge appeared more than once.. Looks up a localized string similar to Geometry collections are not supported for this method.. Looks up a localized string similar to The number of dimensions in at least one argument is insufficient for this calculation.. Looks up a localized string similar to The number of dimensions in %S is insufficient for this calculation.. Looks up a localized string similar to An invalid octant was specified: %S. Looks up a localized string similar to The specified key already exists in the tree.. Looks up a localized string similar to The specified key could not be found in the tree.. Looks up a localized string similar to The size of the key did not match the size of the tree.. Looks up a localized string similar to Found null Directed Edge in ring. Looks up a localized string similar to Holes must not contain null elements. Looks up a localized string similar to Shell is empty but holes are not. Looks up a localized string similar to The ICollection is read-only.. Looks up a localized string similar to Points in shell and hole appear to be equal. Looks up a localized string similar to The code execution should never have reached this location.. Looks up a localized string similar to Side location conflict at. Looks up a localized string similar to Found single null side at. Looks up a localized string similar to Assigned depths do not match. Looks up a localized string similar to Found two horizontal edges incident on node.. Looks up a localized string similar to Unsupported Geometry classes should be caught in the GeometryEditorOperation.. Computes the centroid of an area point. Algorithm: Based on the usual algorithm for calculating the centroid as a weighted sum of the centroids of a decomposition of the area into (possibly overlapping) triangles. The algorithm has been extended to handle holes and multi-polygons. See for further details of the basic approach. Adds the area defined by a Geometry to the centroid total. If the point has no area it does not contribute to the centroid. The point to add. Adds the area defined by an array of coordinates. The array must be a ring; i.e. end with the same coordinate as it starts with. An array of Coordinates. Returns three times the centroid of the triangle p1-p2-p3. The factor of 3 is left in to permit division to be avoided until later. Returns twice the signed area of the triangle p1-p2-p3, positive if a, b, c are oriented Ccw, and negative if cw. Computes the centroid of a linear point. Algorithm: Compute the average of the midpoints of all line segments weighted by the segment length. Adds the linestring(s) defined by a Geometry to the centroid total. If the point is not linear it does not contribute to the centroid. The point to add. Adds the length defined by an array of coordinates. An array of Coordinates. Computes the centroid of a point point. Algorithm: Compute the average of all points. Adds the point(s) defined by a Geometry to the centroid total. If the point is not of dimension 0 it does not contribute to the centroid. The point to add. Adds the length defined by a coordinate. A coordinate. Specifies and implements various fundamental Computational Geometric algorithms. The algorithms supplied in this class are robust for double-precision floating point. A value that indicates an orientation of clockwise, or a right turn. A value that indicates an orientation of clockwise, or a right turn. A value that indicates an orientation of counterclockwise, or a left turn. A value that indicates an orientation of counterclockwise, or a left turn. A value that indicates an orientation of collinear, or no turn (straight). A value that indicates an orientation of collinear, or no turn (straight). Returns the index of the direction of the point q relative to a vector specified by p1-p2. The origin point of the vector. The final point of the vector. The point to compute the direction to. 1 if q is counter-clockwise (left) from p1-p2, -1 if q is clockwise (right) from p1-p2, 0 if q is collinear with p1-p2. Test whether a point lies inside a ring. The ring may be oriented in either direction. If the point lies on the ring boundary the result of this method is unspecified. This algorithm does not attempt to first check the point against the envelope of the ring. Point to check for ring inclusion. Assumed to have first point identical to last point. true if p is inside ring. Test whether a point lies on the line segments defined by a list of coordinates. true true if the point is a vertex of the line or lies in the interior of a line segment in the linestring. Computes whether a ring defined by an array of s is oriented counter-clockwise. The list of points is assumed to have the first and last points equal. This will handle coordinate lists which contain repeated points. This algorithm is only guaranteed to work with valid rings. If the ring is invalid (e.g. self-crosses or touches), the computed result may not be correct. > Computes the orientation of a point q to the directed line segment p1-p2. The orientation of a point relative to a directed line segment indicates which way you turn to get to q after travelling from p1 to p2. 1 if q is counter-clockwise from p1-p2, -1 if q is clockwise from p1-p2, 0 if q is collinear with p1-p2- Computes the distance from a point p to a line segment AB. Notice: NON-ROBUST! The point to compute the distance for. One point of the line. Another point of the line (must be different to A). The distance from p to line segment AB. Computes the perpendicular distance from a point p to the (infinite) line containing the points AB The point to compute the distance for. One point of the line. Another point of the line (must be different to A). The perpendicular distance from p to line AB. Computes the distance from a line segment AB to a line segment CD. Notice: NON-ROBUST! A point of one line. The second point of the line (must be different to A). One point of the line. Another point of the line (must be different to A). The distance from line segment AB to line segment CD. Returns the signed area for a ring. The area is positive if the ring is oriented CW. Area in Meters (by default) when using projected coordinates. Computes the length of a linestring specified by a sequence of points. The points specifying the linestring. The length of the linestring. Computes the convex hull of a . The convex hull is the smallest convex Geometry that contains all the points in the input Geometry. Uses the Graham Scan algorithm. Create a new convex hull construction for the input Geometry. Create a new convex hull construction for the input array. Returns a Geometry that represents the convex hull of the input point. The point will contain the minimal number of points needed to represent the convex hull. In particular, no more than two consecutive points will be collinear. If the convex hull contains 3 or more points, a Polygon; 2 points, a LineString; 1 point, a Point; 0 points, an empty GeometryCollection. Uses a heuristic to reduce the number of points scanned to compute the hull. The heuristic is to find a polygon guaranteed to be in (or on) the hull, and eliminate all points inside it. A quadrilateral defined by the extremal points in the four orthogonal directions can be used, but even more inclusive is to use an octilateral defined by the points in the 8 cardinal directions. Notice that even if the method used to determine the polygon vertices is not 100% robust, this does not affect the robustness of the convex hull. Whether the three coordinates are collinear and c2 lies between c1 and c3 inclusive. The vertices of a linear ring, which may or may not be flattened (i.e. vertices collinear). A 2-vertex LineString if the vertices are collinear; otherwise, a Polygon with unnecessary (collinear) vertices removed. The vertices of a linear ring, which may or may not be flattened (i.e. vertices collinear). The coordinates with unnecessary (collinear) vertices removed. Compares s for their angle and distance relative to an origin. Initializes a new instance of the class. Represents a homogeneous coordinate for 2-D coordinates. Computes the (approximate) intersection point between two line segments using homogeneous coordinates. Notice that this algorithm is not numerically stable; i.e. it can produce intersection points which lie outside the envelope of the line segments themselves. In order to increase the precision of the calculation input points should be normalized before passing them to this routine. Direct access to x private field Direct access to y private field Direct access to w private field Computes a point in the interior of an area point. Algorithm: Find the intersections between the point and the horizontal bisector of the area's envelope Pick the midpoint of the largest intersection (the intersections will be lines and points) Notice: If a fixed precision model is used, in some cases this method may return a point which does not lie in the interior. Tests the interior vertices (if any) defined by a linear Geometry for the best inside point. If a Geometry is not of dimension 1 it is not tested. The point to add. Adds a polygon. The polygon to add.> If point is a collection, the widest sub-point; otherwise, the point itself. Returns the centre point of the envelope. The envelope to analyze. The centre of the envelope. Computes a point in the interior of an linear point. Algorithm: Find an interior vertex which is closest to the centroid of the linestring. If there is no interior vertex, find the endpoint which is closest to the centroid. Tests the interior vertices (if any) defined by a linear Geometry for the best inside point. If a Geometry is not of dimension 1 it is not tested. The point to add. Tests the endpoint vertices defined by a linear Geometry for the best inside point. If a Geometry is not of dimension 1 it is not tested. The point to add. Computes a point in the interior of an point point. Algorithm: Find a point which is closest to the centroid of the point. Tests the point(s) defined by a Geometry for the best inside point. If a Geometry is not of dimension 0 it is not tested. The point to add. IntersectionTypes No intersection occurs The lines intersect in a single point The lines intersect by overlapping An interface for classes which test whether a Coordinate lies inside a ring. A LineIntersector is an algorithm that can both test whether two line segments intersect and compute the intersection point if they do. The intersection point may be computed in a precise or non-precise manner. Computing it precisely involves rounding it to an integer. (This assumes that the input coordinates have been made precise by scaling them to an integer grid.) The indexes of the endpoints of the intersection lines, in order along the corresponding line If MakePrecise is true, computed intersection coordinates will be made precise using Coordinate.MakePrecise. Computes the "edge distance" of an intersection point p along a segment. The edge distance is a metric of the point along the edge. The metric used is a robust and easy to compute metric function. It is not equivalent to the usual Euclidean metric. It relies on the fact that either the x or the y ordinates of the points in the edge are unique, depending on whether the edge is longer in the horizontal or vertical direction. Notice: This function may produce incorrect distances for inputs where p is not precisely on p1-p2 (E.g. p = (139, 9) p1 = (139, 10), p2 = (280, 1) produces distanct 0.0, which is incorrect. My hypothesis is that the function is safe to use for points which are the result of rounding points which lie on the line, but not safe to use for truncated points. This function is non-robust, since it may compute the square of large numbers. Currently not sure how to improve this. Compute the intersection of a point p and the line p1-p2. This function computes the bool value of the hasIntersection test. The actual value of the intersection (if there is one) is equal to the value of p. Computes the intersection of the lines p1-p2 and p3-p4. This function computes both the bool value of the hasIntersection test and the (approximate) value of the intersection point itself (if there is one). Returns the intIndex'th intersection point. is 0 or 1. The intIndex'th intersection point. Test whether a point is a intersection point of two line segments. Notice that if the intersection is a line segment, this method only tests for equality with the endpoints of the intersection segment. It does not return true if the input point is internal to the intersection segment. true if the input point is one of the intersection points. Tests whether either intersection point is an interior point of one of the input segments. true if either intersection point is in the interior of one of the input segment. Tests whether either intersection point is an interior point of the specified input segment. true if either intersection point is in the interior of the input segment. Computes the coordinate of the intIndex'th intersection point in the direction of a specified input line segment. The segment index from 0 to 1. The integer intersection index from 0 to 1. The coordinate of the intIndex'th intersection point in the direction of the specified input line segment. Computes the index of the intIndex'th intersection point in the direction of a specified input line segment, and returns the integer index. The integer segment index from 0 to 1. The integer intersection index from 0 to 1. The integer index of the intersection point along the segment (0 or 1). Computes the integer line index of the specified integer segment index. The integer index of the segment. Computes the "edge distance" of an intersection point along the specified input line segment. The integer segment index from 0 to 1. The integer intersection index from 0 to 1. The edge distance of the intersection point. Gets or sets the first intersection coordinate, if any. Gets or sets the second intersection coordiante, if any. Force computed intersection to be rounded to a given precision model Force computed intersection to be rounded to a given precision model. No getter is provided, because the precision model is not required to be specified. Tests whether the input geometries intersect. true if the input geometries intersect. Returns the number of intersection points found. This will be either 0, 1 or 2. Gets the array of intersection points Gets or sets a two dimensional array of coordinates representing the input lines for the calculation This is true if the intersection forms a line Gets Whether this is both propper and has an intersection Tests whether an intersection is proper. The intersection between two line segments is considered proper if they intersect in a single point in the interior of both segments (e.g. the intersection is a single point and is not equal to any of the endpoints). The intersection between a point and a line segment is considered proper if the point lies in the interior of the segment (e.g. is not equal to either of the endpoints). true if the intersection is proper. Gets or sets the integer result Implements IPointInRing using a MonotoneChains and a BinTree index to increase performance. The action for the internal iterator for performing envelope select queries on a MonotoneChain. These envelopes are used during the MonotoneChain search process. This function can be overridden if the original chain is needed. This is a convenience function which can be overridden to obtain the actual line segment which is selected. Computes the minimum diameter of a Geometry. The minimum diameter is defined to be the width of the smallest band that contains the point, where a band is a strip of the plane defined by two parallel lines. This can be thought of as the smallest hole that the point can be moved through, with a single rotation. The first step in the algorithm is computing the convex hull of the Geometry. If the input Geometry is known to be convex, a hint can be supplied to avoid this computation. Compute a minimum diameter for a giver Geometry. a Geometry. Compute a minimum diameter for a giver Geometry, with a hint if the Geometry is convex (e.g. a convex Polygon or LinearRing, or a two-point LineString, or a Point). a Geometry which is convex. true if the input point is convex. Compute the width information for a ring of Coordinates. Leaves the width information in the instance variables. Gets the length of the minimum diameter of the input Geometry. The length of the minimum diameter. Gets the Coordinate forming one end of the minimum diameter. A coordinate forming one end of the minimum diameter. Gets the segment forming the base of the minimum diameter. The segment forming the base of the minimum diameter. Gets a LineString which is a minimum diameter. A LineString which is a minimum diameter. Non-robust versions of various fundamental Computational Geometric algorithms, FOR TESTING PURPOSES ONLY!. The non-robustness is due to rounding error in floating point computation. Computes whether a ring defined by an array of Coordinate is oriented counter-clockwise. This will handle coordinate lists which contain repeated points. an array of coordinates forming a ring. true if the ring is oriented counter-clockwise. throws ArgumentException if the ring is degenerate (does not contain 3 different points) A non-robust version of LineIntersector. true if both numbers are positive or if both numbers are negative, false if both numbers are zero. RParameter computes the parameter for the point p in the parameterized equation of the line from p1 to p2. This is equal to the 'distance' of p along p1-p2. Computes the topological relationship (Location) of a single point to a Geometry. The algorithm obeys the SFS boundaryDetermination rule to correctly determine whether the point lies on the boundary or not. Notice that instances of this class are not reentrant. Convenience method to test a point for intersection with a Geometry The coordinate to test. The Geometry to test. true if the point is in the interior or boundary of the Geometry. Computes the topological relationship ({Location}) of a single point to a Geometry. It handles both single-element and multi-element Geometries. The algorithm for multi-part Geometries takes into account the boundaryDetermination rule. The Location of the point relative to the input Geometry. Implements an algorithm to compute the sign of a 2x2 determinant for double precision values robustly. It is a direct translation of code developed by Olivier Devillers. The original code carries the following copyright notice: ************************************************************************ Author : Olivier Devillers Olivier.Devillers@sophia.inria.fr http:/www.inria.fr:/prisme/personnel/devillers/anglais/determinant.html ************************************************************************* ************************************************************************* Copyright (c) 1995 by INRIA Prisme Project BP 93 06902 Sophia Antipolis Cedex, France. All rights reserved ************************************************************************* returns -1 if the determinant is negative, returns 1 if the determinant is positive, retunrs 0 if the determinant is null. A robust version of LineIntersector. This method computes the actual value of the intersection point. To obtain the maximum precision from the intersection calculation, the coordinates are normalized by subtracting the minimum ordinate values (in absolute value). This has the effect of removing common significant digits from the calculation to maintain more bits of precision. Normalize the supplied coordinates to so that the midpoint of their intersection envelope lies at the origin. Test whether a point lies in the envelopes of both input segments. A correctly computed intersection point should return true for this test. Since this test is for debugging purposes only, no attempt is made to optimize the envelope test. true if the input point lies within both input segment envelopes. Computes whether a point lies in the interior of an area Geometry. The algorithm used is only guaranteed to return correct results for points which are not on the boundary of the Geometry. Locate is the main location function. It handles both single-element and multi-element Geometries. The algorithm for multi-element Geometries is more complex, since it has to take into account the boundaryDetermination rule. The coordinate to locate. The Geometry to locate the coordinate in. Tests whether a Coordinate lies inside a ring, using a linear-time algorithm. Implements PointInRing using a SIRtree index to increase performance. A ClassNotSupportedException Class Creates a new instance of ClassNotSupportedException A visitor for items in an index. An BinTree (or "Binary Interval Tree") is a 1-dimensional version of a quadtree. It indexes 1-dimensional intervals (which of course may be the projection of 2-D objects on an axis). It supports range searching (where the range may be a single point). This implementation does not require specifying the extent of the inserted items beforehand. It will automatically expand to accomodate any extent of dataset. This index is different to the Interval Tree of Edelsbrunner or the Segment Tree of Bentley. Ensure that the Interval for the inserted item has non-zero extents. Use the current minExtent to pad it, if necessary. min and max may be the same value. Compute the total number of nodes in the tree. The number of nodes in the tree. Represents an (1-dimensional) closed interval on the Real number line. A Key is a unique identifier for a node in a tree. It contains a lower-left point and a level number. The level number is the power of two for the size of the node envelope. Return a square envelope containing the argument envelope, whose extent is a power of two and which is based at a power of 2. A node of a Bintree. The base class for nodes in a Bintree. Subnodes are numbered as follows: 0 | 1 Adds the specified object to the items list for this node. This will not affect child nodes. The object item to add to the list. Returns the index of the subnode that wholely contains the given interval. If none does, returns -1. Gets the count of all the items in this node, plus all the items in all of the child nodes Gets an integer representing the maximum levels needed to be decended to account for all the child nodes Gets a list of all the items currently stored in this node. This does not include any items from child nodes. Gets the count of this node plus all of the child nodes Gets the array of all the sub-nodes below this node. Returns the subnode containing the envelope. Creates the node if it does not already exist. Returns the smallest existing node containing the envelope. Get the subnode for the index. If it doesn't exist, create it. The root node of a single Bintree. It is centred at the origin, and does not have a defined extent. Insert an item into the tree this is the root of. Insert an item which is known to be contained in the tree rooted at the given Node. Lower levels of the tree will be created if necessary to hold the item. The root node matches all searches. MonotoneChains are a way of partitioning the segments of a linestring to allow for fast searching of intersections. They have the following properties: the segments within a monotone chain will never intersect each other the envelope of any contiguous subset of the segments in a monotone chain is equal to the envelope of the endpoints of the subset. Property 1 means that there is no need to test pairs of segments from within the same monotone chain for intersection. Property 2 allows binary search to be used to find the intersection points of two monotone chains. For many types of real-world data, these properties eliminate a large number of segment comparisons, producing substantial speed gains. One of the goals of this implementation of MonotoneChains is to be as space and time efficient as possible. One design choice that aids this is that a MonotoneChain is based on a subarray of a list of points. This means that new arrays of points (potentially very large) do not have to be allocated. MonotoneChains support the following kinds of queries: Envelope select: determine all the segments in the chain which intersect a given envelope. Overlap: determine all the pairs of segments in two chains whose envelopes overlap. This implementation of MonotoneChains uses the concept of internal iterators to return the resultsets for the above queries. This has time and space advantages, since it is not necessary to build lists of instantiated objects to represent the segments returned by the query. However, it does mean that the queries are not thread-safe. Gets a copy of the line segment located at the specified index. Determine all the line segments in the chain whose envelopes overlap the searchEnvelope, and process them. Return the subsequence of coordinates forming this chain. Allocates a new array to hold the Coordinates. A MonotoneChainBuilder implements static functions to determine the monotone chains in a sequence of points. Only static methods! Return a list of the MonotoneChains for the given list of coordinates. Return an array containing lists of start/end indexes of the monotone chains for the given list of coordinates. The last entry in the array points to the end point of the point array, for use as a sentinel. The index of the last point in the monotone chain starting at start. The action for the internal iterator for performing overlap queries on a MonotoneChain. This function can be overridden if the original chains are needed. The index of the start of the overlapping segment from mc1. The index of the start of the overlapping segment from mc2. This is a convenience function which can be overridden to obtain the actual line segments which overlap. This envelope is used during the MonotoneChain search process. This envelope is used during the MonotoneChain search process. One overlapping segment. The other overlapping segment. A visitor for nodes and items in an index. The basic insertion and query operations supported by classes implementing spatial index algorithms. A spatial index typically provides a primary filter for range rectangle queries. A secondary filter is required to test for exact intersection. Of course, this secondary filter may consist of other tests besides intersection, such as testing other kinds of spatial relationships. Adds a spatial item with an extent specified by the given Envelope to the index. Queries the index for all items whose extents intersect the given search Envelope Notice that some kinds of indexes may also return objects which do not in fact intersect the query envelope. The envelope to query for. A list of the items found by the query. Queries the index for all items whose extents intersect the given search , and applies an to them. Notice that some kinds of indexes may also return objects which do not in fact intersect the query envelope. The envelope to query for. A visitor object to apply to the items found. Removes a single item from the tree. The Envelope of the item to remove. The item to remove. true if the item was found. Bjoern Heckel's solution to the KD-Tree n-nearest-neighbor problem Creates a new NearestNeighborList An integer indicating the maximum size for the cue Inserts an object with a given priority Removes the highest member from the cue and returns that object. Gets the minimum priority, or distance. Since we are looking for the maximum distance, or the n maximum distances, we want to determine quickly the lowest distance currently contained in the cue. Gets whether or not the length of the cue has reached the capacity Gets the highest object in the nearest neighbor list Gets a boolean indicating whether or not the cue is empty Gets the length of the current list Hyper-Point class supporting KdTree class Constructs a new HyperPoint where numDimensions indicates the size of the array for the coordinates The number of dimensions Constructs a new HyperPoint where the specified array of doubles defines the internal coordinate values. The in coordinate to use when constructing this hyper point. A Static method for returning the square distance between two coordinates One coordinate A second coordinate A double representing the square distance Calculates the Euclidean distance between the two coordinates An ICoordinate Another ICoordinate A double representing the distance Calculates the distance in comparison with any coordinate. The coordinate with fewer dimensions will determine the dimensionality for the comparison. Calculates the square of the Euclidean distance between this point and the other point. Any valid implementation of ICoordinate A double representing the distances. Gets or sets the actual values for this class. Hyper-Rectangle class supporting KdTree class Maximum values Minimum values Constructs a new instance of a rectangle binding structure based on a specified number of dimensions An integer representing the number of dimensions. For X, Y coordinates, this should be 2. Creates a new bounding rectangle based on the two coordinates specified. It is assumed that the vmin and vmax coordinates have already been correctly calculated. Creates a duplicate of this object An object duplicate of this object Creates a duplicate of this bounding box using the existing minimum and maximum. An HRect duplicate of this object Calculates the closest point on the hyper-extent to the specified point. from Moore's eqn. 6.6 This method calculates the furthest point on the rectangle from the specified point. This is to determine if it is possible for any of the members of the closer rectangle to be positioned further away from the test point than the points in the hyper-extent that is further from the point. Calculates a new HRect object that has a nearly infinite bounds. THe number of dimensions to use A new HRect where the minimum is negative infinity, and the maximum is positive infinity Used in initial conditions of KdTree.nearest() If the specified HRect does not intersect this HRect, this returns null. Otherwise, this will return a smaller rectangular region that represents the intersection of the two bounding regions. Another HRect object to intersect with this one. The HRect that represents the intersection area for the two bounding boxes. currently unused Creates a string that represents this bounding box A String Gets the current hyper-volume. For 1D, this is Length. For 2D this is Area. For 3D this is Volume. Gets or sets the minimum coordinate (containing the smaller value) in all dimensions. Gets or sets the maximum coordinate Gets the number of ordinates for this rectangular structure (based on the minimum HPoint) K-D Tree node class Constructs a new instance of the KDNode. A Hyper Point representing the key to use for storing this value A valid object value to use for copying this. The constructor is used only by class; other methods are static Creates a string representation of this node The depth of child nodes to search when creating the string. A string representation of this node. Inserts a Method ins translated from 352.ins.c of Gonnet and Baeza-Yates Searches for a specific value Method srch translated from 352.srch.c of Gonnet and Baeza-Yates Searches for values in a range Method rsearch translated from 352.range.c of Gonnet and Baeza-Yates Method Nearest Neighbor from Andrew Moore's thesis. Numbered comments are direct quotes from there. Step "SDL" is added to make the algorithm work correctly. NearestNeighborList solution courtesy of Bjoern Heckel. This method was written by Ted Dunsford by restructuring the nearest neighbor algorithm presented by Andrew and Bjoern Since this is recursive, this represents the current node The target is the HPoint that we are trying to calculate the farthest distance from In this case, the hr is the hyper rectangle bounding the region that must contain the furthest point. The maximum distance that we have calculated thus far, and will therefore be testing against. The integer based level of that we have recursed to in the tree The dimensionality of the kd tree A list to contain the output, prioritized by distance Gets or sets whether this node has been _isDeleted This is an adaptation of the Java KdTree library implemented by Levy and Heckel. This simplified version is written by Marco A. Alvarez KdTree is a class supporting KD-tree insertion, deletion, equality search, range search, and nearest neighbor(s) using double-precision floating-point keys. Splitting dimension is chosen naively, by depth modulo K. Semantics are as follows: Two different keys containing identical numbers should retrieve the same value from a given KD-tree. Therefore keys are cloned when a node is inserted. As with Hashtables, values inserted into a KD-tree are not cloned. Modifying a value between insertion and retrieval will therefore modify the value stored in the tree. @author Simon Levy, Bjoern Heckel Translation by Marco A. Alvarez Adapted by Ted Dunsford to better suite the dot net framework by changing comments to work in intellisense and extending some of the basic objects to work more tightly with MapWindow. Creates a new tree with the specified number of dimensions. An integer value specifying how many ordinates each key should have. Insert a node into the KD-tree. The array of double valued keys marking the position to insert this object into the tree The object value to insert into the tree if key.length mismatches the dimension of the tree (K) if the key already exists in the tree Uses algorithm translated from 352.ins.c of @Book{GonnetBaezaYates1991, author = {G.H. Gonnet and R. Baeza-Yates}, title = {Handbook of Algorithms and Data Structures}, publisher = {Addison-Wesley}, year = {1991} Find the KD-tree node whose key is identical to the specified key. This uses the algorithm translated from 352.srch.c of Connet and Baeza-Yates. The key identifying the node to search for An object that is the node with a matching key, or null if no key was found. if key.length mismatches the dimension of the tree (K) Deletes a node from the KD-tree. Instead of actually deleting the node and rebuilding the tree, it marks the node as deleted. Hence, it is up to the caller to rebuild the tree as needed for efficiency. The key to use to identify the node to delete if key.length mismatches the dimension of the tree (K) if the key was not found in the tree Find KD-tree node whose key is nearest neighbor to key. Implements the Nearest Neighbor algorithm (Table 6.4) of key for KD-tree node object at node nearest to key, or null on failure if key.length mismatches the dimensions of the tree (K) @techreport{AndrewMooreNearestNeighbor, author = {Andrew Moore}, title = {An introductory tutorial on kd-trees}, institution = {Robotics Institute, Carnegie Mellon University}, year = {1991}, number = {Technical Report No. 209, Computer Laboratory, University of Cambridge}, address = {Pittsburgh, PA} Find KD-tree nodes whose keys are n nearest neighbors to key. Uses algorithm above. Neighbors are returned in ascending order of distance to key. key for KD-tree node The Integer showing how many neighbors to find An array of objects at the node nearest to the key Mismatch if key length doesn't match the dimension for the tree if n is negative or exceeds tree size Reverses the conventional nearest neighbor in order to obtain the furthest neighbor instead. The key for the KD-tree node The object that corresponds to the furthest object Find KD-tree nodes whose keys are n farthest neighbors from key. Neighbors are returned in descending order of distance to key. key for KD-tree node The Integer showing how many neighbors to find An array of objects at the node nearest to the key Mismatch if key length doesn't match the dimension for the tree if n is negative or exceeds tree size Search a range in the KD-tree. The lower bound in all ordinates for keys Teh upper bound in all ordinates for keys An array of objects whose keys fall in range [lowk, uppk] Range search in a KD-tree. Uses algorithm translated from 352.range.c of Gonnet and Baeza-Yates. Mismatch of the specified parameters compared with the tree or each other. Converts the value to a string A string Gets the number of members in this tree. Gets the actual number of dimensions for this tree. KeyDuplicateException is thrown when the KdTree.insert method is invoked on a key already in the KdTree. @author Simon Levy Translation by Marco A. Alvarez KeyDuplicateException Key-size mismatch exception supporting KdTree class @author Simon Levy Translation by Marco A. Alvarez KeyMissing Exception KeySizeException is thrown when a KdTree method is invoked on a key whose size (array length) mismatches the one used in the that KdTree's constructor. @author Simon Levy Translation by Marco A. Alvarez KeySizeException Bjoern Heckel's solution to the KD-Tree n-nearest-neighbor problem Indicates whether removal should occur from the highest value or lowest value Creates a new NearestNeighborList An integer indicating the maximum size for the cue Inserts an item with a given priority Removes the highest member from the cue and returns that object. Gets the maximum priority Gets whether or not the length fo the cue has reached the capacity Gets the highest object in the nearest neighbor list Gets a boolean indicating whether or not the cue is empty Gets the length of the current list NeighborsOutOfRangeException Creates a new NeighborsOutOfRangeException This class implements a PriorityQueue. This class is implemented in such a way that objects are added using an add function. The add function takes two parameters an object and a long. The object represents an item in the queue, the long indicates its priority in the queue. The remove function in this class returns the object first in the queue and that object is removed from the queue permanently. @author Simon Levy Translation by Marco A. Alvarez The maximum priority possible in this priority queue. Holds the number of elements currently in the queue. This contains the list of objects in the queue. This contains the list of prioritys in the queue. Creates a new PriorityQueue object. The PriorityQueue object allows objects to be entered into the queue and to leave in the order of priority i.e the highest priority get's to leave first. Creates a new PriorityQueue object. The PriorityQueue object allows objects to be entered into the queue an to leave in the order of priority i.e the highest priority get's to leave first. @param capacity the initial capacity of the queue before a resize Creates a new PriorityQueue object. The PriorityQueue object allows objects to be entered into the queue an to leave in the order of priority i.e the highest priority get's to leave first. @param capacity the initial capacity of the queue before a resize @param maxPriority is the maximum possible priority for an object This is an initializer for the object. It basically initializes an array of long called value to represent the prioritys of the objects, it also creates an array of objects to be used in parallel with the array of longs, to represent the objects entered, these can be used to sequence the data. @param size the initial capacity of the queue, it can be resized This function adds the given object into the PriorityQueue, its priority is the long priority. The way in which priority can be associated with the elements of the queue is by keeping the priority and the elements array entrys parallel. @param element is the object that is to be entered into this PriorityQueue @param priority this is the priority that the object holds in the PriorityQueue Remove is a function to remove the element in the queue with the maximum priority. Once the element is removed then it can never be recovered from the queue with further calls. The lowest priority object will leave last. @return the object with the highest priority or if it's empty null Bubble down is used to put the element at subscript 'pos' into it's rightful place in the heap (i.e heap is another name for PriorityQueue). If the priority of an element at subscript 'pos' is less than it's children then it must be put under one of these children, i.e the ones with the maximum priority must come first. @param pos is the position within the arrays of the element and priority Bubble up is used to place an element relatively low in the queue to it's rightful place higher in the queue, but only if it's priority allows it to do so, similar to bubbleDown only in the other direction this swaps out its parents. @param pos the position in the arrays of the object to be bubbled up This ensures that there is enough space to keep adding elements to the priority queue. It is however advised to make the capacity of the queue large enough so that this will not be used as it is an expensive method. This will copy across from 0 as 'off' equals 0 is contains some important data. This method will empty the queue. This also helps garbage collection by releasing any reference it has to the elements in the queue. This starts from offset 1 as off equals 0 for the elements array. The number of elements in the queue. The length indicates the number of elements that are currently in the queue. @return the number of elements in the queue DoubleBits manipulates Double numbers by using bit manipulation and bit-field extraction. For some operations (such as determining the exponent) this is more accurate than using mathematical operations (which suffer from round-off error). The algorithms and constants in this class apply only to IEEE-754 double-precision floating point format. This computes the number of common most-significant bits in the mantissa. It does not count the hidden bit, which is always 1. It does not determine whether the numbers have the same exponent - if they do not, the value computed by this function is meaningless. The number of common most-significant mantissa bits. A representation of the Double bits formatted for easy readability. Determines the exponent for the number. Determines the exponent for the number. Provides a test for whether an interval is so small it should be considered as zero for the purposes of inserting it into a binary tree. The reason this check is necessary is that round-off error can cause the algorithm used to subdivide an interval to fail, by computing a midpoint value which does not lie strictly between the endpoints. This value is chosen to be a few powers of 2 less than the number of bits available in the double representation (i.e. 53). This should allow enough extra precision for simple computations to be correct, at least for comparison purposes. Computes whether the interval [min, max] is effectively zero width. I.e. the width of the interval is so much less than the location of the interval that the midpoint of the interval cannot be represented precisely. A Key is a unique identifier for a node in a quadtree. It contains a lower-left point and a level number. The level number is the power of two for the size of the node envelope. Return a square envelope containing the argument envelope, whose extent is a power of two and which is based at a power of 2. Represents a node of a Quadtree. Nodes contain items which have a spatial extent corresponding to the node's position in the quadtree. The base class for nodes in a Quadtree. subquads are numbered as follows: 2 | 3 --+-- 0 | 1 Adds a new item to this node. The item to add to this node Insert items in this into the parameter! IList for adding items. Parameter IList with this items. Removes a single item from this subtree. The envelope containing the item. The item to remove. true if the item was found and removed. Returns the index of the subquad that wholly contains the given envelope. If none does, returns -1. Because more than one item can be stored in each node, this returns the total count of items contained by this node and its child nodes. Gets an integer representing how deem the deepest child of this node extends. Gets or sets the array of 4 nodes represnting the spatial quadrants being used as children 2 | 3 --+-- 0 | 1 Gets a boolean indicating whehter or not this node links to any nodes below it in the tree Each node can store multiple items. This tests whether or not there are items in this node. If this node has no childern or items, then it can be pruned If this node has an item, or if any of the children of this node has an item, then this is false. Gets or sets the list of items that are stored in this node Gets an integer representing this node and the count of all of the children in its subnodes Returns the subquad containing the envelope. Creates the subquad if it does not already exist. Returns the smallest existing node containing the envelope. Get the subquad for the index. If it doesn't exist, create it. A Quadtree is a spatial index structure for efficient querying of 2D rectangles. If other kinds of spatial objects need to be indexed they can be represented by their envelopes The quadtree structure is used to provide a primary filter for range rectangle queries. The Query() method returns a list of all objects which may intersect the query rectangle. Notice that it may return objects which do not in fact intersect. A secondary filter is required to test for exact intersection. Of course, this secondary filter may consist of other tests besides intersection, such as testing other kinds of spatial relationships. This implementation does not require specifying the extent of the inserted items beforehand. It will automatically expand to accomodate any extent of dataset. This data structure is also known as an MX-CIF quadtree following the usage of Samet and others. Root of Quadtree minExtent is the minimum envelope extent of all items inserted into the tree so far. It is used as a heuristic value to construct non-zero envelopes for features with zero X and/or Y extent. Start with a non-zero extent, in case the first feature inserted has a zero extent in both directions. This value may be non-optimal, but only one feature will be inserted with this value. Constructs a Quadtree with zero items. Removes a single item from the tree. The Envelope of the item to remove. The item to remove. true if the item was found. Ensure that the envelope for the inserted item has non-zero extents. Use the current minExtent to pad the envelope, if necessary. Return a list of all items in the Quadtree. Returns the number of levels in the tree. Returns the number of items in the tree. QuadRoot is the root of a single Quadtree. It is centred at the origin, and does not have a defined extent. Insert an item into the quadtree this is the root of. Insert an item which is known to be contained in the tree rooted at the given QuadNode root. Lower levels of the tree will be created if necessary to hold the item. A node of the STR tree. The children of this node are either more nodes (AbstractNodes) or real data (ItemBoundables). If this node contains real data (rather than nodes), then we say that this node is a "leaf node". A spatial object in an AbstractSTRtree. Returns a representation of space that encloses this Boundable, preferably not much bigger than this Boundable's boundary yet fast to test for intersection with the bounds of other Boundables. The class of object returned depends on the subclass of AbstractSTRtree. An Envelope (for STRtrees), an Interval (for SIRtrees), or other object (for other subclasses of AbstractSTRtree). Constructs an AbstractNode at the given level in the tree 0 if this node is a leaf, 1 if a parent of a leaf, and so on; the root node will have the highest level. Returns a representation of space that encloses this Boundable, preferably not much bigger than this Boundable's boundary yet fast to test for intersection with the bounds of other Boundables. The class of object returned depends on the subclass of AbstractSTRtree. An Envelope (for STRtrees), an Interval (for SIRtrees), or other object (for other subclasses of AbstractSTRtree). Adds either an AbstractNode, or if this is a leaf node, a data object (wrapped in an ItemBoundable). Returns either child AbstractNodes, or if this is a leaf node, real data (wrapped in ItemBoundables). Returns 0 if this node is a leaf, 1 if a parent of a leaf, and so on; the root node will have the highest level. Returns object fromComputeBounds() Base class for STRtree and SIRtree. STR-packed R-trees are described in: P. Rigaux, Michel Scholl and Agnes Voisard. Spatial Databases With Application To GIS. Morgan Kaufmann, San Francisco, 2002. This implementation is based on Boundables rather than just AbstractNodes, because the STR algorithm operates on both nodes and data, both of which are treated here as Boundables. Constructs an AbstractSTRtree with the specified maximum number of child nodes that a node may have. Creates parent nodes, grandparent nodes, and so forth up to the root node, for the data that has been inserted into the tree. Can only be called once, and thus can be called only after all of the data has been inserted into the tree. Sorts the childBoundables then divides them into groups of size M, where M is the node capacity. Creates the levels higher than the given level. The level to build on. the level of the Boundables, or -1 if the boundables are item boundables (that is, below level 0). The root, which may be a ParentNode or a LeafNode. Also builds the tree, if necessary. Also builds the tree, if necessary. Also builds the tree, if necessary. -1 to get items. Returns the maximum number of child nodes that a node may have. A test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds. A test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds. For STRtrees, the bounds will be Envelopes; for SIRtrees, Intervals; for other subclasses of AbstractSTRtree, some other class. The bounds of one spatial object. The bounds of another spatial object. Whether the two bounds intersect. A contiguous portion of 1D-space. Used internally by SIRtree. this Boundable wrapper for a non-Boundable spatial object. Used internally by AbstractSTRtree. One-dimensional version of an STR-packed R-tree. SIR stands for "Sort-Interval-Recursive". STR-packed R-trees are described in: P. Rigaux, Michel Scholl and Agnes Voisard. Spatial Databases With Application To GIS. Morgan Kaufmann, San Francisco, 2002. Constructs an SIRtree with the default (10) node capacity. Constructs an SIRtree with the given maximum number of child nodes that a node may have. Inserts an item having the given bounds into the tree. Returns items whose bounds intersect the given value. Returns items whose bounds intersect the given bounds. Possibly equal to x2. Possibly equal to x1. A query-only R-tree created using the Sort-Tile-Recursive (STR) algorithm. For two-dimensional spatial data. The STR packed R-tree is simple to implement and maximizes space utilization; that is, as many leaves as possible are filled to capacity. Overlap between nodes is far less than in a basic R-tree. However, once the tree has been built (explicitly or on the first call to #query), items may not be added or removed. Described in: P. Rigaux, Michel Scholl and Agnes Voisard. Spatial Databases With Application To GIS. Morgan Kaufmann, San Francisco, 2002. Constructs an STRtree with the default (10) node capacity. Constructs an STRtree with the given maximum number of child nodes that a node may have. Inserts an item having the given bounds into the tree. Returns items whose bounds intersect the given envelope. Returns items whose bounds intersect the given envelope. Removes a single item from the tree. The Envelope of the item to remove. The item to remove. true if the item was found. Creates the parent level for the given child level. First, orders the items by the x-values of the midpoints, and groups them into vertical slices. For each slice, orders the items by the y-values of the midpoints, and group them into runs of size M (the node capacity). For each run, creates a new (parent) node. Must be sorted by the x-value of the envelope midpoints. ProjectionEvents are ordered first by their x-value, and then by their eventType. It is important that Insert events are sorted before Delete events, so that items whose Insert and Delete events occur at the same x-value will be correctly handled. A sweepline implements a sorted index on a set of intervals. It is used to compute all overlaps between the interval in the index. Because Delete Events have a link to their corresponding Insert event, it is possible to compute exactly the range of events which must be compared to a given Insert event object. NegativeInvalidException This creates a new instance of an exception that occurs if a negative value was passed as an argument and this is invalid The name of the parameter that was negative Computes all intersections between segments in a set of s. Intersections found are represented as s and added to the s in which they occur. As a final step in the noding a new set of segment strings split at the nodes may be returned. Computes the noding for a collection of s. Some Noders may add all these nodes to the input s; others may only add some or none at all. Returns a of fully noded s. The s have the same context as their parent. Computes the intersections between two line segments in s and adds them to each string. The is passed to a . The method is called whenever the detects that two s might intersect. This class is an example of the Strategy pattern. Computes the intersections between two line segments in s and adds them to each string. The is passed to a . The method is called whenever the detects that two s might intersect. This class is an example of the Strategy pattern. This method is called by clients of the interface to process intersections for two segments of the s being intersected. These variables keep track of what types of intersections were found during ALL edges that have been intersected. Initializes a new instance of the class. This method is called by clients of the class to process intersections for two segments of the being intersected. Notice that some clients (such as s) may optimize away this call for segment pairs which they have determined do not intersect (e.g. by an disjoint envelope test). A trivial intersection is an apparent self-intersection which in fact is simply the point shared by adjacent line segments. Notice that closed edges require a special check for the point shared by the beginning and end segments. A proper intersection is an intersection which is interior to at least two line segments. Notice that a proper intersection is not necessarily in the interior of the entire , since another edge may have an endpoint equal to the intersection, which according to SFS semantics can result in the point being on the Boundary of the . A proper interior intersection is a proper intersection which is not contained in the set of boundary nodes set for this . An interior intersection is an intersection which is in the interior of some segment. Finds proper and interior intersections in a set of s, and adds them as nodes. Creates an intersection finder which finds all proper intersections. The to use. This method is called by clients of the class to process intersections for two segments of the s being intersected. Notice that some clients (such as s) may optimize away this call for segment pairs which they have determined do not intersect (e.g. by an disjoint envelope test). A InvalidOctantException Class Creates a new instance of InvalidOctantException Nodes a set of s completely. The set of s is fully noded; i.e. noding is repeated until no further intersections are detected. Iterated noding using a precision model is not guaranteed to converge, due to roundoff error. This problem is detected and an exception is thrown. Clients can choose to rerun the noding using a lower precision model. Initializes a new instance of the class. Returns a of fully noded s. The s have the same context as their parent. Fully nodes a list of s, i.e. peforms noding iteratively until no intersections are found between segments. Maintains labelling of edges correctly through the noding. A collection of SegmentStrings to be noded. If the iterated noding fails to converge. Node the input segment strings once and create the split edges between the nodes. Gets/Sets the maximum number of noding iterations performed before the noding is aborted. Experience suggests that this should rarely need to be changed from the default. The default is . Nodes a set of s using a index based on s and a . The used should be something that supports envelope (range) queries efficiently (such as a or . Base class for s which make a single pass to find intersections. This allows using a custom (which for instance may simply identify intersections, rather than insert them). Initializes a new instance of the class. Initializes a new instance of the class. The to use. Computes the noding for a collection of s. Some Noders may add all these nodes to the input s; others may only add some or none at all. Returns a of fully noded s. The s have the same context as their parent. Gets/sets the to use with this noder. A will normally add intersection nodes to the input segment strings, but it may not - it may simply record the presence of intersections. However, some s may require that intersections be added. Initializes a new instance of the class. Initializes a new instance of the class. The to use. Returns a of fully noded s. The s have the same context as their parent. Computes the noding for a collection of s. Some Noders may add all these nodes to the input s; others may only add some or none at all. Initializes a new instance of the class. The Validates that a collection of s is correctly noded. Throws an appropriate exception if an noding error is found. Initializes a new instance of the class. The seg strings. Checks if a segment string contains a segment pattern a-b-a (which implies a self-intersection). Checks all pairs of segments for intersections at an interior point of a segment. true if there is an intersection point which is not an endpoint of the segment p0-p1. Checks for intersections between an endpoint of a segment string and an interior vertex of another segment string Octants in the Cartesian plane. Octants are numbered as follows: \2|1/ 3 \|/ 0 ---+-- 4 /|\ 7 /5|6\ If line segments lie along a coordinate axis, the octant is the lower of the two possible values. Methods for computing and working with of the Cartesian plane. Returns the octant of a directed line segment (specified as x and y displacements, which cannot both be 0). Returns the octant of a directed line segment from p0 to p1. Allows comparing arrays in an orientation-independent way. Creates a new } for the given array. Compares two s for their relative order. -1 this one is smaller, or 0 the two objects are equal, or 1 this one is greater. Computes the canonical orientation for a coordinate array. true if the points are oriented forwards, or falseif the points are oriented in reverse. Wraps a and transforms its input into the integer domain. This is intended for use with Snap-Rounding noders, which typically are only intended to work in the integer domain. Offsets can be provided to increase the number of digits of available precision. Initializes a new instance of the class. Represents an intersection point between two s. Initializes a new instance of the class. -1 this SegmentNode is located before the argument location, or 0 this SegmentNode is at the argument location, or 1 this SegmentNode is located after the argument location. A list of the s present along a noded . Initializes a new instance of the class. The edge. Returns an iterator of SegmentNodes. An iterator of SegmentNodes. Adds an intersection into the list, if it isn't already there. The input segmentIndex and dist are expected to be normalized. Adds nodes for the first and last points of the edge. Adds nodes for any collapsed edge pairs. Collapsed edge pairs can be caused by inserted nodes, or they can be pre-existing in the edge vertex list. In order to provide the correct fully noded semantics, the vertex at the base of a collapsed pair must also be added as a node. Adds nodes for any collapsed edge pairs which are pre-existing in the vertex list. Adds nodes for any collapsed edge pairs caused by inserted nodes Collapsed edge pairs occur when the same coordinate is inserted as a node both before and after an existing edge vertex. To provide the correct fully noded semantics, the vertex must be added as a node as well. Creates new edges for all the edges that the intersections in this list split the parent edge into. Adds the edges to the provided argument list (this is so a single list can be used to accumulate all split edges for a set of s). Create a new "split edge" with the section of points between (and including) the two intersections. The label for the new edge is the same as the label for the parent edge. INCOMPLETE!!! Consente di spostare l'enumeratore all'elemento successivo dell'insieme. true se l'enumeratore è stato spostato correttamente in avanti in corrispondenza dell'elemento successivo; false se l'enumeratore ha raggiunto la fine dell'insieme. L'insieme è stato modificato dopo la creazione dell'enumeratore. Imposta l'enumeratore sulla propria posizione iniziale, ovvero prima del primo elemento nell'insieme. L'insieme è stato modificato dopo la creazione dell'enumeratore. Not implemented. This method is not implemented. Ottiene l'elemento corrente dell'insieme. Elemento corrente nell'insieme. L'enumeratore è posizionato prima del primo elemento o dopo l'ultimo elemento dell'insieme. Implements a robust method of comparing the relative position of two points along the same segment. The coordinates are assumed to lie "near" the segment. This means that this algorithm will only return correct results if the input coordinates have the same precision and correspond to rounded values of exact coordinates lying on the segment. Compares two s for their relative position along a segment lying in the specified . -1 if node0 occurs first, or 0 if the two nodes are equal, or 1 if node1 occurs first. Represents a list of contiguous line segments, and supports noding the segments. The line segments are represented by an array of s. Intended to optimize the noding of contiguous segments by reducing the number of allocated objects. s can carry a context object, which is useful for preserving topological or parentage information. All noded substrings are initialized with the same context object. Creates a new segment string from a list of vertices. The vertices of the segment string. The user-defined data of this segment string (may be null). Gets the octant of the segment starting at vertex index. The index of the vertex starting the segment. Must not be the last index in the vertex list The octant of the segment at the vertex Adds EdgeIntersections for one or both intersections found for a segment of an edge to the edge intersection list. Add an for intersection intIndex. An intersection that falls exactly on a vertex of the is normalized to use the higher of the two possible segmentIndexes. Gets/Sets the user-defined data for this segment string. Dissolves a noded collection of s to produce a set of merged linework with unique segments. A custom merging strategy can be applied when two identical (up to orientation) strings are dissolved together. The default merging strategy is simply to discard the merged string. A common use for this class is to merge noded edges while preserving topological labelling. Creates a dissolver with a user-defined merge strategy. Creates a dissolver with the default merging strategy. Dissolve all s in the input . Dissolve the given . Gets the collection of dissolved (i.e. unique) s Updates the context data of a when an identical (up to orientation) one is found during dissolving. The segment string to update. The segment string being dissolved. true if the strings are in the same direction, false if they are opposite. Nodes a set of s by performing a brute-force comparison of every segment to every other one. This has n^2 performance, so is too slow for use on large numbers of segments. Initializes a new instance of the class. Initializes a new instance of the class. Returns a of fully noded s. The s have the same context as their parent. Computes the noding for a collection of s. Some Noders may add all these nodes to the input s; others may only add some or none at all. Implements a "hot pixel" as used in the Snap Rounding algorithm. A hot pixel contains the interior of the tolerance square and the boundary minus the top and right segments. The hot pixel operations are all computed in the integer domain to avoid rounding problems. Initializes a new instance of the class. Returns a "safe" envelope that is guaranteed to contain the hot pixel. Tests whether the segment p0-p1 intersects the hot pixel tolerance square. Because the tolerance square point set is partially open (along the top and right) the test needs to be more sophisticated than simply checking for any intersection. However, it can take advantage of the fact that because the hot pixel edges do not lie on the coordinate grid. It is sufficient to check if there is at least one of: - a proper intersection with the segment and any hot pixel edge. - an intersection between the segment and both the left and bottom edges. - an intersection between a segment endpoint and the hot pixel coordinate. "Snaps" all s in a containing s to a given . Initializes a new instance of the class. Snaps (nodes) all interacting segments to this hot pixel. The hot pixel may represent a vertex of an edge, in which case this routine uses the optimization of not noding the vertex itself The hot pixel to snap to. The edge containing the vertex, if applicable, or null. true if a node was added for this pixel. Initializes a new instance of the class. Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of {@link SegmentString}s. Implements the Snap Rounding technique described in Hobby, Guibas and Marimont, and Goodrich et al. Snap Rounding assumes that all vertices lie on a uniform grid (hence the precision model of the input must be fixed precision, and all the input vertices must be rounded to that precision). This implementation uses a monotone chains and a spatial index to speed up the intersection tests. This implementation appears to be fully robust using an integer precision model. It will function with non-integer precision models, but the results are not 100% guaranteed to be correctly noded. Initializes a new instance of the class. The to use. Returns a of fully noded s. The s have the same context as their parent. Computes the noding for a collection of s. Some Noders may add all these nodes to the input s; others may only add some or none at all. Computes all interior intersections in the collection of s, and returns their s. Does NOT node the segStrings. A list of Coordinates for the intersections. Computes nodes introduced as a result of snapping segments to snap points (hot pixels). Computes nodes introduced as a result of snapping segments to vertices of other segments. Performs a brute-force comparison of every segment in each . This has n^2 performance. Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of s. Implements the Snap Rounding technique described in Hobby, Guibas and Marimont, and Goodrich et al. Snap Rounding assumes that all vertices lie on a uniform grid (hence the precision model of the input must be fixed precision, and all the input vertices must be rounded to that precision). This implementation uses simple iteration over the line segments. This implementation appears to be fully robust using an integer precision model. It will function with non-integer precision models, but the results are not 100% guaranteed to be correctly noded. Initializes a new instance of the class. The to use. Returns a of fully noded s. The s have the same context as their parent. Computes the noding for a collection of s. Some Noders may add all these nodes to the input s; others may only add some or none at all. Computes all interior intersections in the collection of s, and returns their s. Does NOT node the segStrings. A list of s for the intersections. Computes nodes introduced as a result of snapping segments to snap points (hot pixels). Computes nodes introduced as a result of snapping segments to vertices of other segments. Performs a brute-force comparison of every segment in each . This has n^2 performance. Adds a new node (equal to the snap pt) to the segment if the segment passes through the hot pixel. Builds the buffer point for a given input point and precision model. Allows setting the level of approximation for circular arcs, and the precision model in which to carry out the computation. When computing buffers in floating point double-precision it can happen that the process of iterated noding can fail to converge (terminate). In this case a TopologyException will be thrown. Retrying the computation in a fixed precision can produce more robust results. Compute the change in depth as an edge is crossed from R to L. Inserted edges are checked to see if an identical edge already exists. If so, the edge is not inserted, but its label is merged with the existing edge. Completes the building of the input subgraphs by depth-labelling them, and adds them to the . The subgraph list must be sorted in rightmost-coordinate order. The subgraphs to build. The PolygonBuilder which will build the final polygons. Gets/Sets the number of segments used to approximate a angle fillet. Gets/Sets the precision model to use during the curve computation and noding, if it is different to the precision model of the Geometry. If the precision model is less than the precision of the Geometry precision model, the Geometry must have previously been rounded to that precision. Computes the buffer of a point, for both positive and negative buffer distances. In GIS, the buffer of a point is defined as the Minkowski sum or difference of the point with a circle with radius equal to the absolute value of the buffer distance. In the CAD/CAM world buffers are known as offset curves. Since true buffer curves may contain circular arcs, computed buffer polygons can only be approximations to the true point. The user can control the accuracy of the curve approximation by specifying the number of linear segments with which to approximate a curve. The end cap endCapStyle of a linear buffer may be specified. The following end cap styles are supported: {CAP_ROUND} - the usual round end caps {CAP_BUTT} - end caps are truncated flat at the line ends {CAP_SQUARE} - end caps are squared off at the buffer distance beyond the line ends The computation uses an algorithm involving iterated noding and precision reduction to provide a high degree of robustness. Initializes a buffer computation for the given point. The point to buffer. Compute a reasonable scale factor to limit the precision of a given combination of Geometry and buffer distance. The scale factor is based on a heuristic. The Geometry being buffered. The buffer distance. The mzx # of digits that should be allowed by the precision determined by the computed scale factor. A scale factor that allows a reasonable amount of precision for the buffer computation. Computes the buffer of a point for a given buffer distance. The point to buffer. The buffer distance. The buffer of the input point. Computes the buffer of a point for a given buffer distance, using the given Cap Style for borders of the point. The point to buffer. The buffer distance. Cap Style to use for compute buffer. The buffer of the input point. Computes the buffer for a point for a given buffer distance and accuracy of approximation. The point to buffer. The buffer distance. The number of segments used to approximate a quarter circle. The buffer of the input point. Computes the buffer for a point for a given buffer distance and accuracy of approximation. The point to buffer. The buffer distance. The number of segments used to approximate a quarter circle. Cap Style to use for compute buffer. The buffer of the input point. Specifies the end cap endCapStyle of the generated buffer. The styles supported are CapRound, CapButt, and CapSquare. The default is CapRound. A connected subset of the graph of DirectedEdges and Nodes. Its edges will generate either a single polygon in the complete buffer, with zero or more holes, or one or more connected holes. BufferSubgraphs are compared on the x-value of their rightmost Coordinate. This defines a partial ordering on the graphs such that: g1 >= g2 - Ring(g2) does not contain Ring(g1) where Polygon(g) is the buffer polygon that is built from g. This relationship is used to sort the BufferSubgraphs so that shells are guaranteed to be built before holes. Creates the subgraph consisting of all edges reachable from this node. Finds the edges in the graph and the rightmost coordinate. A node to start the graph traversal from. Adds all nodes and edges reachable from this node to the subgraph. Uses an explicit stack to avoid a large depth of recursion. A node known to be in the subgraph. Adds the argument node and all its out edges to the subgraph The node to add. The current set of nodes being traversed. Compute depths for all dirEdges via breadth-first traversal of nodes in graph. Edge to start processing with. Find all edges whose depths indicates that they are in the result area(s). Since we want polygon shells to be oriented CW, choose dirEdges with the interior of the result on the RHS. Mark them as being in the result. Interior Area edges are the result of dimensional collapses. They do not form part of the result area boundary. Gets the rightmost coordinate in the edges of the subgraph. Computes the raw offset curve for a single Geometry component (ring, line or point). A raw offset curve line is not noded - it may contain self-intersections (and usually will). The final buffer polygon is computed by forming a topological graph of all the noded raw curves and tracing outside contours. The points in the raw curve are rounded to the required precision model. The default number of facets into which to divide a fillet of 90 degrees. A value of 8 gives less than 2% max error in the buffer distance. For a max error smaller of 1%, use QS = 12 This method handles single points as well as lines. Lines are assumed to not be closed (the function will not fail for closed lines, but will generate superfluous line caps). A List of Coordinate[]. This method handles the degenerate cases of single points and lines, as well as rings. A List of Coordinate[]. Add last offset point. Compute an offset segment for an input segment on a given side and at a given distance. The offset points are computed in full double precision, for accuracy. The segment to offset. The side of the segment the offset lies on. The offset distance. The points computed for the offset segment. Add an end cap around point p1, terminating a line segment coming from p0. Base point of curve. Start point of fillet curve. Endpoint of fillet curve. Adds points for a fillet. The start and end point for the fillet are not added - the caller must add them if required. Is -1 for a CW angle, 1 for a CCW angle. Adds a CW circle around a point. Adds a CW square around a point Creates all the raw offset curves for a buffer of a Geometry. Raw curves need to be noded together and polygonized to form the final buffer area. Computes the set of raw offset curves for the buffer. Each offset curve has an attached {Label} indicating its left and right location. A Collection of SegmentStrings representing the raw buffer curves. Creates a {SegmentString} for a coordinate list which is a raw offset curve, and adds it to the list of buffer curves. The SegmentString is tagged with a Label giving the topology of the curve. The curve may be oriented in either direction. If the curve is oriented CW, the locations will be: Left: Location.Exterior. Right: Location.Interior. Add a Point to the graph. Add an offset curve for a ring. The side and left and right topological location arguments assume that the ring is oriented CW. If the ring is in the opposite orientation, the left and right locations must be interchanged and the side flipped. The coordinates of the ring (must not contain repeated points). The distance at which to create the buffer. The side of the ring on which to construct the buffer line. The location on the L side of the ring (if it is CW). The location on the R side of the ring (if it is CW). The ringCoord is assumed to contain no repeated points. It may be degenerate (i.e. contain only 1, 2, or 3 points). In this case it has no area, and hence has a minimum diameter of 0. Tests whether a triangular ring would be eroded completely by the given buffer distance. This is a precise test. It uses the fact that the inner buffer of a triangle converges on the inCentre of the triangle (the point equidistant from all sides). If the buffer distance is greater than the distance of the inCentre from a side, the triangle will be eroded completely. This test is important, since it removes a problematic case where the buffer distance is slightly larger than the inCentre distance. In this case the triangle buffer curve "inverts" with incorrect topology, producing an incorrect hole in the buffer. A RightmostEdgeFinder find the DirectedEdge in a list which has the highest coordinate, and which is oriented L to R at that point. (I.e. the right side is on the RHS of the edge.) Locates a subgraph inside a set of subgraphs, in order to determine the outside depth of the subgraph. The input subgraphs are assumed to have had depths already calculated for their edges. Finds all non-horizontal segments intersecting the stabbing line. The stabbing line is the ray to the right of stabbingRayLeftPt. The left-hand origin of the stabbing line. A List of {DepthSegments} intersecting the stabbing line. Finds all non-horizontal segments intersecting the stabbing line in the list of dirEdges. The stabbing line is the ray to the right of stabbingRayLeftPt. The left-hand origin of the stabbing line. The current list of DepthSegments intersecting the stabbing line. Finds all non-horizontal segments intersecting the stabbing line in the input dirEdge. The stabbing line is the ray to the right of stabbingRayLeftPt. The left-hand origin of the stabbing line. The current list of DepthSegments intersecting the stabbing line. A segment from a directed edge which has been assigned a depth value for its sides. Defines a comparision operation on DepthSegments which orders them left to right: DS1 smaller DS2 if DS1.seg is left of DS2.seg. DS1 bigger DS2 if DS1.seg is right of DS2.seg. Compare two collinear segments for left-most ordering. If segs are vertical, use vertical ordering for comparison. If segs are equal, return 0. Segments are assumed to be directed so that the second coordinate is >= to the first (e.g. up and to the right). The left hand side segment to compare. The riht hand side segment to compare. An integer, -1 if seg0 is less, 0 if they are the same, and 1 if seg0 is greater. A ConnectedElementPointFilter extracts a single point from each connected element in a Geometry (e.g. a polygon, linestring or point) and returns them in a list. The elements of the list are com.vividsolutions.jts.operation.distance.GeometryLocations. Returns a list containing a point from each Polygon, LineString, and Point found inside the specified point. Thus, if the specified point is not a GeometryCollection, an empty list will be returned. The elements of the list are com.vividsolutions.jts.operation.distance.GeometryLocations. Extracts a single point from each connected element in a Geometry (e.g. a polygon, linestring or point) and returns them in a list Returns a list containing a Coordinate from each Polygon, LineString, and Point found inside the specified point. Thus, if the specified point is not a GeometryCollection, an empty list will be returned. Computes the distance and closest points between two Geometrys. The distance computation finds a pair of points in the input geometries which have minimum distance between them. These points may not be vertices of the geometries, but may lie in the interior of a line segment. In this case the coordinate computed is a close approximation to the exact point. The algorithms used are straightforward O(n^2) comparisons. This worst-case performance could be improved on by using Voronoi techniques. Constructs a that computes the distance and closest points between the two specified geometries. Constructs a that computes the distance and closest points between the two specified geometries. The distance on which to terminate the search. Compute the distance between the closest points of two geometries. A Geometry. Another Geometry. The distance between the geometries. Test whether two geometries lie within a given distance of each other. Compute the the closest points of two geometries. The points are presented in the same order as the input Geometries. A Geometry. Another Geometry. The closest points in the geometries. Report the distance between the closest points on the input geometries. The distance between the geometries. Report the coordinates of the closest points in the input geometries. The points are presented in the same order as the input Geometries. A pair of Coordinates of the closest points. Report the locations of the closest points in the input geometries. The locations are presented in the same order as the input Geometries. A pair of {GeometryLocation}s for the closest points. Represents the location of a point on a Geometry. Maintains both the actual point location (which of course may not be exact) as well as information about the component and segment index where the point occurs. Locations inside area Geometrys will not have an associated segment index, so in this case the segment index will have the sentinel value of InsideArea. Special value of segment-index for locations inside area geometries. These locations do not have an associated segment index. Constructs a GeometryLocation specifying a point on a point, as well as the segment that the point is on (or InsideArea if the point is not on a segment). Constructs a GeometryLocation specifying a point inside an area point. Returns the point associated with this location. Returns the segment index for this location. If the location is inside an area, the index will have the value InsideArea; Returns the location. Returns whether this GeometryLocation represents a point inside an area point. The base class for operations that require GeometryGraphs. The operation args into an array so they can be accessed by index. Tests whether a Geometry is simple. Only Geometrys whose definition allows them to be simple or non-simple are tested. (E.g. Polygons must be simple by definition, so no test is provided. To test whether a given Polygon is valid, use Geometry.IsValid) A MultiPoint is simple if it has no repeated points. For all edges, check if there are any intersections which are NOT at an endpoint. The Geometry is not simple if there are intersections not at endpoints. Test that no edge intersection is the endpoint of a closed line. To check this we compute the degree of each endpoint. The degree of endpoints of closed lines must be exactly 2. Add an endpoint to the map, creating an entry for it if none exists. A sequence of LineMergeDirectedEdges forming one of the lines that will be output by the line-merging process. Constructs an EdgeString with the given factory used to convert this EdgeString to a LineString. Adds a directed edge which is known to form part of this line. Converts this EdgeString into a LineString. A com.vividsolutions.jts.planargraph.DirectedEdge of a LineMergeGraph. Represents a directed edge in a PlanarGraph. A DirectedEdge may or may not have a reference to a parent Edge (some applications of planar graphs may not require explicit Edge objects to be created). Usually a client using a PlanarGraph will subclass DirectedEdge to add its own application-specific data and methods. The base class for all graph component classes. Maintains flags of use in generic graph algorithms. Provides two flags: marked - typically this is used to indicate a state that persists for the course of the graph's lifetime. For instance, it can be used to indicate that a component has been logically deleted from the graph. visited - this is used to indicate that a component has been processed or visited by an single graph algorithm. For instance, a breadth-first traversal of the graph might use this to indicate that a node has already been traversed. The visited flag may be set and cleared many times during the lifetime of a graph. Sets the state for all s in an . A to scan. The state to set the flag to. Sets the state for all s in an . A to scan. The state to set the flag to. Finds the first in a set which has the specified state. A to scan. The state to test. The first found, or null if none found. Tests if a component has been visited during the course of a graph algorithm. Tests if a component has been marked at some point during the processing involving this graph. Tests whether this component has been removed from its containing graph. Constructs a DirectedEdge connecting the from node to the to node. Specifies this DirectedEdge's direction (given by an imaginary line from the from node to directionPt). Whether this DirectedEdge's direction is the same as or opposite to that of the parent Edge (if any). Returns 1 if this DirectedEdge has a greater angle with the positive x-axis than b", 0 if the DirectedEdges are collinear, and -1 otherwise. Using the obvious algorithm of simply computing the angle is not robust, since the angle calculation is susceptible to roundoff. A robust algorithm is: first compare the quadrants. If the quadrants are different, it it trivial to determine which vector is "greater". if the vectors lie in the same quadrant, the robust RobustCgAlgorithms.ComputeOrientation(Coordinate, Coordinate, Coordinate) function can be used to decide the relative orientation of the vectors. Returns a List containing the parent Edge (possibly null) for each of the given DirectedEdges. Returns 1 if this DirectedEdge has a greater angle with the positive x-axis than b", 0 if the DirectedEdges are collinear, and -1 otherwise. Using the obvious algorithm of simply computing the angle is not robust, since the angle calculation is susceptible to roundoff. A robust algorithm is: first compare the quadrants. If the quadrants are different, it it trivial to determine which vector is "greater". if the vectors lie in the same quadrant, the robust RobustCgAlgorithms.ComputeOrientation(Coordinate, Coordinate, Coordinate) function can be used to decide the relative orientation of the vectors. Writes a detailed string representation of this DirectedEdge to the given PrintStream. Removes this directed edge from its containing graph. Returns this DirectedEdge's parent Edge, or null if it has none. Associates this DirectedEdge with an Edge (possibly null, indicating no associated Edge). Returns 0, 1, 2, or 3, indicating the quadrant in which this DirectedEdge's orientation lies. returns a point representing the starting point for a line being drawn in order to indicate the directed edges vector direction. Returns a point to which an imaginary line is drawn from the from-node to specify this DirectedEdge's orientation. Returns whether the direction of the parent Edge (if any) is the same as that of this Directed Edge. Returns the node from which this DirectedEdge leaves. Returns the node to which this DirectedEdge goes. Returns the coordinate of the from-node. Returns the angle that the start of this DirectedEdge makes with the positive x-axis, in radians. Returns the symmetric DirectedEdge -- the other DirectedEdge associated with this DirectedEdge's parent Edge. Sets this DirectedEdge's symmetric DirectedEdge, which runs in the opposite direction. Tests whether this component has been removed from its containing graph. Constructs a LineMergeDirectedEdge connecting the from node to the to node. specifies this DirectedEdge's direction (given by an imaginary line from the from node to directionPt). whether this DirectedEdge's direction is the same as or opposite to that of the parent Edge (if any). Returns the directed edge that starts at this directed edge's end point, or null if there are zero or multiple directed edges starting there. An edge of a LineMergeGraph. The marked field indicates whether this Edge has been logically deleted from the graph. Represents an undirected edge of a {PlanarGraph}. An undirected edge in fact simply acts as a central point of reference for two opposite DirectedEdges. Usually a client using a PlanarGraph will subclass Edge to add its own application-specific data and methods. Constructs an Edge whose DirectedEdges are not yet set. Be sure to call SetDirectedEdges(DirectedEdge, DirectedEdge). Constructs an Edge initialized with the given DirectedEdges, and for each DirectedEdge: sets the Edge, sets the symmetric DirectedEdge, and adds this Edge to its from-Node. Initializes this Edge's two DirectedEdges, and for each DirectedEdge: sets the Edge, sets the symmetric DirectedEdge, and adds this Edge to its from-Node. Returns one of the DirectedEdges associated with this Edge. 0 or 1. Returns the DirectedEdge that starts from the given node, or null if the node is not one of the two nodes associated with this Edge. If node is one of the two nodes associated with this Edge, returns the other node; otherwise returns null. Removes this edge from its containing graph. The two DirectedEdges associated with this Edge. Tests whether this component has been removed from its containing graph. The line sequencer class seems to need to se this directly Constructs a LineMergeEdge with vertices given by the specified LineString. Returns the LineString specifying the vertices of this edge. A planar graph of edges that is analyzed to sew the edges together. The marked flag on com.vividsolutions.planargraph.Edges and com.vividsolutions.planargraph.Nodes indicates whether they have been logically deleted from the graph. Represents a directed graph which is embeddable in a planar surface. This class and the other classes in this package serve as a framework for building planar graphs for specific algorithms. This class must be subclassed to expose appropriate methods to construct the graph. This allows controlling the types of graph components ({DirectedEdge}s, Edges and Nodes) which can be added to the graph. An application which uses the graph framework will almost always provide subclasses for one or more graph components, which hold application-specific data and graph algorithms. Returns the Node at the given location, or null if no Node was there. Adds a node to the map, replacing any that is already at that location. Only subclasses can add Nodes, to ensure Nodes are of the right type. Adds the Edge and its DirectedEdges with this PlanarGraph. Assumes that the Edge has already been created with its associated DirectEdges. Only subclasses can add Edges, to ensure the edges added are of the right class. Adds the Edge to this PlanarGraph; only subclasses can add DirectedEdges, to ensure the edges added are of the right class. Returns an IEnumerator over the Nodes in this PlanarGraph. Returns an Iterator over the DirectedEdges in this PlanarGraph, in the order in which they were added. Returns an Iterator over the Edges in this PlanarGraph, in the order in which they were added. Removes an Edge and its associated DirectedEdges from their from-Nodes and from this PlanarGraph. Notice: This method does not remove the Nodes associated with the Edge, even if the removal of the Edge reduces the degree of a Node to zero. Removes DirectedEdge from its from-Node and from this PlanarGraph. Notice: This method does not remove the Nodes associated with the DirectedEdge, even if the removal of the DirectedEdge reduces the degree of a Node to zero. Removes a node from the graph, along with any associated DirectedEdges and Edges. Returns all Nodes with the given number of Edges around it. Gets or sets the IList of directed edges Returns the Nodes in this PlanarGraph. Returns the Edges that have been added to this PlanarGraph. Adds an Edge, DirectedEdges, and Nodes for the given LineString representation of an edge. Sews together a set of fully noded LineStrings. Sewing stops at nodes of degree 1 or 3 or more -- the exception is an isolated loop, which only has degree-2 nodes, in which case a node is simply chosen as a starting point. The direction of each merged LineString will be that of the majority of the LineStrings from which it was derived. Any dimension of Geometry is handled -- the constituent linework is extracted to form the edges. The edges must be correctly noded; that is, they must only meet at their endpoints. The LineMerger will still run on incorrectly noded input but will not form polygons from incorrected noded edges. Adds a collection of Geometries to be processed. May be called multiple times. Any dimension of Geometry may be added; the constituent linework will be extracted. Adds a Geometry to be processed. May be called multiple times. Any dimension of Geometry may be added; the constituent linework will be extracted. Returns the LineStrings built by the merging process. Nodes a set of edges. Takes one or more sets of edges and constructs a new set of edges consisting of all the split edges created by noding the input edges together. Forms NTS LineStrings out of a the graph of DirectedEdges created by an OverlayOp. A list of the LineStrings in the result of the specified overlay operation. Find and mark L edges which are "covered" by the result area (if any). L edges at nodes which also have A edges can be checked by checking their depth at that node. L edges at nodes which do not have A edges can be checked by doing a point-in-polygon test with the previously computed result areas. Collect edges from Area inputs which should be in the result but which have not been included in a result area. This happens ONLY: during an intersection when the boundaries of two areas touch in a line segment OR as a result of a dimensional collapse. Label an isolated node with its relationship to the target point. A ring of edges which may contain nodes of degree > 2. A MaximalEdgeRing may represent two different spatial entities: a single polygon possibly containing inversions (if the ring is oriented CW) a single hole possibly containing exversions (if the ring is oriented CCW) If the MaximalEdgeRing represents a polygon, the interior of the polygon is strongly connected. These are the form of rings used to define polygons under some spatial data models. However, under the OGC SFS model, MinimalEdgeRings are required. A MaximalEdgeRing can be converted to a list of MinimalEdgeRings using the BuildMinimalRings() method. For all nodes in this EdgeRing, link the DirectedEdges at the node to form minimalEdgeRings A ring of edges with the property that no node has degree greater than 2. These are the form of rings required to represent polygons under the OGC SFS spatial data model. Creates nodes for use in the PlanarGraphs constructed during overlay operations. The spatial functions supported by this class. These operations implement various bool combinations of the resultants of the overlay. Computes the overlay of two Geometrys. The overlay can be used to determine any bool combination of the geometries. This method will handle arguments of Location.NULL correctly. true if the locations correspond to the opCode. Insert an edge from one of the noded input graphs. Checks edges that are inserted to see if an identical edge already exists. If so, the edge is not inserted, but its label is merged with the existing edge. Update the labels for edges according to their depths. For each edge, the depths are first normalized. Then, if the depths for the edge are equal, this edge must have collapsed into a line edge. If the depths are not equal, update the label with the locations corresponding to the depths (i.e. a depth of 0 corresponds to a Location of Exterior, a depth of 1 corresponds to Interior) If edges which have undergone dimensional collapse are found, replace them with a new edge which is a L edge Copy all nodes from an arg point into this graph. The node label in the arg point overrides any previously computed label for that argIndex. (E.g. a node may be an intersection node with a previously computed label of Boundary, but in the original arg Geometry it is actually in the interior due to the Boundary Determination Rule) Compute initial labelling for all DirectedEdges at each node. In this step, DirectedEdges will acquire a complete labelling (i.e. one with labels for both Geometries) only if they are incident on a node which has edges for both Geometries For nodes which have edges from only one Geometry incident on them, the previous step will have left their dirEdges with no labelling for the other Geometry. However, the sym dirEdge may have a labelling for the other Geometry, so merge the two labels. Incomplete nodes are nodes whose labels are incomplete. (e.g. the location for one Geometry is null). These are either isolated nodes, or nodes which have edges from only a single Geometry incident on them. Isolated nodes are found because nodes in one graph which don't intersect nodes in the other are not completely labelled by the initial process of adding nodes to the nodeList. To complete the labelling we need to check for nodes that lie in the interior of edges, and in the interior of areas. When each node labelling is completed, the labelling of the incident edges is updated, to complete their labelling as well. Label an isolated node with its relationship to the target point. Find all edges whose label indicates that they are in the result area(s), according to the operation being performed. Since we want polygon shells to be oriented CW, choose dirEdges with the interior of the result on the RHS. Mark them as being in the result. Interior Area edges are the result of dimensional collapses. They do not form part of the result area boundary. If both a dirEdge and its sym are marked as being in the result, cancel them out. This method is used to decide if a point node should be included in the result or not. true if the coord point is covered by a result Line or Area point. This method is used to decide if an L edge should be included in the result or not. true if the coord point is covered by a result Area point. true if the coord is located in the interior or boundary of a point in the list. Constructs Points from the nodes of an overlay graph. A list of the Points in the result of the specified overlay operation. This method simplifies the resultant Geometry by finding and eliminating "covered" points. A point is covered if it is contained in another element Geometry with higher dimension (e.g. a point might be contained in a polygon, in which case the point can be eliminated from the resultant). Forms Polygons out of a graph of {DirectedEdge}s. The edges to use are marked as being in the result Area. Add a complete graph. The graph is assumed to contain one or more polygons, possibly with holes. Add a set of edges and nodes, which form a graph. The graph is assumed to contain one or more polygons, possibly with holes. For all DirectedEdges in result, form them into MaximalEdgeRings. This method takes a list of MinimalEdgeRings derived from a MaximalEdgeRing, and tests whether they form a Polygon. This is the case if there is a single shell in the list. In this case the shell is returned. The other possibility is that they are a series of connected holes, in which case no shell is returned. The shell EdgeRing, if there is one. null, if all the rings are holes. This method assigns the holes for a Polygon (formed from a list of MinimalEdgeRings) to its shell. Determining the holes for a MinimalEdgeRing polygon serves two purposes: it is faster than using a point-in-polygon check later on. it ensures correctness, since if the PIP test was used the point chosen might lie on the shell, which might return an incorrect result from the PIP test. For all rings in the input list, determine whether the ring is a shell or a hole and add it to the appropriate list. Due to the way the DirectedEdges were linked, a ring is a shell if it is oriented CW, a hole otherwise. This method determines finds a containing shell for all holes which have not yet been assigned to a shell. These "free" holes should all be properly contained in their parent shells, so it is safe to use the findEdgeRingContaining method. (This is the case because any holes which are NOT properly contained (i.e. are connected to their parent shell) would have formed part of a MaximalEdgeRing and been handled in a previous step). Find the innermost enclosing shell EdgeRing containing the argument EdgeRing, if any. The innermost enclosing ring is the smallest enclosing ring. The algorithm used depends on the fact that: ring A contains ring B iff envelope(ring A) contains envelope(ring B). This routine is only safe to use if the chosen point of the hole is known to be properly contained in a shell (which is guaranteed to be the case if the hole does not touch its shell). Containing EdgeRing, if there is one, OR null if no containing EdgeRing is found. Checks the current set of shells (with their associated holes) to see if any of them contain the point. This exception occurs when the same directed edge appears more than once in the same list Creates a new instance of the Duplicate Edge Exception Represents a ring of PolygonizeDirectedEdges which form a ring of a polygon. The ring may be either an outer shell or a hole. Find the innermost enclosing shell EdgeRing containing the argument EdgeRing, if any. The innermost enclosing ring is the smallest enclosing ring. The algorithm used depends on the fact that: ring A contains ring B iff envelope(ring A) contains envelope(ring B). This routine is only safe to use if the chosen point of the hole is known to be properly contained in a shell (which is guaranteed to be the case if the hole does not touch its shell). The EdgeRing to test. The list of shells to test. Containing EdgeRing, if there is one, OR null if no containing EdgeRing is found. Finds a point in a list of points which is not contained in another list of points. The Coordinates to test. An array of Coordinates to test the input points against. A Coordinate from testPts which is not in pts, or null. Tests whether a given point is in an array of points. Uses a value-based test. A Coordinate for the test point. An array of Coordinates to test, true if the point is in the array. Adds a DirectedEdge which is known to form part of this ring. The DirectedEdge to add. Adds a hole to the polygon formed by this ring. The LinearRing forming the hole. Tests whether this ring is a hole. Due to the way the edges in the polyongization graph are linked, a ring is a hole if it is oriented counter-clockwise. true if this ring is a hole. Computes and returns the Polygon formed by this ring and any contained holes. Tests if the LinearRing ring formed by this edge ring is topologically valid. Computes and returns the list of coordinates which are contained in this ring. The coordinatea are computed once only and cached. Gets the coordinates for this ring as a LineString. Used to return the coordinates in this ring as a valid point, when it has been detected that the ring is topologically invalid. Returns this ring as a LinearRing, or null if an Exception occurs while creating it (such as a topology problem). Details of problems are written to standard output. Add every linear element in a point into the polygonizer graph. Creates a new instance of LineStringAdder Applies the Filter to the specified geometry A null directed edge exception An exception for when the directed edge was null A DirectedEdge of a PolygonizeGraph, which represents an edge of a polygon formed by the graph. May be logically deleted from the graph by setting the marked flag. Constructs a directed edge connecting the from node to the to node. Specifies this DirectedEdge's direction (given by an imaginary line from the from node to directionPt). Whether this DirectedEdge's direction is the same as or opposite to that of the parent Edge (if any). Returns the identifier attached to this directed edge. Attaches an identifier to this directed edge. Returns the next directed edge in the EdgeRing that this directed edge is a member of. Sets the next directed edge in the EdgeRing that this directed edge is a member of. Returns the ring of directed edges that this directed edge is a member of, or null if the ring has not been set. Gets/Sets the ring of directed edges that this directed edge is a member of. An edge of a polygonization graph. Represents a planar graph of edges that can be used to compute a polygonization, and implements the algorithms to compute the EdgeRings formed by the graph. The marked flag on DirectedEdges is used to indicate that a directed edge has be logically deleted from the graph. Create a new polygonization graph. Deletes all edges at a node. Add a LineString forming an edge of the polygon graph. The line to add. Convert the maximal edge rings found by the initial graph traversal into the minimal edge rings required by NTS polygon topology rules. The list of start edges for the edgeRings to convert. Finds all nodes in a maximal edgering which are self-intersection nodes The list of intersection nodes found, or null if no intersection nodes were found. Computes the EdgeRings formed by the edges in this graph. A list of the{EdgeRings found by the polygonization process. A List of the DirectedEdges in the graph. A List of DirectedEdges, one for each edge ring found. Finds and removes all cut edges from the graph. A list of the LineStrings forming the removed cut edges. Computes the next edge pointers going CCW around the given node, for the given edgering label. This algorithm has the effect of converting maximal edgerings into minimal edgerings Traverse a ring of DirectedEdges, accumulating them into a list. This assumes that all dangling directed edges have been removed from the graph, so that there is always a next dirEdge. The DirectedEdge to start traversing at. A List of DirectedEdges that form a ring. Marks all edges from the graph which are "dangles". Dangles are which are incident on a node with degree 1. This process is recursive, since removing a dangling edge may result in another edge becoming a dangle. In order to handle large recursion depths efficiently, an explicit recursion stack is used. A List containing the LineStrings that formed dangles. Polygonizes a set of Geometrys which contain linework that represents the edges of a planar graph. Any dimension of Geometry is handled - the constituent linework is extracted to form the edges. The edges must be correctly noded; that is, they must only meet at their endpoints. The Polygonizer will still run on incorrectly noded input but will not form polygons from incorrected noded edges. The Polygonizer reports the follow kinds of errors: Dangles - edges which have one or both ends which are not incident on another edge endpoint Cut Edges - edges which are connected at both ends but which do not form part of polygon Invalid Ring Lines - edges which form rings which are invalid (e.g. the component lines contain a self-intersection). Create a polygonizer with the same {GeometryFactory} as the input Geometrys. Add a collection of geometries to be polygonized. May be called multiple times. Any dimension of Geometry may be added; the constituent linework will be extracted and used. A list of Geometrys with linework to be polygonized. Add a point to the linework to be polygonized. May be called multiple times. Any dimension of Geometry may be added; the constituent linework will be extracted and used A Geometry with linework to be polygonized. Perform the polygonization, if it has not already been carried out. Compute and returns the list of polygons formed by the polygonization. Compute and returns the list of dangling lines found during polygonization. Compute and returns the list of cut edges found during polygonization. Compute and returns the list of lines forming invalid rings found during polygonization. Optimized implementation of spatial predicate "contains" for cases where the first Geometry is a rectangle. As a further optimization, this class can be used directly to test many geometries against a single rectangle. Create a new contains computer for two geometries. A rectangular geometry. Given any valid implementation of ICoordinate, which will basically provide an X, Y or Z values, this will determine if the rectangle contains the point. Optimized implementation of spatial predicate "intersects" for cases where the first {@link Geometry} is a rectangle. As a further optimization, this class can be used directly to test many geometries against a single rectangle. Crossover size at which brute-force intersection scanning is slower than indexed intersection detection. Must be determined empirically. Should err on the safe side by making value smaller rather than larger. Create a new intersects computer for a rectangle. A rectangular geometry. Tests if any line segments in two sets of CoordinateSequences intersect. Optimized for small geometry size. Short-circuited to return as soon an intersection is found. An EdgeEndBuilder creates EdgeEnds for all the "split edges" created by the intersections determined for an Edge. Computes the EdgeEnds which arise from a noded Edge. Creates stub edges for all the intersections in this Edge (if any) and inserts them into the graph. Create a EdgeStub for the edge before the intersection eiCurr. The previous intersection is provided in case it is the endpoint for the stub edge. Otherwise, the previous point from the parent edge will be the endpoint. eiCurr will always be an EdgeIntersection, but eiPrev may be null. Create a StubEdge for the edge after the intersection eiCurr. The next intersection is provided in case it is the endpoint for the stub edge. Otherwise, the next point from the parent edge will be the endpoint. eiCurr will always be an EdgeIntersection, but eiNext may be null. A collection of EdgeStubs which obey the following invariant: They originate at the same node and have the same direction. Contains all EdgeEnds which start at the same point and are parallel. This computes the overall edge label for the set of edges in this EdgeStubBundle. It essentially merges the ON and side labels for each edge. These labels must be compatible Compute the overall ON location for the list of EdgeStubs. (This is essentially equivalent to computing the self-overlay of a single Geometry) edgeStubs can be either on the boundary (eg Polygon edge) OR in the interior (e.g. segment of a LineString) of their parent Geometry. In addition, GeometryCollections use the mod-2 rule to determine whether a segment is on the boundary or not. Finally, in GeometryCollections it can still occur that an edge is both on the boundary and in the interior (e.g. a LineString segment lying on top of a Polygon edge.) In this case as usual the Boundary is given precendence. These observations result in the following rules for computing the ON location: if there are an odd number of Bdy edges, the attribute is Bdy if there are an even number >= 2 of Bdy edges, the attribute is Int if there are any Int edges, the attribute is Int otherwise, the attribute is Null. Compute the labelling for each side To compute the summary label for a side, the algorithm is: FOR all edges IF any edge's location is Interior for the side, side location = Interior ELSE IF there is at least one Exterior attribute, side location = Exterior ELSE side location = Null Notice that it is possible for two sides to have apparently contradictory information i.e. one edge side may indicate that it is in the interior of a point, while another edge side may indicate the exterior of the same point. This is not an incompatibility - GeometryCollections may contain two Polygons that touch along an edge. This is the reason for Interior-primacy rule above - it results in the summary label having the Geometry interior on both sides. Update the IM with the contribution for the computed label for the EdgeStubs. An ordered list of EdgeEndBundles around a RelateNode. They are maintained in CCW order (starting with the positive x-axis) around the node for efficient lookup and topology building. Insert a EdgeEnd in order in the list. If there is an existing EdgeStubBundle which is parallel, the EdgeEnd is added to the bundle. Otherwise, a new EdgeEndBundle is created to contain the EdgeEnd. Update the IM with the contribution for the EdgeStubs around the node. Computes the topological relationship between two Geometries. RelateComputer does not need to build a complete graph structure to compute the IntersectionMatrix. The relationship between the geometries can be computed by simply examining the labelling of edges incident on each node. RelateComputer does not currently support arbitrary GeometryCollections. This is because GeometryCollections can contain overlapping Polygons. In order to correct compute relate on overlapping Polygons, they would first need to be noded and merged (if not explicitly, at least implicitly). Copy all nodes from an arg point into this graph. The node label in the arg point overrides any previously computed label for that argIndex. (E.g. a node may be an intersection node with a computed label of Boundary, but in the original arg Geometry it is actually in the interior due to the Boundary Determination Rule) Insert nodes for all intersections on the edges of a Geometry. Label the created nodes the same as the edge label if they do not already have a label. This allows nodes created by either self-intersections or mutual intersections to be labelled. Endpoint nodes will already be labelled from when they were inserted. If the Geometries are disjoint, we need to enter their dimension and boundary dimension in the Ext rows in the IM Update the IM with the sum of the IMs for each component. Processes isolated edges by computing their labelling and adding them to the isolated edges list. Isolated edges are guaranteed not to touch the boundary of the target (since if they did, they would have caused an intersection to be computed and hence would not be isolated). Label an isolated edge of a graph with its relationship to the target point. If the target has dim 2 or 1, the edge can either be in the interior or the exterior. If the target has dim 0, the edge must be in the exterior. Isolated nodes are nodes whose labels are incomplete (e.g. the location for one Geometry is null). This is the case because nodes in one graph which don't intersect nodes in the other are not completely labelled by the initial process of adding nodes to the nodeList. To complete the labelling we need to check for nodes that lie in the interior of edges, and in the interior of areas. Label an isolated node with its relationship to the target point. A RelateNode is a Node that maintains a list of EdgeStubs for the edges that are incident on it. Update the IM with the contribution for this component. A component only contributes if it has a labelling for both parent geometries. Update the IM with the contribution for the EdgeEnds incident on this node. Used by the NodeMap in a RelateNodeGraph to create RelateNodes. Implements the simple graph of Nodes and EdgeEnd which is all that is required to determine topological relationships between Geometries. Also supports building a topological graph of a single Geometry, to allow verification of valid topology. It is not necessary to create a fully linked PlanarGraph to determine relationships, since it is sufficient to know how the Geometries interact locally around the nodes. In fact, this is not even feasible, since it is not possible to compute exact intersection points, and hence the topology around those nodes cannot be computed robustly. The only Nodes that are created are for improper intersections; that is, nodes which occur at existing vertices of the Geometries. Proper intersections (e.g. ones which occur between the interior of line segments) have their topology determined implicitly, without creating a Node object to represent them. Insert nodes for all intersections on the edges of a Geometry. Label the created nodes the same as the edge label if they do not already have a label. This allows nodes created by either self-intersections or mutual intersections to be labelled. Endpoint nodes will already be labelled from when they were inserted. Precondition: edge intersections have been computed. Copy all nodes from an arg point into this graph. The node label in the arg point overrides any previously computed label for that argIndex. (E.g. a node may be an intersection node with a computed label of Boundary, but in the original arg Geometry it is actually in the interior due to the Boundary Determination Rule). Implements the Relate() operation on Geometrys. This class tests that the interior of an area ( or ) is connected. An area Geometry is invalid if the interior is disconnected. This can happen if: - a shell self-intersects, - one or more holes form a connected chain touching a shell at two different points, - one or more holes form a ring around a subset of the interior. If a disconnected situation is found the location of the problem is recorded. Form s in graph into Minimal EdgeRings. (Minimal Edgerings must be used, because only they are guaranteed to provide a correct isHole computation). Mark all the edges for the edgeRings corresponding to the shells of the input polygons. Only ONE ring gets marked for each shell - if there are others which remain unmarked this indicates a disconnected interior. Check if any shell ring has an unvisited edge. A shell ring is a ring which is not a hole and which has the interior of the parent area on the RHS. (Notice that there may be non-hole rings with the interior on the LHS, since the interior of holes will also be polygonized into CW rings by the LinkAllDirectedEdges() step). true if there is an unvisited edge in a non-hole ring. Checks that a {GeometryGraph} representing an area (a Polygon or MultiPolygon ) is consistent with the SFS semantics for area geometries. Checks include: Testing for rings which self-intersect (both properly and at nodes). Testing for duplicate rings. If an inconsistency if found the location of the problem is recorded. Returns the intersection point, or null if none was found. Check all nodes to see if their labels are consistent. If any are not, return false. Checks for two duplicate rings in an area. Duplicate rings are rings that are topologically equal (that is, which have the same sequence of points up to point order). If the area is topologically consistent (determined by calling the isNodeConsistentArea, duplicate rings can be found by checking for EdgeBundles which contain more than one EdgeEnd. (This is because topologically consistent areas cannot have two rings sharing the same line segment, unless the rings are equal). The start point of one of the equal rings will be placed in invalidPoint. Returns true if this area Geometry is topologically consistent but has two duplicate rings. Implements the algorithsm required to compute the method for s. See the documentation for the various geometry types for a specification of validity. If the following condition is TRUE JTS will validate inverted shells and exverted holes (the Esri SDE model). Checks whether a coordinate is valid for processing. Coordinates are valid iff their x and y ordinates are in the range of the floating point representation. The coordinate to validate. true if the coordinate is valid. Find a point from the list of testCoords that is NOT a node in the edge for the list of searchCoords. The point found, or null if none found. Checks validity of a Point. Checks validity of a LineString. Almost anything goes for lineStrings! Checks validity of a LinearRing. Checks the validity of a polygon and sets the validErr flag. Check that there is no ring which self-intersects (except of course at its endpoints). This is required by OGC topology rules (but not by other models such as Esri SDE, which allow inverted shells and exverted holes). Check that a ring does not self-intersect, except at its endpoints. Algorithm is to count the number of times each node along edge occurs. If any occur more than once, that must be a self-intersection. Tests that each hole is inside the polygon shell. This routine assumes that the holes have previously been tested to ensure that all vertices lie on the shell or inside it. A simple test of a single point in the hole can be used, provide the point is chosen such that it does not lie on the boundary of the shell. The polygon to be tested for hole inclusion. A GeometryGraph incorporating the polygon. Tests that no hole is nested inside another hole. This routine assumes that the holes are disjoint. To ensure this, holes have previously been tested to ensure that: They do not partially overlap (checked by checkRelateConsistency). They are not identical (checked by checkRelateConsistency). Tests that no element polygon is wholly in the interior of another element polygon. Preconditions: Shells do not partially overlap. Shells do not touch along an edge. No duplicate rings exists. This routine relies on the fact that while polygon shells may touch at one or more vertices, they cannot touch at ALL vertices. Check if a shell is incorrectly nested within a polygon. This is the case if the shell is inside the polygon shell, but not inside a polygon hole. (If the shell is inside a polygon hole, the nesting is valid.) The algorithm used relies on the fact that the rings must be properly contained. E.g. they cannot partially overlap (this has been previously checked by CheckRelateConsistency). This routine checks to see if a shell is properly contained in a hole. It assumes that the edges of the shell and hole do not properly intersect. null if the shell is properly contained, or a Coordinate which is not inside the hole if it is not. Gets/Sets whether polygons using Self-Touching Rings to form holes are reported as valid. If this flag is set, the following Self-Touching conditions are treated as being valid: - The shell ring self-touches to create a hole touching the shell. - A hole ring self-touches to create two holes touching at a point. The default (following the OGC SFS standard) is that this condition is not valid (false). This does not affect whether Self-Touching Rings disconnecting the polygon interior are considered valid (these are considered to be invalid under the SFS, and many other spatial models as well). This includes "bow-tie" shells, which self-touch at a single point causing the interior to be disconnected, and "C-shaped" holes which self-touch at a single point causing an island to be formed. States whether geometry with this condition is valid. Tests whether any of a set of LinearRings are nested inside another ring in the set, using a Quadtree index to speed up the comparisons. Implements the appropriate checks for repeated points (consecutive identical coordinates) as defined in the NTS spec. A ShellHoleIdentityException Class Creates a new instance of ShellHoleIdentityException Tests whether any of a set of LinearRings are nested inside another ring in the set, using a simple O(n^2) comparison. Tests whether any of a set of LinearRings are nested inside another ring in the set, using a SweepLineIndex index to speed up the comparisons. Contains information about the nature and location of a Geometry validation error. These messages must synch up with the indexes above Contains information about the nature and location of a validation error. Not used. No longer used: repeated points are considered valid as per the SFS. Indicates that a hole of a polygon lies partially or completely in the exterior of the shell. Indicates that a hole lies in the interior of another hole in the same polygon. Indicates that the interior of a polygon is disjoint (often caused by set of contiguous holes splitting the polygon into two parts). Indicates that two rings of a polygonal geometry intersect. Indicates that a ring self-intersects. Indicates that a polygon component of a lies inside another polygonal component. Indicates that a polygonal geometry contains two rings which are identical. Indicates that either: - A contains a single point. - A contains 2 or 3 points. Indicates that the X or Y ordinate of a is not a valid numeric value (e.g. ). Indicates that a ring is not correctly closed (the first and the last coordinate are different). Finds all connected s of a . Initializes a new instance of the ConnectedSubgraphFinder class. The . Adds all nodes and edges reachable from this node to the subgraph. Uses an explicit stack to avoid a large depth of recursion. Adds the argument node and all its out edges to the subgraph. A sorted collection of DirectedEdges which leave a Node in a PlanarGraph. The underlying list of outgoing DirectedEdges. Adds a new member to this DirectedEdgeStar. Drops a member of this DirectedEdgeStar. Returns an Iterator over the DirectedEdges, in ascending order by angle with the positive x-axis. Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the positive x-axis. Returns the zero-based index of the given DirectedEdge, after sorting in ascending order by angle with the positive x-axis. Returns the remainder when i is divided by the number of edges in this DirectedEdgeStar. Returns the DirectedEdge on the left-hand side of the given DirectedEdge (which must be a member of this DirectedEdgeStar). The underlying list of outgoing Directed Edges Returns the number of edges around the Node associated with this DirectedEdgeStar. Returns the coordinate for the node at wich this star is based. Returns the DirectedEdges, in ascending order by angle with the positive x-axis. A node in a PlanarGraph is a location where 0 or more Edges meet. A node is connected to each of its incident Edges via an outgoing DirectedEdge. Some clients using a PlanarGraph may want to subclass Node to add their own application-specific data and methods. The collection of DirectedEdges that leave this Node. The location of this Node. Constructs a Node with the given location. Constructs a Node with the given location and collection of outgoing DirectedEdges. Returns all Edges that connect the two nodes (which are assumed to be different). Adds an outgoing DirectedEdge to this Node. Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the positive x-axis. Removes this node from its containing graph. Returns the location of this Node. Returns the collection of DirectedEdges that leave this Node. Returns the number of edges around this Node. Tests whether this component has been removed from its containing graph. A map of Nodes, indexed by the coordinate of the node. Adds a node to the map, replacing any that is already at that location. The added node. Removes the Node at the given location, and returns it (or null if no Node was there). Returns the Node at the given location, or null if no Node was there. Returns an Iterator over the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis. Returns the Nodes in this NodeMap, sorted in ascending order by angle with the positive x-axis. A subgraph of a . A subgraph may contain any subset of s from the parent graph. It will also automatically contain all s and s associated with those edges. No new objects are created when edges are added - all associated components must already exist in the parent graph. Creates a new subgraph of the given . Gets the which this subgraph is part of. Adds an to the subgraph. The associated s and s are also added. The to add. Returns an over the s in this graph, in the order in which they were added. Returns an over the s in this graph, in the order in which they were added. Returns an over the s in this graph. Tests whether an is contained in this subgraph. The to test. true if the is contained in this subgraph. Determines the maximum number of common most-significant bits in the mantissa of one or numbers. Can be used to compute the double-precision number which is represented by the common bits. If there are no common bits, the number computed is 0.0. Computes the bit pattern for the sign and exponent of a double-precision number. The bit pattern for the sign and exponent. This computes the number of common most-significant bits in the mantissas of two double-precision numbers. It does not count the hidden bit, which is always 1. It does not determine whether the numbers have the same exponent - if they do not, the value computed by this function is meaningless. /// The number of common most-significant mantissa bits. Zeroes the lower n bits of a bitstring. The bitstring to alter. the number of bits to zero. The zeroed bitstring. Extracts the i'th bit of a bitstring. The bitstring to extract from. The bit to extract. The value of the extracted bit. A representation of the Double bits formatted for easy readability Provides versions of Geometry spatial functions which use common bit removal to reduce the likelihood of robustness problems. In the current implementation no rounding is performed on the reshifted result point, which means that it is possible that the returned Geometry is invalid. Client classes should check the validity of the returned result themselves. Creates a new instance of class, which reshifts result Geometrys. Creates a new instance of class, specifying whether the result Geometrys should be reshifted. Computes the set-theoretic intersection of two Geometrys, using enhanced precision. The first Geometry. The second Geometry. The Geometry representing the set-theoretic intersection of the input Geometries. Computes the set-theoretic union of two Geometrys, using enhanced precision. The first Geometry. The second Geometry. The Geometry representing the set-theoretic union of the input Geometries. Computes the set-theoretic difference of two Geometrys, using enhanced precision. The first Geometry. The second Geometry, to be subtracted from the first. The Geometry representing the set-theoretic difference of the input Geometries. Computes the set-theoretic symmetric difference of two geometries, using enhanced precision. The first Geometry. The second Geometry. The Geometry representing the set-theoretic symmetric difference of the input Geometries. Computes the buffer a point, using enhanced precision. The Geometry to buffer. The buffer distance. The Geometry representing the buffer of the input Geometry. If required, returning the result to the orginal precision if required. In this current implementation, no rounding is performed on the reshifted result point, which means that it is possible that the returned Geometry is invalid. The result Geometry to modify. The result Geometry with the required precision. Computes a copy of the input Geometry with the calculated common bits removed from each coordinate. The Geometry to remove common bits from. A copy of the input Geometry with common bits removed. Computes a copy of each input Geometrys with the calculated common bits removed from each coordinate. An IGeometry to remove common bits from. An second IGeometry to remove common bits from. An array containing copies of the input Geometry's with common bits removed. Allow computing and removing common mantissa bits from one or more Geometries. Add a point to the set of geometries whose common bits are being computed. After this method has executed the common coordinate reflects the common bits of all added geometries. A Geometry to test for common bits. Removes the common coordinate bits from a Geometry. The coordinates of the Geometry are changed. The Geometry from which to remove the common coordinate bits. The shifted Geometry. Adds the common coordinate bits back into a Geometry. The coordinates of the Geometry are changed. The Geometry to which to add the common coordinate bits. The common bits of the Coordinates in the supplied Geometries. Provides versions of Geometry spatial functions which use enhanced precision techniques to reduce the likelihood of robustness problems. Only static methods! Computes the set-theoretic intersection of two Geometrys, using enhanced precision. The first Geometry. The second Geometry. The Geometry representing the set-theoretic intersection of the input Geometries. Computes the set-theoretic union of two Geometrys, using enhanced precision. The first Geometry. The second Geometry. The Geometry representing the set-theoretic union of the input Geometries. Computes the set-theoretic difference of two Geometrys, using enhanced precision. The first Geometry. The second Geometry. The Geometry representing the set-theoretic difference of the input Geometries. Computes the set-theoretic symmetric difference of two Geometrys, using enhanced precision. The first Geometry. The second Geometry. The Geometry representing the set-theoretic symmetric difference of the input Geometries. Computes the buffer of a Geometry, using enhanced precision. This method should no longer be necessary, since the buffer algorithm now is highly robust. The first Geometry. The buffer distance. The Geometry representing the buffer of the input Geometry. Reduces the precision of a Geometry according to the supplied {PrecisionModel}, without attempting to preserve valid topology. The topology of the resulting point may be invalid if topological collapse occurs due to coordinates being shifted. It is up to the client to check this and handle it if necessary. Collapses may not matter for some uses. An example is simplifying the input to the buffer algorithm. The buffer algorithm does not depend on the validity of the input point. Sets whether the reduction will result in collapsed components being removed completely, or simply being collapsed to an (invalid) Geometry of the same type. Gets/Sets whether the PrecisionModel of the new reduced Geometry will be changed to be the PrecisionModel supplied to specify the reduction. The default is to not change the precision model. A ShouldNeverReachHereException Class Creates a new instance of ShouldNeverReachHereException Simplifies a line (sequence of points) using the standard Douglas-Peucker algorithm. Simplifies a Geometry using the standard Douglas-Peucker algorithm. Ensures that any polygonal geometries returned are valid. Simple lines are not guaranteed to remain simple after simplification. Notice that in general D-P does not preserve topology - e.g. polygons can be split, collapse to lines or disappear holes can be created or disappear, and lines can cross. To simplify point while preserving topology use TopologySafeSimplifier. (However, using D-P is significantly faster). Creates a valid area point from one that possibly has bad topology (i.e. self-intersections). Since buffer can handle invalid topology, but always returns valid point, constructing a 0-width buffer "corrects" the topology. Notice this only works for area geometries, since buffer always returns areas. This also may return empty geometries, if the input has no actual area. An area point possibly containing self-intersections. A valid area point. An index of LineSegments. ItemVisitor subclass to reduce volume of query results. A LineSegment which is tagged with its location in a Geometry. Used to index the segments in a point and recover the segment locations from the index. Simplifies a collection of TaggedLineStrings, preserving topology (in the sense that no new intersections are introduced). Simplify a collection of TaggedLineStrings. The collection of lines to simplify. Gets/Sets the distance tolerance for the simplification. Points closer than this tolerance to a simplified segment may be removed. Simplifies a TaggedLineString, preserving topology (in the sense that no new intersections are introduced). Uses the recursive D-P algorithm. Tests whether a segment is in a section of a TaggedLineString- Remove the segs in the section of the line. Simplifies a point, ensuring that the result is a valid point having the same dimension and number of components as the input. The simplification uses a maximum distance difference algorithm similar to the one used in the Douglas-Peucker algorithm. In particular, if the input is an areal point ( Polygon or MultiPolygon ) The result has the same number of shells and holes (rings) as the input, in the same order The result rings touch at no more than the number of touching point in the input (although they may touch at fewer points). A utility for making programming assertions. Only static methods! Executes a transformation function on each element of a collection and returns the results in a new List. Executes a function on each item in a and returns the results in a new . Executes a function on each item in a but does not accumulate the result. Executes a function on each item in a and collects all the entries for which the result of the function is equal to true. The FunctionDelegate defines a structure taking a strong type in and passing a member of the same type back out. The type for the method. The object parameter for the method. An object of type T. Only static methods! Convert the given numeric value (passed as string) of the base specified by baseIn to the value specified by baseOut. Numeric value to be converted, as string. Base of input value. Base to use for conversion. Converted value, as string. A CoordinateFilter that builds a set of Coordinates. The set of coordinates contains no duplicate points. Returns the gathered Coordinates. Contains static methods and parameters that organize the major elements of applying the Fortune linesweep methods The default definition of a coordinate that uses double.NaN to clarify that no value has yet been assigned to this vector. Represents an infinite vector location Boolean, true if the cleanup method should be called. This is unnecessary, for the mapwindow implementation and will in fact cause the implementation to break because infinities and other bad values start showing up. Calculates the voronoi graph, but specifies a tolerance below which values should be considered equal. The original points to use during the calculation A double value that controls the test for equality This for Ben's code and should be passed as true if cleanup should be done. A VoronoiGraph structure containing the output geometries Calculates a list of edges and junction vertices by using the specified points. This defaults to not using any tolerance for determining if points are equal, and will not use the cleanup algorithm, which breaks the HandleBoundaries method in the Voronoi class. The original points to use during the calculation A VoronoiGraph structure containing the output geometries Applies an optional cleanup method needed by Benjamine Ditter for laser data calculations. This is not used by the MapWindow calculations The output voronoi graph created in the Compute Voronoi Graph section A minimum left to right distance The Voronoi Graph after it has been filtered. The HashSet is a dictionary that provides the optimized Adds the specified object to the hash set collection The object to add Gets the enumerator of the items in the set Copies the members of this hash set to the specified array, starting at the specified index Clears the entire set Gets a boolean indicating if the specified item is in the set Removes the specified item Gets the integer count of members in this set These sets can be modified Contains several helpful tools that allow the voronoi polygon creation to work Calculates the euclidean distance A vector class, implementing all interesting features of vectors This double controls the test for equality so that values that are smaller than this value will be considered equal. The x coordinate The y coordinate Creates a vector by reading a long array of vertices and assigning the vector based on that Build a new vector The elements of the vector Transforms the vector into a coordinate with an x and y value True if any of the double values is not a number Convert the vector into a reconstructable string representation A string from which the vector can be rebuilt Compares this vector with another one Calculates the euclidean distance from this cell to another Vector2 stuff Retrieves a hashcode that is dependent on the elements The hashcode Get the scalar product of two vectors Overrides equality to use the tolerant equality Overrides equality to use the tolerant equality test Calculates the vector sum of these two vectors One vector to add The second vector to add The vector sum of the specified vectors Calculates the vector sum of these two vectors One vector to add The second vector to add The vector sum of the specified vectors Multiplies the vector by a scalar The vector to modify The double scale to multiply A new Vector2 Multiplies the vector by a scalar. The double scale to multiply. The vector to modify. A new Vector2. Gets the dot product of this vector with itself Will return the new root (unchanged except in start-up) The Voronoi Edge represents a bisector between two of the original datapoints. The LeftData and RightData represent those original points. VVertexA and VVertexB represent the endpoints of the segment created using those original points. An internal boolean for tracking some cleanup operations The other original point in the dataset One of the original points in the dataset One of the endpoints for the segment that defines this edge THe other endpoint for the segment that defines this edge Adds VertexA and VertexB sequentially, so that if VertexA is defined, then VertexB will become the specified vertex. Boolean, true if both the VertexA and VertexB are infinite vectors Indicates that one of the voronoi vertices for this edge is known, but no intersection is found to bound the other edge, and it should extend to the bounding box. In the case where the line is infinite, this will return the center between the left and right data points. Calculates a vector direction that indicates the direction of this knwon Calculates the length of this edge Voronoi Graph The collection of VoronoiEdges. The Left and Right points are from the original set of points that are bisected by the edge. The A and B Vectors are the endpoints of the edge itself. The vertices that join the voronoi polygon edges (not the original points)