Select to view content in your preferred language

Vertices of a polygon, Wcf Service

446
0
04-23-2013 03:01 PM
jayshukla
Regular Contributor
Hi There,
I am trying to get vertices of a polygon and having some issues with it. I have PolygonN object and would like to get PointCollection and get access to each points that make up the polygon, any ideas? 

           var records = client.QueryFeatureData(mapName, layerId, queryDef);
           var recordsEnumerator = records.Records.GetEnumerator();

            while (recordsEnumerator.MoveNext())
                {
                    Record attributes = recordsEnumerator.Current as Record;

                    for (int i = 0; i < attributes.Values.Count(); i++)
                        if (attributes.Values is PolygonN)
                        {
                            PolygonN featureExtent = attributes.Values as PolygonN;
                            PointCollection vertices = featureExtent as PointCollection; //<<<<<<<<<<<Problem here
                        }
                }
0 Kudos
0 Replies