POST
|
When you say simplified version of polygons for performance reason, my understanding is you mean polygons with less vertices, not meaning topologically simple. If my understanding is right, I'd suggest you use IGeometryServer2::Generalize if you want to process a bunch of polygons at one time. If just few polygons involved, you can also consider IPolycurve::Generalize method. I come up with a piece of .NET code to show how to use IGeometryServer2::Generalize. //Initiliaze some input parameters. Suppose featClsInput is the feature class you are working on. ISpatialReference inSR= (featClsInput as IGeoDataset).SpatialReference; IGeometryArray arrayIn = new GeometryArrayClass(); //input array of geometries IFeatureCursor featCur = featClsInput.Search(null, true); IFeature feat; while ((feat = featCur.NextFeature()) != null) { arrayIn .Add(feat.ShapeCopy as IGeometry); } double md = someValue; //max deviation ISpatialReferenceFactory srf = new SpatialReferenceEnvironmentClass(); ILinearUnit u = srf.CreateUnit((int)esriSRUnitType.esriSRUnit_Meter) as ILinearUnit; IGeometryServer2 geomSrv2 = new GeometryServerImplClass(); IGeometryArray arrayOut = geomSrv2.Generalize(inSR, arrayIn, md, u); You can retrieve the output polygons by calling arrayOut.get_Element(index) Hope it helps.
... View more
06-28-2013
11:05 AM
|
0
|
0
|
13
|
POST
|
So, if you look into the one that identified by the script as equal but not selected by the tool, can you tell whether or not they are the same in both layers? As I know the method of IClone::IsEqual is reliable. I am not clear about the statement "some features which did overlap exactly were also displayed by the script", I suppose they are not selected by the tool. Do you think they should be equal or not?
... View more
06-12-2013
09:39 AM
|
0
|
0
|
22
|
POST
|
The bug Duncan mentioned only applies to Polyline/Polyline intersection. I just verfied that intersection works with donut-like polygon. Can you please check the output after you set IsKnownSimple = falase and Simplify? Is this one still with an interior ring?
... View more
06-11-2013
11:20 AM
|
0
|
0
|
17
|
POST
|
Hm. Were you able to identify which features causing the inconsistence between these two approaches? Can you tell which approach works better in those cases?
... View more
06-11-2013
10:07 AM
|
0
|
0
|
22
|
POST
|
If you edit a featue, the OBJECTID value won't change, so you can get the Object ID of the feature in old feature class, featureOld.OID and assign it to some string variable, say s. You can then search the new feature class for the feature with the same Object ID with pQueryFilter.WhereClause = "OBJECTID = " & "s"
... View more
06-07-2013
09:50 AM
|
0
|
0
|
22
|
POST
|
There is some documents in SDK might help. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_build_a_polygon_using_segments_and_points/0001000002sq000000/
... View more
06-07-2013
09:28 AM
|
0
|
0
|
6
|
POST
|
Try the following steps in your code. 1. I don't know where the data source for the input donut polygon, so before you call Simplify, set the property IsKnownSimple to false. 2. The 0 dimensional output for intersection call is of MultiPoint type, instead of Point type.
... View more
06-04-2013
08:47 AM
|
0
|
0
|
17
|
POST
|
Let me try. 'First get the feature class from the 2 layers. Set featClsOld = PolyOldLayer.FeatureClass Set featClsNew = PolyNewLayer.FeatureClass 'Use cursors for looping through featClsOld Set featCursorOld = featClsOld.Search(Nothing, true) Set featureOld = featCursorOld.NextFeature While Not featureOld Is Nothing 'loop here ... ... Set featureOld = featCursorOld.NextFeature Wend 'Inside the loop, find the feature in featClsNew with the same ObjectID as featureOld 'using IQueryFilter and the WhereClause specify the query condition of ObjectID featCursorNew = featClsNew.Search(queryFilter, true) featureNew = featCursorNew.NextFeature 'Use IClone method IsEqual to compare the geometries of the two features. Set cloneOld = featureOld.ShapeCopy Set cloneNew = featureNew.ShapeCopy If cloneOld.IsEqual(cloneNew) = False Then count++ End If 'Here count is the number of polygons edited.
... View more
05-31-2013
03:49 PM
|
0
|
0
|
22
|
POST
|
GeometryBag class does implement IRelationalOperator. To make it work as you expected for now, I'd recommend IRelationalOperatorNxM instead of IRelationalOperator since you are testing 2 geometry bags.
... View more
03-14-2013
03:28 PM
|
0
|
0
|
11
|
POST
|
Or you can use Disjoint method to double check. Another thing seems confusing is fcInsideBarriers a feature class or geometry? IRelationalOperator only works with geometries.
... View more
03-14-2013
09:19 AM
|
0
|
0
|
11
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|