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 render a rectangle graphics box onto the map, given the center location of an polygonal feature and the extent dimensions (length and width) in meters. The feature has the spatial reference of its shape set to WGS84 though.

I am able to get the location of the feature (an IPoint) by taking its centroid. Is there then a straightforward way to accomplish the drawing of such a box with meter-dimensions around that point?

Looking at the API, IEnvelope seems to be what I need, but will I have issues with unit-conversions (since I need the extent dimensions to be in meters)? And how should I go about rendering the IEnvelope?

Any help is appreciated, thanks!

share|improve this question
This should be pretty simple given the right interfaces, but I'm not sure of the best approach. Do you want the graphic to persist or do you just want it to flash on the screen momentarily? – blah238 Oct 9 '12 at 17:23
In a geographic coordinate system, the "envelope" will actually be a polygon with curved segments. I guess IConstructGeodetic could be of help. – Petr Krebs Oct 9 '12 at 18:42
If you do not want the edges to be curved, you could construct a geodesic ellipse (IConstructGeodetic.ConstructGeodesicEllipse) around the point with the semi-major and semi-minor axes corresponding to the half of the width and length, respectively, then get an envelope of that geometry. – Petr Krebs Oct 9 '12 at 18:50
If your data frame can be rotated you might also consider the need to rotate the envelope before displaying it as a graphic. – blah238 Oct 9 '12 at 19:48
Thanks @blah238 and Petr. Yes I would want the graphic to persist as an IElement, and I don't want the edges to be curved. I'll try out the Geodesic Ellipse. I am unsure about the semi-major azimuth parameter though. Any idea what this should be? – kentoh Oct 10 '12 at 0:57

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.