1.创建区域
需要提供点坐标。最少三个点可以确定一个区域。
创建区域也是一样,创建对象然后设置点位置 ,然后设置区域属性。
var referenceSurface = m_earth.Shape;
// We specify the boundary in terms of nodes connected by geodesics.
var result = new List<Cartographic>();
result.Add(new Cartographic(115.952385, 39.885819, 0));
result.Add(new Cartographic(116.090365, 39.946029, 0));
result.Add(new Cartographic(116.658381, 39.917702, 0));
// With the boundary nodes specified and the reference surface chosen,
// we now decide on the granularity of the interconnecting curves.
double granularity = Trig.DegreesToRadians(0.5);
var builder = new SpecifiedNodesEllipsoidSurfaceRegionBuilder(referenceSurface, granularity, result);
// The default connection type is geodesic, but rhumb lines could be used instead if desired.
builder.ConnectionType = EllipsoidSurfaceRegionCurveConnectionType.Geodesic;
// The region is ready to be built!
var region = builder.Ge