The GIS Framework contains a number of GIS Functionality that is already supplied. Some of this functionality contains the ability to perform Measurements, Unit Conversions, ConvexHulls, and Geometry Encoding.
Measurements
Measurements are supports two types of Measurements, planer and spherical.
MeasureManager
The class FDOT.GIS.Client.Domain.Measurement.MeasureManager automatically takes into account the spatial reference of the map and uses the correct type of measurement. The MeasureManager has a static method GetMeasureManager that returns an instance of the MeasureManager.
Name | Type | Description |
---|
GetMeasureManager(Unit unit,SquareUnit squareUnit) | MeasureManager | The method takes in the Unit and Square Unit that measurements will be outputted in. |
GetPerimeter(DataContracts.IPolygon polygon) | double | Gets the perimeter from a polygon. |
GetPolygonArea(DataContracts.IPolygon polygon) | double | Gets the area from a polygon. |
GetPolyLineDistance(DataContracts.IPolyline polyline) | double | Gets the distance for a polyline. |
Example
var measureManager=MeasureManager.GetMeasureManager(Unit.Mile, SquareUnit.SquareMile);
measureManager.GetPolygonArea(polygon);
measureManager.GetPolyLineDistance(polygon);
Unit Conversion
The framework includes the ability to do a number of unit conversions.
UnitConversion
Name | Type | Description |
---|
ConvertUnit(Unit from, Unit to,double distance) | double | Converts distance unit from another. |
ConvertSquareUnit(SquareUnit from,SquareUnit to,double distance) | double | Converts a square unit from another. |
Example
var converter = new UnitConversion();
var convertedMeasurement = converter.ConvertUnit(Unit.Mile, Unit.Feet, 5000);
ConvexHull
Find the convex hull of a point set in the plane.
Name | Return Type | Description |
---|
GetConvexhull(IEnumerable points) | Geometry | Creates a convex hull based on a list of points. |
Example
ConvexHull.Convexhull.GetConvexhull(points);
Geometry Encoding
The Framework contains the ability to Encode and Decode geometry to a string that has reduces the size. For more information about the about the algorithm see
Google Encoded Polyline Algorithm.
GeometryEncoder.Encode(geometry.Points)
See Also