5

I have the user select a coordinate system with the Spatial Reference Dialog.

Is there a simple way to determine if the resulting spatial reference is a Projected or Geographic CS?

I would have thought that this would be an attribute of the spatialReference, but it does not seem to be.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Sep 1, 2011 at 15:07

1 Answer 1

14

You can check the object type like so:

ISpatialReference ref = ...; // This is your spatial reference
if (ref is IGeographicCoordinateSystem) {
 //Geographic
} else if (ref is IProjectedCoordinateSystem) {
 // Projected
} else {
 // Unknown coordinate system
}
answered Sep 1, 2011 at 15:16
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.