COMException: The geometry is not M-aware for using SDE Oracle

472
1
Jump to solution
09-30-2013 09:03 AM
ShaningYu
Frequent Contributor
In one of my projects, I created a function to break a curve (or line segment) into multiple points.  When I run this piece of code:
        private List<IPoint> GetPoints(ICurve curve, double mspacing) {
            var outList = new List<IPoint>();
            var mseg = curve as IMSegmentation3;
            if (mseg.MMonotonic == esriMMonotonicEnum.esriMNotMonotonic)
                throw new Exception("polyline not monotonic");
            for (double m = mseg.MMin; m <= mseg.MMax; m += mspacing)  {
                var geomcoll = mseg.GetPointsAtM(m, 0.0);
                if (geomcoll != null && geomcoll.GeometryCount > 0)      {
                    var pnt = geomcoll.get_Geometry(0) as IPoint;
                    outList.Add(pnt);
                }
            }
            return outList;
        }
I got the COMException error: The geometry is not M-aware.  What is about it?  Thanks.
0 Kudos
1 Solution

Accepted Solutions
ShaningYu
Frequent Contributor
I checked the source file in SDE Oracle, and observed that there is no M-tolerance from the FC property.  I re-loaded the feature class from a File GDB, in which the FC does have the M-tolerance property.  Then, the error was gone.  Thanks.

View solution in original post

0 Kudos
1 Reply
ShaningYu
Frequent Contributor
I checked the source file in SDE Oracle, and observed that there is no M-tolerance from the FC property.  I re-loaded the feature class from a File GDB, in which the FC does have the M-tolerance property.  Then, the error was gone.  Thanks.
0 Kudos