Esempio n. 1
0
 /// <summary>
 /// Constructs a GeometryFactory that generates Geometries having the given
 /// PrecisionModel, spatial-reference ID, and CoordinateSequence implementation.
 /// </summary>
 /// <param name="precisionModel"></param>
 /// <param name="srid"></param>
 /// <param name="coordinateSequenceFactory"></param>
 public GeometryFactory(PrecisionModel precisionModel, int srid,
                        ICoordinateSequenceFactory coordinateSequenceFactory)
 {
     _precisionModel = precisionModel;
     _coordinateSequenceFactory = coordinateSequenceFactory;
     _srid = srid;
 }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public override bool Equals(object other)
        {
            if (other == null)
            {
                return(false);
            }
            if (!(other is PrecisionModel))
            {
                return(false);
            }
            PrecisionModel otherPrecisionModel = (PrecisionModel)other;

            return(_modelType == otherPrecisionModel._modelType && _scale == otherPrecisionModel._scale);
        }
Esempio n. 3
0
 /// <summary>
 /// Copy constructor to create a new <c>PrecisionModel</c>
 /// from an existing one.
 /// </summary>
 /// <param name="pm"></param>
 public PrecisionModel(PrecisionModel pm)
 {
     _modelType = pm._modelType;
     _scale = pm._scale;
 }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="coord"></param>
        /// <param name="exemplar"></param>
        /// <returns></returns>
        private static IPoint CreatePointFromInternalCoord(Coordinate coord, IGeometry exemplar)
        {
            Coordinate c = new Coordinate(coord);
            PrecisionModel prc = new PrecisionModel(exemplar.PrecisionModel);
            prc.MakePrecise(c);

            return exemplar.Factory.CreatePoint(c);
        }
Esempio n. 5
0
 /// <summary>
 /// Constructs a GeometryFactory pertaining to a specific _coordinateSequenceFactory
 /// using any valid IGeometryFactory and ICoordinateSequenceFactory interface
 /// </summary>
 /// <param name="gf">An IGeometryFactory Interface</param>
 /// <param name="coordinateSequenceFactory">An ICoordianteSequenceFactory interface</param>
 public GeometryFactory(IGeometryFactory gf, ICoordinateSequenceFactory coordinateSequenceFactory)
 {
     _precisionModel = new PrecisionModel(gf.PrecisionModel);
     _coordinateSequenceFactory = coordinateSequenceFactory;
     _srid = gf.Srid;
 }
Esempio n. 6
0
 /// <summary>
 /// Constructs a GeometryFactory object from any valid IGeometryFactory interface
 /// </summary>
 /// <param name="gf"></param>
 public GeometryFactory(IGeometryFactory gf)
 {
     _precisionModel = new PrecisionModel(gf.PrecisionModel);
     _coordinateSequenceFactory = GetDefaultCoordinateSequenceFactory();
     _srid = gf.Srid;
 }
Esempio n. 7
0
 /// <summary>
 /// Constructs a GeometryFactory that generates Geometries having the given
 /// <c>PrecisionModel</c> and spatial-reference ID, and the default CoordinateSequence
 /// implementation.
 /// </summary>
 /// <param name="precisionModel">The PrecisionModel to use.</param>
 /// <param name="srid">The SRID to use.</param>
 public GeometryFactory(PrecisionModel precisionModel, int srid)
     : this(precisionModel, srid, GetDefaultCoordinateSequenceFactory()) { }
Esempio n. 8
0
 /// <summary>
 /// Copy constructor to create a new <c>PrecisionModel</c>
 /// from an existing one.
 /// </summary>
 /// <param name="pm"></param>
 public PrecisionModel(PrecisionModel pm)
 {
     _modelType = pm._modelType;
     _scale     = pm._scale;
 }
Esempio n. 9
0
 /// <summary>
 /// Constructs a GeometryFactory pertaining to a specific _coordinateSequenceFactory
 /// using any valid IGeometryFactory and ICoordinateSequenceFactory interface
 /// </summary>
 /// <param name="gf">An IGeometryFactory Interface</param>
 /// <param name="coordinateSequenceFactory">An ICoordianteSequenceFactory interface</param>
 public GeometryFactory(IGeometryFactory gf, ICoordinateSequenceFactory coordinateSequenceFactory)
 {
     _precisionModel            = new PrecisionModel(gf.PrecisionModel);
     _coordinateSequenceFactory = coordinateSequenceFactory;
     _srid = gf.Srid;
 }
Esempio n. 10
0
 /// <summary>
 /// Constructs a GeometryFactory object from any valid IGeometryFactory interface
 /// </summary>
 /// <param name="gf"></param>
 public GeometryFactory(IGeometryFactory gf)
 {
     _precisionModel            = new PrecisionModel(gf.PrecisionModel);
     _coordinateSequenceFactory = GetDefaultCoordinateSequenceFactory();
     _srid = gf.Srid;
 }
Esempio n. 11
0
 /// <summary>
 /// Constructs a GeometryFactory that generates Geometries having the given
 /// <c>PrecisionModel</c> and spatial-reference ID, and the default CoordinateSequence
 /// implementation.
 /// </summary>
 /// <param name="precisionModel">The PrecisionModel to use.</param>
 /// <param name="srid">The SRID to use.</param>
 public GeometryFactory(PrecisionModel precisionModel, int srid)
     : this(precisionModel, srid, GetDefaultCoordinateSequenceFactory())
 {
 }