Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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[i] is PolygonN)
                    {
                        PolygonN featureExtent = attributes.Values[i] as PolygonN;
                        // Problem here >>>
                        PointCollection vertices = featureExtent as PointCollection;
                     }
            }
share|improve this question
    

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.