internal GeometryPointImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, double x, double y, double? z, double? m)
            : base(coordinateSystem, creator)
        {
            if (double.IsNaN(x) || double.IsInfinity(x))
            {
                throw new ArgumentException(Strings.InvalidPointCoordinate(x, "x"));
            }

            if (double.IsNaN(y) || double.IsInfinity(y))
            {
                throw new ArgumentException(Strings.InvalidPointCoordinate(y, "y"));
            }

            this.x = x;
            this.y = y;
            this.z = z;
            this.m = m;
        }
        internal GeographyPointImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, double latitude, double longitude, double? zvalue, double? mvalue)
            : base(coordinateSystem, creator)
        {
            if (double.IsNaN(latitude) || double.IsInfinity(latitude))
            {
                throw new ArgumentException(Strings.InvalidPointCoordinate(latitude, "latitude"));
            }

            if (double.IsNaN(longitude) || double.IsInfinity(longitude))
            {
                throw new ArgumentException(Strings.InvalidPointCoordinate(longitude, "longitude"));
            }

            this.latitude = latitude;
            this.longitude = longitude;
            this.z = zvalue;
            this.m = mvalue;
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="coordinateSystem">The CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="lineStrings">Line Strings</param>
 internal GeographyMultiLineStringImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, params GeographyLineString[] lineStrings)
     : base(coordinateSystem, creator)
 {
     this.lineStrings = lineStrings ?? new GeographyLineString[0];
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WellKnownTextSqlFormatterImplementation"/> class.
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 internal WellKnownTextSqlFormatterImplementation(SpatialImplementation creator) : base(creator)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="geometry">Collection of Geometry instances</param>
 internal GeometryCollectionImplementation(SpatialImplementation creator, params Geometry[] geometry)
     : this(CoordinateSystem.DefaultGeometry, creator, geometry)
 {
 }
Ejemplo n.º 6
0
 /// <summary>Initializes a new instance of the <see cref="T:Microsoft.Spatial.GeometryPolygon" /> class.</summary>
 /// <param name="coordinateSystem">The CoordinateSystem.</param>
 /// <param name="creator">The implementation that created this instance.</param>
 protected GeometryPolygon(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
 }
 /// <summary>
 /// Create a empty point
 /// </summary>
 /// <param name="coordinateSystem">CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 internal GeographyPointImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
     this.latitude = double.NaN;
     this.longitude = double.NaN;
 }
Ejemplo n.º 8
0
 /// <summary>Initializes a new instance of the <see cref="T:Microsoft.Spatial.GeographyLineString" /> class.</summary>
 /// <param name="coordinateSystem">The coordinate system of this instance.</param>
 /// <param name="creator">The implementation that created this instance.</param>
 protected GeographyLineString(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="points">Points</param>
 internal GeometryMultiPointImplementation(SpatialImplementation creator, params GeometryPoint[] points)
     : this(CoordinateSystem.DefaultGeometry, creator, points)
 {
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="coordinateSystem">CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="points">The point list</param>
 internal GeometryLineStringImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, params GeometryPoint[] points)
     : base(coordinateSystem, creator)
 {
     this.points = points ?? new GeometryPoint[0];
 }
Ejemplo n.º 11
0
 /// <summary>Initializes a new instance of the <see cref="T:Microsoft.Spatial.GmlFormatter" /> class.</summary>
 /// <param name="creator">The implementation that created this instance.</param>
 protected GmlFormatter(SpatialImplementation creator) : base(creator)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="coordinateSystem">CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="points">The point list</param>
 internal GeographyLineStringImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, params GeographyPoint[] points)
     : base(coordinateSystem, creator)
 {
     this.points = points ?? new GeographyPoint[0];
 }
 /// <summary>
 /// Empty Point constructor
 /// </summary>
 /// <param name="coordinateSystem">CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 internal GeometryPointImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
     this.x = double.NaN;
     this.y = double.NaN;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="coordinateSystem">The CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="points">Points</param>
 internal GeographyMultiPointImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, params GeographyPoint[] points)
     : base(coordinateSystem, creator)
 {
     this.points = points ?? new GeographyPoint[0];
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="coordinateSystem">The CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="polygons">Polygons</param>
 internal GeographyMultiPolygonImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, params GeographyPolygon[] polygons)
     : base(coordinateSystem, creator)
 {
     this.polygons = polygons;
 }
Ejemplo n.º 16
0
 public void TestInitialize()
 {
     this.creator = new DataServicesSpatialImplementation();
     this.builder = new GeometryBuilderImplementation(this.creator);
     this.builder.SetCoordinateSystem(CoordinateSystem.DefaultGeometry);
     this.constructedInstances = new List<Geometry>();
     this.builder.ProduceGeometry += this.constructedInstances.Add;
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="points">The point list</param>
 internal GeometryLineStringImplementation(SpatialImplementation creator, params GeometryPoint[] points)
     : this(CoordinateSystem.DefaultGeometry, creator, points)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="coordinateSystem">The CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 internal GeographyFullGlobeImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="coordinateSystem">The CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="polygons">Polygons</param>
 internal GeographyMultiPolygonImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, params GeographyPolygon[] polygons)
     : base(coordinateSystem, creator)
 {
     this.polygons = polygons;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="polygons">Polygons</param>
 internal GeographyMultiPolygonImplementation(SpatialImplementation creator, params GeographyPolygon[] polygons)
     : this(CoordinateSystem.DefaultGeography, creator, polygons)
 {
 }
Ejemplo n.º 21
0
 /// <summary>Initializes a new instance of the <see cref="T:Microsoft.Spatial.GeographyMultiPoint" /> class.</summary>
 /// <param name="coordinateSystem">The coordinate system of this instance.</param>
 /// <param name="creator">The implementation that created this instance.</param>
 protected GeographyMultiPoint(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GmlFormatterImplementation"/> class.
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 internal GmlFormatterImplementation(SpatialImplementation creator)
     : base(creator)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="coordinateSystem">The CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="geography">Collection of geography instances</param>
 internal GeographyCollectionImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, params Geography[] geography)
     : base(coordinateSystem, creator)
 {
     this.geographyArray = geography ?? new Geography[0];
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="coordinateSystem">The CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="geometry">Collection of Geometry instances</param>
 internal GeometryCollectionImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, params Geometry[] geometry)
     : base(coordinateSystem, creator)
 {
     this.geometryArray = geometry ?? new Geometry[0];
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="geography">Collection of geography instances</param>
 internal GeographyCollectionImplementation(SpatialImplementation creator, params Geography[] geography)
     : this(CoordinateSystem.DefaultGeography, creator, geography)
 {
 }
Ejemplo n.º 26
0
 /// <summary>Initializes a new instance of the <see cref="T:Microsoft.Spatial.GeographyMultiPolygon" /> class.</summary>
 /// <param name="coordinateSystem">The coordinate system of this instance.</param>
 /// <param name="creator">The implementation that created this instance.</param>
 protected GeographyMultiPolygon(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
 }
 /// <summary>
 /// Create a empty point
 /// </summary>
 /// <param name="coordinateSystem">CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 internal GeographyPointImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
     this.latitude  = double.NaN;
     this.longitude = double.NaN;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WellKnownTextSqlFormatterImplementation"/> class.
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="allowOnlyTwoDimensions">restricts the reader to allow only two dimensions.</param>
 internal WellKnownTextSqlFormatterImplementation(SpatialImplementation creator, bool allowOnlyTwoDimensions) : base(creator)
 {
     this.allowOnlyTwoDimensions = allowOnlyTwoDimensions;
 }
Ejemplo n.º 29
0
 /// <summary>Initializes a new instance of the <see cref="T:Microsoft.Spatial.GeometryPolygon" /> class.</summary>
 /// <param name="coordinateSystem">The CoordinateSystem.</param>
 /// <param name="creator">The implementation that created this instance.</param>
 protected GeometryPolygon(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="lineStrings">Line Strings</param>
 internal GeographyMultiLineStringImplementation(SpatialImplementation creator, params GeographyLineString[] lineStrings)
     : this(CoordinateSystem.DefaultGeography, creator, lineStrings)
 {
 }
Ejemplo n.º 31
0
 /// <summary>Initializes a new instance of the <see cref="T:Microsoft.Spatial.GeometryMultiPoint" /> class.</summary>
 /// <param name="coordinateSystem">The coordinate system of this instance.</param>
 /// <param name="creator">The implementation that created this instance.</param>
 protected GeometryMultiPoint(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="polygons">Polygons</param>
 internal GeographyMultiPolygonImplementation(SpatialImplementation creator, params GeographyPolygon[] polygons)
     : this(CoordinateSystem.DefaultGeography, creator, polygons)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="coordinateSystem">The CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="rings">The rings of this polygon</param>
 internal GeometryPolygonImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, params GeometryLineString[] rings)
     : base(coordinateSystem, creator)
 {
     this.rings = rings ?? new GeometryLineString[0];
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="coordinateSystem">The CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="points">Points</param>
 internal GeometryMultiPointImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator, params GeometryPoint[] points)
     : base(coordinateSystem, creator)
 {
     this.points = points ?? new GeometryPoint[0];
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 /// <param name="rings">The rings of this polygon</param>
 internal GeometryPolygonImplementation(SpatialImplementation creator, params GeometryLineString[] rings)
     : this(CoordinateSystem.DefaultGeometry, creator, rings)
 {
 }
Ejemplo n.º 36
0
 /// <summary>Initializes a new instance of the <see cref="T:Microsoft.Spatial.GeographyMultiLineString" /> class.</summary>
 /// <param name="coordinateSystem">The coordinate system of this instance.</param>
 /// <param name="creator">The implementation that created this instance.</param>
 protected GeographyMultiLineString(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
 }
Ejemplo n.º 37
0
 /// <summary>Initializes a new instance of the <see cref="T:Microsoft.Spatial.GeometryLineString" /> class.</summary>
 /// <param name="coordinateSystem">The coordinate system of this instance.</param>
 /// <param name="creator">The implementation that created this instance.</param>
 protected GeometryLineString(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="creator">The implementation that created this instance.</param>
 internal GeographyFullGlobeImplementation(SpatialImplementation creator)
     : this(CoordinateSystem.DefaultGeography, creator)
 {
 }
 /// <summary>
 /// Empty Point constructor
 /// </summary>
 /// <param name="coordinateSystem">CoordinateSystem</param>
 /// <param name="creator">The implementation that created this instance.</param>
 internal GeometryPointImplementation(CoordinateSystem coordinateSystem, SpatialImplementation creator)
     : base(coordinateSystem, creator)
 {
     this.x = double.NaN;
     this.y = double.NaN;
 }