Sign up ×
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 have a bunch of IPoints. I need an extent which contains all of them. Is there a quick way to do it? I had the idea of converting them to screen coordinates and then figuring it out manually but that seems like the wrong way to do it.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

I'd leverage IEnvelope.Union. All IGeometry objects have an envelope, including points.

Here's some pseudocode:

envelope e = null
Foreach point
   if e == null then
      e = point.Envelope
   end if
next point
share|improve this answer

I usually do it Kirk's way, but you could add them to a geometry bag and get the extent:

share|improve this answer

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.