Hello,
I would like to determine if a geometry is within the boundaries of the spatial reference. In my particular case, all of our layers use the same spatial reference. The geometry can be a point, polyline or polygon and is already in US Survey Feet (the same as the spatial reference).
Right now I am getting the Domain property of the SpatialReference and checking to see if the point is within it's XMin/XMax and Ymin/YMax values. I have both a standard if block as well as using GeometryEngine.Contains. In 99.44% of cases they seem to always return true. In some rare instances, they return false.
The IntelliSense for the property seems to indicate that a MapPointa may not be valid even if it falls within this range.
I'd like to determine this before attempting to create the feature.
Is this the right approach or is there an alternative I should be using?
TIA.
Kris
Hi Kris,
The domain extent is different than the valid area of a coordinate system. The domain extent is an arbitrary square used to delimit valid coordinates for a spatial reference system and determine their resolution. It is possible that the domain extent is larger than the usable area of a coordinate system (a UTM zone, for example).
I suspect that what you are looking for is the horizon. We plan to add a method to get the horizon in a near-term release. In the meantime, you can take a look at https://community.esri.com/message/935357-re-how-to-get-the-spatialreference-horizon-polygon for a possible workaround.
I hope that helps.
Thanks,
Annette