Hello,
this is my first post - I am pretty new to Esri & gisses.
I am using FileGeoDatabase and C#
What is my problem: The SPEED of getting all segments of all polygons in a feature class. I found out about two ways how to do it:
First way:
1. enumerate all polygons, get every single one's ExteriorRingBags (inputPoly.ExteriorRingBag),
2. enumerate all it's exterior rings, get segments from every exterior ring and get interior ringbag of every exterior ring (inputPoly.get_InteriorRingBag(extRing))
3. enumerate all interior rings of every interior ringbag and get it's segments
This way I can collect all segments from all features of a polygon feature class and use them somewhere else (I actually just need the start and end coordinates of each segment)
Second way:
Usings the function: "FeatureToLine" I can store all features of a polygon feature class, but then I need to get every single segment of the newly created Line class.
The "First" way => to go through all the ArcObjects, through all the enumerations to collect the semgents, is damn slow and therefore not usable - to collect all segments (finally I got them 218 000) of 17000 features lasts over 30 minutes
The "Second" way is a bit faster, because there are not as many enumerations as in the first way, but it is still slow...
Therefore my question: Does anybody know how to query/get all segments of all polygons really fast way? I really need to get through them within seconds or worst - within "very" few minutes, but can't let the algorithm work for 30 min....
Does anybody know how to help me?
Every help is appreciated!!!
Thanx,
Vladimir