Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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

Browse other questions tagged or ask your own question.