有沒有人使用.Net拓撲套件? 我有點卡住,我試圖讓信封,所以我可以確認尺寸使用.Net拓撲套件從IGeometry類型獲取IEnvelope
根據http://resources.esri.com/help/9.3/arcgisengine/dotnet/c6e6b26c-be52-4176-b1e5-bb628d10acd0.htm(使用頁面底部的C#示例)
我正在和IGeometry類型(邊界)和流延多邊形的信封與我希望能看一下width和height屬性
但信封的IEnvelope(信封)總是空
IGeometry boundary;
var wktReader = new WKTReader(OSGBGeometryFactory.Factory);
boundary = wktReader.Read(projectDTO.BoundaryWKT);
IEnvelope envelope = boundary.Envelope as IEnvelope;
能
任何人的幫助,這是我第一次與這個套件。
我正在試圖找出是,如果下面的這個例子,我已經有一個IGeometry類型(我的邊界變量)爲什麼是空當我嘗試投它。
using ESRI.ArcGIS.Geometry;
class temp
{
public void test()
{
// Create an empty polygon object.
IArea areaPolygon = new PolygonClass();
// Cast to the IGeometry interface of the polygon object.
IGeometry geometryPolygon = (IGeometry)areaPolygon;
// Use the .Envelope property on the IGeometry interface of the
// polygon object to get an envelope object.
IEnvelope envelope = geometryPolygon.Envelope;
// Test to make sure you have an envelope object.
if (envelope is Envelope)
{
// The polygon object and resulting envelope are empty.
if (envelope.IsEmpty)
{
System.Windows.Forms.MessageBox.Show("The envelope is empty.");
}
}
}
}
我需要創建一個新的多邊形,並嘗試流延(即複製IArea areaPolygon = new PolygonClass();
)?