DOC
|
1. if you want to create a constrained Delaunay triangultaion and you do not want any edge to be densified: var pEnv = pPolygon.Envelope;
ITinEdit TinEdit = new TinClass();
TinEdit.InitNew(pEnv);
ITinEdit2 TinEdit2 = TinEdit as ITinEdit2;
TinEdit2.SetToConstrainedDelaunay(); 2. what is the difference between hard and soft in esriTinSurfaceType or esriTinEdgeType? see:15375 - What is the difference between TIN hard and soft breaklines? 3. what are the differences between line, clip, erase in ITinEdit? line: normal clip: delete the data outside a specified polygon, at the same time the data area is bounded by this polygon erase: delete the data inside a specified polygon, at the same time the data area is bounded by this polygon an edge on the boundary is not inside data area. What if there are many polygons? I don't know yet. 4. methods of ITinFeatureEdit: AddPolygon: insert a polygon into a Tin so that the edges of this Polygon will be integrated into the Tin (only in the data area). Before using this method, you should have already create Tin. AddPolygonZ: insert a polygon into a Tin so that the edges of this Polygon will be integrated into the Tin. We can take it as that, AddPolygon is used to make some rules for existing Tin, but AddPolygonZ is used as an element to create Tin. This should be analogous to AddPolyline and AddPolylineZ, I guess. 5. my example //generates some points
IPoint ipt1 = new PointClass(); ipt1.PutCoords(0, 0); ipt1.Z = 0;
IPoint ipt2 = new PointClass(); ipt2.PutCoords(1, 0); ipt2.Z = 0;
IPoint ipt3 = new PointClass(); ipt3.PutCoords(0.8, 0.8); ipt3.Z = 0;
IPoint ipt4 = new PointClass(); ipt4.PutCoords(0, 1); ipt4.Z = 0;
IPoint ipt5 = new PointClass(); ipt5.PutCoords(0, 0); ipt5.Z = 0;
//generate a polygon
IPointCollection pCol = new PolygonClass();
pCol.AddPoint(ipt1);
pCol.AddPoint(ipt2);
pCol.AddPoint(ipt3);
pCol.AddPoint(ipt4);
pCol.AddPoint(ipt5);
IPolygon pPolygon = pCol as IPolygon;
//set the environment of TIN
var pEnv = pPolygon.Envelope;
ITinEdit TinEdit = new TinClass();
TinEdit.InitNew(pEnv);
ITinEdit2 TinEdit2 = TinEdit as ITinEdit2;
TinEdit2.SetToConstrainedDelaunay();
//each point of pPolygon must have Z value, that is, Z must not be NaN
ITinFeatureEdit pTinFeatureEdit = TinEdit as ITinFeatureEdit;
pTinFeatureEdit.AddPolygonZ(pPolygon, esriTinEdgeType.esriTinHardEdge, 1, 1, 1, null);
//add the polygon as the constraint
//each point of pPolygon must have Z value, that is, Z must not be NaN
TinEdit.AddShape(pPolygon, esriTinSurfaceType.esriTinHardClip, 0);
//get TinEdge form TIN
ITinAdvanced2 ptinadvanced2 = TinEdit as ITinAdvanced2;
List<ITinEdge> ITinEdgeLt = new List<ITinEdge>(ptinadvanced2.DataEdgeCount);
for (int i = 0; i < ptinadvanced2.EdgeCount; i++)
{
ITinEdge ptinedge = ptinadvanced2.GetEdge(i + 1);
if (ptinedge.IsInsideDataArea)
{
ITinEdgeLt.Add(ptinedge);
}
}
If you want to construct a TIN for a mixture of points and polygons, you should first add the polygons into the TIN. If you add the points first, then the TIN will be constructed according to these points and many TIN edges are also constructed. Now if you add a polygon, then an edge of this polygon could intersect an existing TIN edge. In this case, ArcObjects would simply split both the edge and the existing TIN edge by inserting a new TIN node. Any suggestions would be appreciated.
... View more
12-17-2014
08:08 AM
|
0
|
1
|
5188
|
POST
|
The answer is NO! I figured it out by asking a staff working in ESRI company. He told me that "the one-year student license only includes ArcGIS for Desktop not the ArcGIS Engine".
... View more
03-06-2014
11:58 PM
|
0
|
0
|
456
|
POST
|
I got ArcGIS 10.1 Education edition. I have installed ArcGIS for Desktop, and it works. I also want to use ArcGIS Engine (ArcObjects SDK for Microsoft .NET Framework), but it seems I do not have the authority. After I installed ArcGIS Engine, then tried creating a new ArcGIS Engine project "MapControl Application", it showed "Missing ArcGIS Engine 10.1", just like the picture below: [ATTACH=CONFIG]31892[/ATTACH] So, do I have the authority for ArcGIS Engine? Any help will be appreciated.
... View more
03-02-2014
04:13 AM
|
0
|
1
|
916
|
POST
|
Technically you should be assigning a spatial reference to your geometries so that the linear units are defined. That spatial reference will also define the precision. Up to a certain point, yes this is true. However, I'm assuming your linear units are feet or meters since these are quite common. If that's the case then the results are accurate out to about a millionth of a foot or meter. You'd need an electron microscope to see that so does it really matter? Thank you very much for your reply. Your answer is reasonable. For the vision purpose, the current precision is enough. However, I want to save the coordinates of the intersections as data, and later use the data for some other applications. In this case, some problems may occur. Therefore, it's better to get extrem precise intersections to avoid potential problems. Is there anyway to see the codes of the "Intersect" function or how the "Intersect" function is implemented?
... View more
01-30-2014
09:38 AM
|
0
|
0
|
498
|
POST
|
I tested "Intersect" from ITopologicalOperator, and found out that the result was not precision. My test is very simple. I created two polylines, each of which had two vertices: the first polyline: (0,0) and (1,1) the second polyline: (0,1) and (1,0) When I used the "intersect" function of ITopologicalOperator, I got an intersection, whose coordinates were 0.50000190734863281, 0.50000190734863281, which are not precision. Does anybody know why? It's better to get a more precision result. Thank you very much! Below are my codes: object Missing = Type.Missing; IPointCollection pCol1 = new PolylineClass(); IPoint ipt1 = new PointClass(); ipt1.PutCoords(0, 0); IPoint ipt2 = new PointClass(); ipt2.PutCoords(1, 1); pCol1.AddPoint(ipt1, ref Missing, ref Missing); pCol1.AddPoint(ipt2, ref Missing, ref Missing); IPolyline ipl1=pCol1 as IPolyline ; IPointCollection pCol2 = new PolylineClass(); IPoint ipt3 = new PointClass(); ipt3.PutCoords(0, 1); IPoint ipt4 = new PointClass(); ipt4.PutCoords(1, 0); pCol2.AddPoint(ipt3, ref Missing, ref Missing); pCol2.AddPoint(ipt4, ref Missing, ref Missing); IPolyline ipl2=pCol2 as IPolyline ; ITopologicalOperator pTop = ipl1 as ITopologicalOperator; IGeometry pGeoIntersect = pTop.Intersect(ipl2, esriGeometryDimension.esriGeometry0Dimension); IPointCollection pColIntersect = pGeoIntersect as IPointCollection; for (int j = 0; j < pColIntersect.PointCount; j++) { double dblx = pColIntersect.get_Point(j).X; double dbly = pColIntersect.get_Point(j).Y; }
... View more
01-29-2014
07:16 AM
|
0
|
3
|
2254
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|