Welcome Guest, you are in: Login

FDOT Wiki

RSS RSS

GisFramework



Search the wiki
»

Advanced GIS Functionality

RSS
Modified on Monday, 18 July 2011 08:39 AM by 156.75.200.64 Categorized as Uncategorized
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.

Table of Contents [Hide/Show]


Measurements
         MeasureManager
         Example
Unit Conversion
         UnitConversion
         Example
ConvexHull
         Example
Geometry Encoding
See Also


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.

NameTypeDescription
GetMeasureManager(Unit unit,SquareUnit squareUnit)MeasureManagerThe method takes in the Unit and Square Unit that measurements will be outputted in.
GetPerimeter(DataContracts.IPolygon polygon)doubleGets the perimeter from a polygon.
GetPolygonArea(DataContracts.IPolygon polygon)doubleGets the area from a polygon.
GetPolyLineDistance(DataContracts.IPolyline polyline)doubleGets 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

NameTypeDescription
ConvertUnit(Unit from, Unit to,double distance)doubleConverts distance unit from another.
ConvertSquareUnit(SquareUnit from,SquareUnit to,double distance)doubleConverts 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.

NameReturn TypeDescription
GetConvexhull(IEnumerable points)GeometryCreates 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

Any Questions or Comments? Email
Some of the icons created by FamFamFam.