public static ILucidGeometry Create(string geometryJson) { if (geometryJson.Contains("\"x\"")) { return(LucidPoint.Create(geometryJson)); } if (geometryJson.Contains("\"xmax\"")) { return(LucidExtent.Create(geometryJson)); } if (geometryJson.Contains("\"paths\"")) { return(LucidLine.Create(geometryJson)); } if (geometryJson.Contains("\"rings\"")) { return(LucidPolygon.Create(geometryJson)); } throw new Exception($"Unrecognized geometry type {geometryJson}"); }
/// <summary> /// Returns a circular buffer geometry for a point with the provided radius and vertex count. /// </summary> /// <param name="point">The point to buffer.</param> /// <param name="radius">The radius to buffer the point by.</param> /// <param name="edgeCount">The number of vertices, complexity, of the produced circular buffer.</param> /// <returns></returns> public static ILucidPolygon BufferPoint(IPoint point, double radius, int edgeCount = 24) { var path = CircularPathFromPoint(point, radius, edgeCount); return(LucidPolygon.Create(path.Vertices)); }
public static LucidPolygon Create(Map geometry, LucidSpatialReference spatialReference = null) { return(LucidPolygon.Create(geometry.ToString(), spatialReference)); }
public ILucidPolygon AsPolygon() { return(LucidPolygon.Create(Vertices, SpatialReference)); }