DotSpatial.Analysis Used to represent a line segment. Gets or sets the x1. The x1. Gets or sets the x2. The x2. Gets or sets the M. The M. Gets or sets the Q. The Q. A class that makes adding a buffer to a feature set very simpple. A static function to compute the buffer and return the result to the Execute function. The feature set that will be buffered. The distance of the buffer. The resulting feature set that will show the buffer. Optional parameter to report progress and cancel if needed. A class for supporting methods to generate random points. Erase features from one feature set where they are intersected by another feature set. Features which will be erased in part or whole. Features which represent areas to erase. Optional parameter to report progress and cancel entire process if needed. A point feature set with the randomly created features. Add the features from SourceFeatures to the TargetFeatures feature set. Feature set to which features will be added. Source of features to add to the target feature set. A point feature set with the randomly created features. A class for supporting methods to generate random points. Creates a specified number of random point features inside multiple polygon features in a feature set. Random points will be generated inside all features in this feature set. The number of points to be randomly generated. FeatureSet, the points should be added to. Optional parameter to report progress and cancel entire process if needed. A point feature set with the randomly created features. Creates a specified number of random point features inside a single polygon feature. Random points will be generated inside this polygon feature. The number of points to be randomly generated. A point feature set with the randomly created features. Clip input raster with polygon. Finds the X-coordinate of the first scanline The polygon The input raster the X-coordinate of the first scanline Finds the first raster column corresponding to the left-most edge of the poly the polygon the input raster The raster column corresponding to the left-most edge of the poly (if raster starts before left edge of the poly) or the first raster column (if raster starts after left edge of the poly) If the poly sits to the left of the raster then the first column of the raster is returned. Finds the last raster column corresponding to the right-most edge of the poly the polygon the input raster The raster column corresponding to the right-most edge of the poly (if raster ends after the right edge of the poly) or the last raster column (if raster ends before right edge of the poly) Clips a raster with a polygon feature The input raster file The clipping polygon feature The output raster file Progress handler for reporting progress status and cancelling the operation The output clipped raster object Clips a raster with a polygon feature The clipping polygon feature The input raster object the output raster file name Progress handler for reporting progress status and cancelling the operation We assume there is only one part in the polygon. Traverses the raster with a vertical scan line from left to right, bottom to top Parses the intersections. Moves bottom to top. The intersections. The x current. The column. The output. The input. Gets the Y intersections. The borders. The line-scan x-value. Gets the borders of the specified feature except vertical lines. The feature. Finds the x-coordinate of the first raster column to process The lowest left coordinate of the polygon. The lowest left coordinate of the raster. Size of the cell. Finds the index of the first raster column to process The lowest left coordinate of the polygon. The lowest left coordinate of the raster. Size of the cell. Finds the index of the first raster row to process The lowest left coordinate of the polygon. The lowest left coordinate of the raster. Size of the cell. Finds the y-coordinate of the first raster row to process The lowest left coordinate of the polygon. The lowest left coordinate of the raster. Size of the cell. Initializes a new instance of the FileLogger class which is an implementation of ILogger designed to save content to a file. An exception was thrown, so this will post the stack trace and message to debug. The exception to log. This handles the situation where a public method has been entered. The method name. The list of parameters. This handles the situation where a public method has been left. The method name of the function being left. Handles the situation where a status message has been posted. The status message text. This is not really used because this saves data to a file. A basic string to help categorize the message, usually just the message with no percentage information. The string percent to appear in a progress message. The string message combining both the key and the percent information. Handles the situation where a simple message box where only a message was specified was shown to the user. It also shows the result that the user pressed. The message text. The boolean result. This method allows the logger to receive information about input boxes that were shown as well as the values entered into them and the result. The string message that appeared on the input box. The System.Windows.Forms.DialogResult describing if the value was cancelled. The string containing the value entered. Gets or sets the string file to append debug messages to. Gets a description of this logger. Gets or sets the integer key that allows us to retrieve this logger from the Manager when we wish to remove it. A class for creating "ranges" of raster values. Initializes a new instance of the RasterBin class. This uses the BaseValue and BinSize properties in order to categorize the values according to the source. The cells in the bin will receive a value that is equal to the midpoint between the range. So a range from 0 to 10 will all have the value of 5. Values with no data continue to be marked as NoData. The source raster. The output filename. The progress handler for messages. The IRaster of binned values from the original source. Gets or sets the "origin" of the bins. Bins may occur above or below this, in increments of "BinSize". The default is 0. Gets or sets the double value separating the bins for the raster. The default is 10. This class resamples the given raster cells. This will resample the cells. If the cell size is zero, this will default to the shorter of the width or height divided by 256. The input raster. The new cell height. The new cell width. The destination file name. Resampled raster name. This will resample the cells. If the cell size is zero, this will default to the shorter of the width or height divided by 256. the input raster. The new cell height or null. The new cell width or null. The string name of the output raster. An interface for handling the progress messages. The resampled raster. A class for supporting methods to calculate the slope. Executes the slope generation raster. The input altitude raster. The double precision multiplicative scaling factor for elevation values. A boolean parameter that clarifies the nature of the slope values. If this is true, the values represent percent slope. The progress handler. The output slope raster, or null if the process was unsuccessful. VectorToRaster uses the help of GDI+ to create a bitmap, draws the features to the bitmap, and then converts the color coded cells to a raster format. This is limited to bitmaps that are within the 8, 000 x 8, 0000 size limits. Creates a new raster with the specified cell size. If the cell size is zero, this will default to the shorter of the width or height divided by 256. If the cell size produces a raster that is greater than 8, 000 pixels in either dimension, it will be re-sized to create an 8, 000 length or width raster. The featureset to convert to a raster. The double extent of the cell. The integer field index of the file. The fileName of the raster to create. The resulting IRaster generated by the ToRaster operation. Creates a new raster with the specified cell size. If the cell size is zero, this will default to the shorter of the width or height divided by 256. If the cell size produces a raster that is greater than 8, 000 pixels in either dimension, it will be re-sized to create an 8, 000 length or width raster. The featureset to convert to a raster. The double extent of the cell. The integer field index of the file. The fileName of the raster to create. The optional GDAL driver code to use if using GDAL for a format that is not discernable from the file extension. An empty string is usually perfectly acceptable here. For GDAL rasters, they can be created with optional parameters passed in as a string array. In most cases an empty string is perfectly acceptable. An interface for handling the progress messages. Generates a raster from the vectors. Creates a new raster with the specified cell size. If the cell size is zero, this will default to the shorter of the width or height divided by 256. If the cell size produces a raster that is greater than 8, 000 pixels in either dimension, it will be re-sized to create an 8, 000 length or width raster. The featureset to convert to a raster. Force the raster to this specified extent. The double extent of the cell. The integer field index of the file. The fileName of the raster to create. The optional GDAL driver code to use if using GDAL for a format that is not discernable from the file extension. An empty string is usually perfectly acceptable here. For GDAL rasters, they can be created with optional parameters passed in as a string array. In most cases an empty string is perfectly acceptable. An interface for handling the progress messages. Generates a raster from the vectors. This class provides an application programming interface to access the Voronoi calculations that are wrapped by a tool. The Voronoi Graph calculation creates a delaunay tesselation where each point is effectively converted into triangles. The points to use for creating the tesselation. The generated line featureset. The Voronoi Graph calculation creates the lines that form a voronoi diagram. The points to use for creating the tesselation. An IFeatureSet that is the resulting set of lines in the diagram. The Voronoi Graph calculation creates the lines that form a voronoi diagram. The points to use for creating the tesselation. The normal polygons have sharp angles that extend like stars. Cropping will ensure that the original featureset extent plus a small extra buffer amount is the outer extent of the polygons. Errors seem to occur if the exact extent is used. The IFeatureSet containing the lines that were formed in the diagram. The Voronoi Graph calculation creates the lines that form a voronoi diagram. The points to use for creating the tesselation. The output featureset. The normal polygons have sharp angles that extend like stars. Cropping will ensure that the original featureset extent plus a small extra buffer amount is the outer extent of the polygons. Errors seem to occur if the exact extent is used. The original algorithm simply allows edges that have one defined point and another "NAN" point. Simply excluding the not a number coordinates fails to preserve the known direction of the ray. We only need to extend this long enough to encounter the bounding box, not infinity. The VoronoiGraph with the edge list. The polygon bounding the datapoints.