コード例 #1
0
ファイル: EventLocator.cs プロジェクト: nemesv/ASTRA.EMSG
        /**
         *
         * @return a Point Geometry as a point geometry
         * @throws MGeometryException
         */
        public static Point GetPointGeometry(IMGeometry lrs, double position)
        {
            Coordinate          c  = lrs.GetCoordinateAtM(position);
            ICoordinateSequence cs = lrs.Factory.CoordinateSequenceFactory.Create(new Coordinate[] { c });

            return(new Point(cs, lrs.Factory));
        }
コード例 #2
0
        /*
         * (non-Javadoc)
         *
         * @see org.hibernatespatial.mgeom.IMGeometry#GetCoordinateAtM(double)
         */
        public ICoordinate GetCoordinateAtM(double m)
        {
            if (!this.IsMonotone(false))
            {
                throw new ApplicationException("MGeometryException.OPERATION_REQUIRES_MONOTONE");
            }

            ICoordinate c;

            for (int i = 0; i < this.NumGeometries; i++)
            {
                IMGeometry mg = (IMGeometry)this.GetGeometryN(i);
                c = mg.GetCoordinateAtM(m);
                if (c != null)
                {
                    return(c);
                }
            }
            return(null);
        }
コード例 #3
0
 /**
  *
  * @return a Point Geometry as a point geometry
  * @throws MGeometryException
  */
 public static Point GetPointGeometry(IMGeometry lrs, double position)
 {
     ICoordinate c = lrs.GetCoordinateAtM(position);
     ICoordinateSequence cs = lrs.Factory.CoordinateSequenceFactory.Create(new ICoordinate[] { c });
     return new Point(cs, lrs.Factory);
 }