The GeometryService contains utility methods, which provide access to sophisticated and frequently used geometric operations.
Project
Projects an array of input geometries from an input spatial reference to an output spatial reference.
ProjectOptions
Name | Type | Description |
---|
Geometries | GeometryOptions | The Geometries that are be projected. |
InSpatialReference | SpatialReference | The input Spatial Reference |
OutSpatialReference | SpatialReference | The output Spatial Reference |
Example
var geometryOption = new GeometryOptions
{
Geometeries = new[]
{
new Geometry {X = -117, Y = 34}
},
GeometryType = GeometryTypes.Point
};
var options = new ProjectOptions
{
InSpatialReference = new SpatialReference { WellKnownId = "4326" },
OutSpatialReference = new SpatialReference { WellKnownId = "102113" },
Geometries = geometryOption
};
var svs = new GeometryService();
svs.Project(options);
Simplify
Simplify permanently alters the input geometry so that the geometry becomes topologically consistent. This resource applies the ArcGIS simplify operation to each geometry in the input array.
Buffer
The result of this operation is buffer polygons at the specified distances for the input geometry array.
Areas and lengths¶
This operation calculates areas and perimeter lengths for each polygon specified in the input array.
Relation
This operation determines the pairs of geometries from the input geometry arrays that participate in the specified spatial relation.
Label Points
This operation calculates an interior point for each polygon specified in the input array. These interior points can be used by clients for labeling the polygons.
See Also