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 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
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.