/** * * @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)); }
/* * (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); }
/** * * @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); }