Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 need to create a grid of polygons. Each polygon is rectangle, thus has 4 corners (vertices). When I create polygon features using ArcObjects they seem to have wrong geometry, which results in wrong label placement (outside polygons).

I use the following approach:

Dim pPntColl As IPointCollection
pPntColl = New Polygon

Dim pPoint As IPoint
pPoint = New Point
pPoint.PutCoords(dX, dY)


When I use 4 vertices I get a polygon which has one segment missing (visible in Edit session). polygon made of 4 points

When I add the first point at the end of polygon (as a 5th point), geometry looks good, but the label is still off.

polygon made of 5 points

I know I can use ITopologicalOperator2 and Simplify() method but:

  1. This affects the performance (I need to create many thousands of polygons).
  2. I don't understand, what is the reason of the problem. I have 4 points, they should create a topologically correct polygons...

So, my question is: what is the best way of creating polygon features within a polygon feature class using ArcObjects?

I already checked some ESRI recommended approaches, e.g.: but the problem is still the same: I need to use Simplify() to get polygons right.

Any help and hints how to optimize this will be appreciated.

share|improve this question
Are you adding the points in a clockwise direction? Also did, you try IGeometryBridge2.AddPoints? – Kirk Kuykendall Dec 5 '12 at 19:14
I tried IGeometryBridge2.AddPoints and the result was the same. Adding points in a clockwise direction solved the problem! Thanks Kirk. – jan_b Dec 6 '12 at 7:33
PS. Kirk, can you move your comment to an answer section, so I can set it as an accepted answer..? – jan_b Dec 6 '12 at 7:46
Did you already rule out using the Create Fishnet geoprocessing tool? – blah238 Dec 6 '12 at 17:23
Yes, I did. But I need a bit more control over created grid, that's why need to use ArcObjects. Thanks for a hint, though. – jan_b Dec 6 '12 at 19:22
up vote 2 down vote accepted

Add the points in a clockwise order.

When you call IPointCollection.AddPoint, on a polygon the point is added to the exterior ring of the polygon. Vertices in exterior rings are expected to be clockwise, so if you don't add them in clockwise order ArcObjects will need to do more work to re-order them.

Interior rings (e.g. donut holes) are counter-clockwise.

share|improve this answer
That was it! Thanks, Kirk. – jan_b Dec 6 '12 at 19:23

Try casting the IPointCollection to an IPolygon and closing it using IPolygon.Close().

You need to use only four vertices (no need to duplicate first and last vertices).

It could be something like below in VBA(not tested)..

pPoint.PutCoords(dX, dY)

dim pPolygon as IPolygon
set pPolygon = pPntColl

dim pFeature as IFeature
set pFeature = pFeatureClass.CreateFeature()

pFeature.Shape = pPolygon
share|improve this answer
I tried this. Closing a polygon helps, i.e. the feature has all four segments but labels are still misplaced... – jan_b Dec 5 '12 at 12:31

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.