This sample shows how to explore all the different APIs for Geometric Functions.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Leaflet
OpenLayers
.gitignore
GeometricFunctions.sln
README.md
ScreenShot.png

README.md

Geometric Functions Sample for WebApi

Description

This sample shows how to explore all the different APIs for Geometric Functions.

Please refer to Wiki for the details.

Screenshot

Requirements

This sample makes use of the following NuGet Packages

MapSuite 10.0.0

About the Code

BaseShape shape1 = inputFeatures[parameters["id1"]].GetShape();
BaseShape shape2 = inputFeatures[parameters["id2"]].GetShape();

MultilineShape resultShape = shape1.GetShortestLineTo(shape2, GeographyUnit.Meter);
double distance = shape1.GetDistanceTo(shape2, GeographyUnit.Meter, DistanceUnit.Feet);

Feature shortestLine = new Feature(resultShape);
shortestLine.ColumnValues["Display"] = string.Format("Distance is {0:N2} feet.", distance);

SaveFeatures(accessId, new Feature[] { inputFeatures[parameters["id1"]], inputFeatures[parameters["id2"]], shortestLine });

Getting Help

Map Suite WebAPI Wiki Resources

Map Suite WebAPI Product Description

ThinkGeo Community Site

ThinkGeo Web Site

Key APIs

This example makes use of the following APIs:

About Map Suite

Map Suite is a set of powerful development components and services for the .Net Framework.

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.