Exemple #1
0
		public void MultiPoint_WKT_reader_should_skip_extra_parenthesis_around_coordinates()
		{
			WKTReader reader = new WKTReader();
			IGeometry mp1 = reader.Read("MULTIPOINT (10 10, 20 20)");
			IGeometry mp2 = reader.Read("MULTIPOINT ((10 10), (20 20))");
			Assert.AreEqual(mp1, mp2);
		}
 public void BasicBuffer()
 {
     ILineString ls = new WKTReader().Read("LINESTRING(0 0, 100 100)") as ILineString;
     Assert.IsNotNull(ls);
     BufferBuilder bb = new BufferBuilder();
     IGeometry res = bb.Buffer(ls, 10);
     Assert.IsNotNull(res);
 }
		public static void main(string[] args)
		{
			WKTReader rdr = new WKTReader();
			
			ILineString line1 = (ILineString) rdr.Read("LINESTRING (0 0, 10 10, 20 20)");
			ShowSelfIntersections(line1);			
            ILineString line2 = (ILineString) rdr.Read("LINESTRING (0 40, 60 40, 60 0, 20 0, 20 60)");
			ShowSelfIntersections(line2);
		}
Exemple #4
0
 public void DifferenceProblemForOtherPolygons()
 {
     
     var wktReader = new WKTReader(new GeometryFactory(new PrecisionModel(1000)));
     var g1 = wktReader.Read("POLYGON((0.0000001 -3,5 -3,5 -7,0.000001 -7,0.0000001 -3))");
     var g2 = wktReader.Read("POLYGON((5 -10,2 -10,0.000001 0,0.000001 1,5 1,5 -10))");
     
     var diff  = g1.Difference(g2);
 }
		public static void main(string[] args)
		{
			WKTReader rdr = new WKTReader();			
			IGeometry[] geom = new IGeometry[3];
			geom[0] = rdr.Read("POLYGON (( 100 180, 100 260, 180 260, 180 180, 100 180 ))");
			geom[1] = rdr.Read("POLYGON (( 80 140, 80 200, 200 200, 200 140, 80 140 ))");
			geom[2] = rdr.Read("POLYGON (( 160 160, 160 240, 240 240, 240 160, 160 160 ))");
            UnionUsingBufferOp(geom);
		}
Exemple #6
0
        public void DifferenceDoesNotCrashForCertainPolygons()
        {
            //TEST demonstrates problem in NTS 1.7.1 was the reason for upgrade to 1.7.3
            var g1 = new WKTReader().Read("POLYGON ((5 -10, 2 -10, 0 0, 0 1, 5 1, 5 -10))");
            var g2 = new WKTReader().Read("POLYGON ((0.6 -3, 2.6 -3, 3.4 -7, 1.4 -7, 0.6 -3))");

            //this used to crash..
            g1.Difference(g2);
        }
Exemple #7
0
        public void IntersectTwoLines()
        {
            var wktReader = new WKTReader(new GeometryFactory(new PrecisionModel(PrecisionModel.MaximumPreciseValue)));
            var g1 = wktReader.Read("LINESTRING(280 0.01, 285 -0.07)");
            var g2 = wktReader.Read("LINESTRING(-900.0 0, 1520.0 0)");
            
            var intersection = g1.Intersection(g2);

             Assert.AreEqual(1, intersection.Coordinates.Count());
        }
 public void BasicBufferPoint()
 {
     IPoint ls = new WKTReader().Read("POINT(0 0)") as IPoint;
     Assert.IsNotNull(ls);
     BufferBuilder bb = new BufferBuilder();
     bb.EndCapStyle = BufferStyle.CapSquare;
     bb.QuadrantSegments = 2;
     IGeometry actual = bb.Buffer(ls, 10);
     IGeometry expected = new WKTReader().Read("POLYGON((10 10, -10 10, -10 -10, 10 -10, 10 10))");
     Assert.AreEqual(actual, expected);
 }
 public void MyClassInitialize()
 {
     WKTReader reader = new WKTReader();
     geom1 = reader.Read("POLYGON ((341789.494471447 4657916.08580466, 341789.494471447 4659272.20917602, 343145.617842805 4659272.20917602, 343145.617842805 4657916.08580466, 341789.494471447 4657916.08580466))");
     geom2 = reader.Read("MULTIPOLYGON (((393822.68 4639241.67, 394318 4638929, 393751.1 4637700.09, 393481.19 4638197.29, 392802.12 4638566.07, 393211.45 4638499.55, 392909.35 4639191.17, 393260.08 4639255.05, 393586.75 4638744.94, 393822.68 4639241.67)), ((358734.44 4642618.57, 359891.83 4644189.05, 360301.41 4645435.23, 359947.84 4646028.19, 358634.94 4646371.61, 358531.69 4646692.64, 358335.16 4647250.54, 358638.29 4647625.31, 358797.09656183 4647772.32853894, 358898.659063356 4648319.20354715, 358812.721562065 4648491.07854974, 359043.03 4648526.46, 359398.61 4649425.97, 360059.69 4650085.9, 359727.08 4650528.59, 359836.159077436 4650709.82858306, 360120.97 4650739.3, 361039.284095505 4650530.14108036, 361437.721601489 4650319.20357719, 362258.034113808 4650366.07857789, 363142.1 4650655.48, 363474.5 4650638.7, 364656 4651615, 364334 4652594.7, 364069 4653651, 364250.02 4654650.14, 364422.65 4654652.47, 364169.73 4655677.28, 364645.1 4656179.46, 364271.21 4656323.7, 364441.31 4657134.86, 364329.34 4659257.96, 364362 4659640, 364144 4659755, 363767.45 4659440.03, 363388.54 4659506.75, 362225.8 4659960.22, 361469.33 4661821.26, 361713 4663904, 362393.36 4664518.67, 362909.37 4664675.53, 363030.16 4664940.51, 363587.34 4665037.93, 363793.84 4665532.82, 364226.34 4665509.44, 364495.19 4665645.82, 365091.33 4666715.48, 364604.28 4667027.22, 364491.29 4667572.77, 363536.68 4668102.73, 363755.69 4668386.74, 364623.9 4667980.53, 365165.57 4667935.38, 366295.55 4668308.83, 366890.25 4667990.11, 367669.02 4667961.78, 369293.59 4668893.59, 370452 4668830, 370706.24 4668273.42, 371916.88 4667338.49, 374217.81 4668755.05, 376216.31 4670162.31, 377861.5 4671489.09, 378033.42 4672034.69, 378439.2 4672295.89, 378512.41 4673686.97, 380007.5 4674173.47, 381707.41 4674030.94, 382818.36 4673583.84, 384334.29 4673162.1, 385627.39 4673231.04, 385837.97 4673409.4, 386557.67 4672828.66, 386975.33 4672890.85, 388006.92 4672635.26, 387960.75 4672193.25, 388672.73 4670577.57, 389054.95 4669797.49, 388755.7 4669668.12, 389356.24 4669197.71, 389682.7 4669186.36, 389905.78 4668960.53, 390205.93 4669057.63, 390217.95 4669851.5, 390557.86 4670035.27, 390846.35 4669591.96, 391180.23 4670170.79, 391340.6 4669427.94, 391468.973970144 4669631.70468354, 391398.78 4670176.34, 391784.09 4670188.43, 392524.53 4669626.01, 392986.83 4669315.08, 393365.93 4668654.55, 394001.59 4669126.82, 394994.89 4669484.83, 394850.31 4670125.88, 395301.8 4671178.18, 395599.22 4671088.99, 395852.5 4670503.53, 395698.7 4669903.58, 395901.29 4668959.03, 395576.1 4668454.19, 394444.42 4667573.85, 393819.37 4667925.57, 392550.02 4665622.76, 392601.25 4665051.76, 393337.55 4664451.22, 393642.01 4664039.69, 393600.3 4663700.32, 393422.43 4662918.5, 393042.47 4662576.08, 393531.86 4662037.54, 394528.18 4661906.8, 394442.9 4660932.07, 394036.42 4660361.88, 393431.06 4660037.51, 391907.44 4660540.09, 391664.86 4659910.9, 391703.95 4659399.25, 391765.6 4659056.98, 390524.73 4657468.38, 390354.89 4656626.65, 390143.44 4655952.88, 390235 4655437.81, 390765.24 4655073.07, 390904.53 4655617.97, 391190.65 4656254.42, 391703.49 4655884.6, 391990.72 4655549.3, 392286.54 4654889.8, 392025.67 4654644.71, 392421.8 4654072.09, 392272.23 4653743.78, 391578.1 4653877.91, 391623.25 4653749.35, 390959.9 4653354.98, 390465.11 4652910.84, 389815.09 4652247.05, 389978.44 4651610.59, 389618.97 4651177.63, 389255.26 4651538.25, 389599.72 4651956.87, 389315.28 4652354.86, 389583.24 4653317.84, 389128.23 4653292.58, 388746.64 4652892.37, 388413.8 4652215.69, 388456.25 4651397.45, 388107.32 4650774.51, 388321.9 4650527.07, 388421.33 4649956.07, 388824.66 4650664.54, 388650.53 4650873.79, 388915.49 4651201.61, 389314.04 4650863.28, 389410.63 4649840.78, 389962.81 4649913.71, 390644 4650126, 391440.37 4649941.35, 391788.64 4649733.21, 391862.54 4649220.19, 392096.93 4649066.06, 392153 4649807, 392457 4650006.2, 391694.03 4651346.65, 391992.42 4652290.71, 392414.286484697 4652350.45442867, 393041.17 4651429.06, 392963.71 4651076.7, 393861.18 4650791.26, 393720.75 4650347.48, 393712.87 4649879.21, 394006.66 4649152.61, 392844.53 4648389.46, 391873.27 4647876.63, 391843.52 4647683.09, 390917.63 4647239.32, 390123.49 4647375.73, 389798.32 4647721.03, 390332.82 4648915.31, 389578.26 4649160.16, 389078.93 4648817.29, 388909.57 4648467.02, 388558.02 4648654.86, 388326.03 4648489.91, 387885 4647041, 388004.53 4646214.29, 388072.02 4646038.93, 387804.68 4645580.91, 388006.1 4645270.91, 388118 4644721, 387541.05 4644303.17, 388362.07 4642940.91, 388124.02 4642685.71, 387539.284494553 4642881.70371236, 387279.96 4642811.02, 386602.15 4642021.84, 385797 4641304, 385210.71 4640471.5, 384217.22 4640098.82, 383964.65 4640274.72, 382773 4638539, 382550.42 4638535.01, 382542.74 4639067.57, 381940.02 4638769.93, 381316.21 4637673.03, 382488.52 4636906.64, 383000.78 4637327.53, 383945 4638030, 384502.79 4637956.32, 385448.8 4637544.49, 386000.1 4636283.58, 386062 4636036, 386421.84 4635181.26, 386103.28 4634067.47, 386384.19 4633695.69, 385893.64 4633187.75, 384826.37 4632859.66, 385120.95 4632064.69, 384810.13 4630721.34, 383194.48 4629981.33, 382934.14 4629064.86, 383283.71 4628662.1, 383337.31 4628307.7, 383551.71 4628328.69, 383503.49 4628074.41, 383787.09 4627485.28, 383141.55 4626574.23, 383272.05 4626217.51, 382237.21 4625991.81, 381630.49 4626737.83, 381383.02 4626469.21, 380800.14 4626215.67, 380484.55 4626275.19, 380519.27 4625598.66, 379569.5 4625504.08, 379105.05 4624034.79, 378183.86 4624017.19, 378304.910307572 4623592.64066448, 377976.21 4623576.2, 377806.4 4624091.78, 378106.54 4624739.11, 377686.34 4624821.33, 377236.99 4625092.18, 377030.64 4625600.25, 376289.41 4625616.05, 376276.14 4625921.16, 375851.59 4627520.34, 374091.83 4627872.76, 374253.51 4627623.94, 374116.82 4627331.58, 374255.33 4626296.73, 373945.64 4625931.12, 373947.31 4625730.52, 373586.160236704 4625952.01569991, 373229.32 4625896.1, 373031.472728373 4625741.07819675, 372644.84 4625739.29, 372178.28 4626230.96, 372891.23 4626571.89, 373048.92 4626990.94, 372950.49 4627734.44, 373100.81 4628978.93, 373538.9 4629278.9, 374850.7 4630226.14, 376515.847781038 4631323.10953352, 376462.52 4631475.19, 375100.58 4630977.99, 374812.49 4631555.03, 373582.35 4632656.01, 374665.1 4633317.74, 375250.15 4634046.57, 375942.27 4635218.72, 375574.01 4636626.78, 375820.93 4636949.7, 375773.88 4638214.02, 375847.41 4639077.27, 375713.07 4640292, 374414 4640679, 373688.65 4640000, 372622.73 4638403.93, 371126.28 4638885.35, 370624.33 4639972.03, 369576.08 4639559.94, 369818.05 4640594.16, 368120.46 4641920.77, 367529.01 4641674.25, 367344.9 4641754.16, 366104.87 4643158.25, 365634.1 4643076.98, 365195.88 4642890.43, 364765.49 4642804.06, 363791.54 4642361.28, 363227.09 4640683.54, 362517.72 4641055.75, 362043.08 4640486.06, 362032.05 4640264.99, 361814.78 4639788.87, 361118.22 4639217.61, 360986.26 4639061.47, 360609.67 4639541.94, 360582.38 4639648.82, 360635.75 4640326.68, 360523.69 4641330.02, 360167.2 4642202.38, 359850.74 4642863.39, 358734.44 4642618.57), (360396.2 4649774.37, 360739.69 4649340.32, 360871.65 4649403.78, 361086.159096209 4649530.14106534, 361077.26 4649909.32, 361017.93 4650287.97, 360835.85 4650357.56, 360398.03 4650179.49, 360396.2 4649774.37), (388060.12 4663379.42, 388310.87 4663188.42, 389424.65 4662512.25, 391812.11 4662345.42, 391698.33 4662577.05, 392055.52 4663191.31, 390765.62 4663485.81, 388060.12 4663379.42), (360396.2 4649774.37, 360739.69 4649340.32, 360871.65 4649403.78, 361086.159096209 4649530.14106534, 361077.26 4649909.32, 361017.93 4650287.97, 360835.85 4650357.56, 360398.03 4650179.49, 360396.2 4649774.37), (388060.12 4663379.42, 388310.87 4663188.42, 389424.65 4662512.25, 391812.11 4662345.42, 391698.33 4662577.05, 392055.52 4663191.31, 390765.62 4663485.81, 388060.12 4663379.42)), ((393822.68 4639241.67, 394318 4638929, 393751.1 4637700.09, 393481.19 4638197.29, 392802.12 4638566.07, 393211.45 4638499.55, 392909.35 4639191.17, 393260.08 4639255.05, 393586.75 4638744.94, 393822.68 4639241.67)), ((358734.44 4642618.57, 359891.83 4644189.05, 360301.41 4645435.23, 359947.84 4646028.19, 358634.94 4646371.61, 358531.69 4646692.64, 358335.16 4647250.54, 358638.29 4647625.31, 358797.09656183 4647772.32853894, 358898.659063356 4648319.20354715, 358812.721562065 4648491.07854974, 359043.03 4648526.46, 359398.61 4649425.97, 360059.69 4650085.9, 359727.08 4650528.59, 359836.159077436 4650709.82858306, 360120.97 4650739.3, 361039.284095505 4650530.14108036, 361437.721601489 4650319.20357719, 362258.034113808 4650366.07857789, 363142.1 4650655.48, 363474.5 4650638.7, 364656 4651615, 364334 4652594.7, 364069 4653651, 364250.02 4654650.14, 364422.65 4654652.47, 364169.73 4655677.28, 364645.1 4656179.46, 364271.21 4656323.7, 364441.31 4657134.86, 364329.34 4659257.96, 364362 4659640, 364144 4659755, 363767.45 4659440.03, 363388.54 4659506.75, 362225.8 4659960.22, 361469.33 4661821.26, 361713 4663904, 362393.36 4664518.67, 362909.37 4664675.53, 363030.16 4664940.51, 363587.34 4665037.93, 363793.84 4665532.82, 364226.34 4665509.44, 364495.19 4665645.82, 365091.33 4666715.48, 364604.28 4667027.22, 364491.29 4667572.77, 363536.68 4668102.73, 363755.69 4668386.74, 364623.9 4667980.53, 365165.57 4667935.38, 366295.55 4668308.83, 366890.25 4667990.11, 367669.02 4667961.78, 369293.59 4668893.59, 370452 4668830, 370706.24 4668273.42, 371916.88 4667338.49, 374217.81 4668755.05, 376216.31 4670162.31, 377861.5 4671489.09, 378033.42 4672034.69, 378439.2 4672295.89, 378512.41 4673686.97, 380007.5 4674173.47, 381707.41 4674030.94, 382818.36 4673583.84, 384334.29 4673162.1, 385627.39 4673231.04, 385837.97 4673409.4, 386557.67 4672828.66, 386975.33 4672890.85, 388006.92 4672635.26, 387960.75 4672193.25, 388672.73 4670577.57, 389054.95 4669797.49, 388755.7 4669668.12, 389356.24 4669197.71, 389682.7 4669186.36, 389905.78 4668960.53, 390205.93 4669057.63, 390217.95 4669851.5, 390557.86 4670035.27, 390846.35 4669591.96, 391180.23 4670170.79, 391340.6 4669427.94, 391468.973970144 4669631.70468354, 391398.78 4670176.34, 391784.09 4670188.43, 392524.53 4669626.01, 392986.83 4669315.08, 393365.93 4668654.55, 394001.59 4669126.82, 394994.89 4669484.83, 394850.31 4670125.88, 395301.8 4671178.18, 395599.22 4671088.99, 395852.5 4670503.53, 395698.7 4669903.58, 395901.29 4668959.03, 395576.1 4668454.19, 394444.42 4667573.85, 393819.37 4667925.57, 392550.02 4665622.76, 392601.25 4665051.76, 393337.55 4664451.22, 393642.01 4664039.69, 393600.3 4663700.32, 393422.43 4662918.5, 393042.47 4662576.08, 393531.86 4662037.54, 394528.18 4661906.8, 394442.9 4660932.07, 394036.42 4660361.88, 393431.06 4660037.51, 391907.44 4660540.09, 391664.86 4659910.9, 391703.95 4659399.25, 391765.6 4659056.98, 390524.73 4657468.38, 390354.89 4656626.65, 390143.44 4655952.88, 390235 4655437.81, 390765.24 4655073.07, 390904.53 4655617.97, 391190.65 4656254.42, 391703.49 4655884.6, 391990.72 4655549.3, 392286.54 4654889.8, 392025.67 4654644.71, 392421.8 4654072.09, 392272.23 4653743.78, 391578.1 4653877.91, 391623.25 4653749.35, 390959.9 4653354.98, 390465.11 4652910.84, 389815.09 4652247.05, 389978.44 4651610.59, 389618.97 4651177.63, 389255.26 4651538.25, 389599.72 4651956.87, 389315.28 4652354.86, 389583.24 4653317.84, 389128.23 4653292.58, 388746.64 4652892.37, 388413.8 4652215.69, 388456.25 4651397.45, 388107.32 4650774.51, 388321.9 4650527.07, 388421.33 4649956.07, 388824.66 4650664.54, 388650.53 4650873.79, 388915.49 4651201.61, 389314.04 4650863.28, 389410.63 4649840.78, 389962.81 4649913.71, 390644 4650126, 391440.37 4649941.35, 391788.64 4649733.21, 391862.54 4649220.19, 392096.93 4649066.06, 392153 4649807, 392457 4650006.2, 391694.03 4651346.65, 391992.42 4652290.71, 392414.286484697 4652350.45442867, 393041.17 4651429.06, 392963.71 4651076.7, 393861.18 4650791.26, 393720.75 4650347.48, 393712.87 4649879.21, 394006.66 4649152.61, 392844.53 4648389.46, 391873.27 4647876.63, 391843.52 4647683.09, 390917.63 4647239.32, 390123.49 4647375.73, 389798.32 4647721.03, 390332.82 4648915.31, 389578.26 4649160.16, 389078.93 4648817.29, 388909.57 4648467.02, 388558.02 4648654.86, 388326.03 4648489.91, 387885 4647041, 388004.53 4646214.29, 388072.02 4646038.93, 387804.68 4645580.91, 388006.1 4645270.91, 388118 4644721, 387541.05 4644303.17, 388362.07 4642940.91, 388124.02 4642685.71, 387539.284494553 4642881.70371236, 387279.96 4642811.02, 386602.15 4642021.84, 385797 4641304, 385210.71 4640471.5, 384217.22 4640098.82, 383964.65 4640274.72, 382773 4638539, 382550.42 4638535.01, 382542.74 4639067.57, 381940.02 4638769.93, 381316.21 4637673.03, 382488.52 4636906.64, 383000.78 4637327.53, 383945 4638030, 384502.79 4637956.32, 385448.8 4637544.49, 386000.1 4636283.58, 386062 4636036, 386421.84 4635181.26, 386103.28 4634067.47, 386384.19 4633695.69, 385893.64 4633187.75, 384826.37 4632859.66, 385120.95 4632064.69, 384810.13 4630721.34, 383194.48 4629981.33, 382934.14 4629064.86, 383283.71 4628662.1, 383337.31 4628307.7, 383551.71 4628328.69, 383503.49 4628074.41, 383787.09 4627485.28, 383141.55 4626574.23, 383272.05 4626217.51, 382237.21 4625991.81, 381630.49 4626737.83, 381383.02 4626469.21, 380800.14 4626215.67, 380484.55 4626275.19, 380519.27 4625598.66, 379569.5 4625504.08, 379105.05 4624034.79, 378183.86 4624017.19, 378304.910307572 4623592.64066448, 377976.21 4623576.2, 377806.4 4624091.78, 378106.54 4624739.11, 377686.34 4624821.33, 377236.99 4625092.18, 377030.64 4625600.25, 376289.41 4625616.05, 376276.14 4625921.16, 375851.59 4627520.34, 374091.83 4627872.76, 374253.51 4627623.94, 374116.82 4627331.58, 374255.33 4626296.73, 373945.64 4625931.12, 373947.31 4625730.52, 373586.160236704 4625952.01569991, 373229.32 4625896.1, 373031.472728373 4625741.07819675, 372644.84 4625739.29, 372178.28 4626230.96, 372891.23 4626571.89, 373048.92 4626990.94, 372950.49 4627734.44, 373100.81 4628978.93, 373538.9 4629278.9, 374850.7 4630226.14, 376515.847781038 4631323.10953352, 376462.52 4631475.19, 375100.58 4630977.99, 374812.49 4631555.03, 373582.35 4632656.01, 374665.1 4633317.74, 375250.15 4634046.57, 375942.27 4635218.72, 375574.01 4636626.78, 375820.93 4636949.7, 375773.88 4638214.02, 375847.41 4639077.27, 375713.07 4640292, 374414 4640679, 373688.65 4640000, 372622.73 4638403.93, 371126.28 4638885.35, 370624.33 4639972.03, 369576.08 4639559.94, 369818.05 4640594.16, 368120.46 4641920.77, 367529.01 4641674.25, 367344.9 4641754.16, 366104.87 4643158.25, 365634.1 4643076.98, 365195.88 4642890.43, 364765.49 4642804.06, 363791.54 4642361.28, 363227.09 4640683.54, 362517.72 4641055.75, 362043.08 4640486.06, 362032.05 4640264.99, 361814.78 4639788.87, 361118.22 4639217.61, 360986.26 4639061.47, 360609.67 4639541.94, 360582.38 4639648.82, 360635.75 4640326.68, 360523.69 4641330.02, 360167.2 4642202.38, 359850.74 4642863.39, 358734.44 4642618.57), (360396.2 4649774.37, 360739.69 4649340.32, 360871.65 4649403.78, 361086.159096209 4649530.14106534, 361077.26 4649909.32, 361017.93 4650287.97, 360835.85 4650357.56, 360398.03 4650179.49, 360396.2 4649774.37), (388060.12 4663379.42, 388310.87 4663188.42, 389424.65 4662512.25, 391812.11 4662345.42, 391698.33 4662577.05, 392055.52 4663191.31, 390765.62 4663485.81, 388060.12 4663379.42), (360396.2 4649774.37, 360739.69 4649340.32, 360871.65 4649403.78, 361086.159096209 4649530.14106534, 361077.26 4649909.32, 361017.93 4650287.97, 360835.85 4650357.56, 360398.03 4650179.49, 360396.2 4649774.37), (388060.12 4663379.42, 388310.87 4663188.42, 389424.65 4662512.25, 391812.11 4662345.42, 391698.33 4662577.05, 392055.52 4663191.31, 390765.62 4663485.81, 388060.12 4663379.42)))");
     geom3 = reader.Read("POLYGON ((334181.3 4626533.25, 333802.61 4626481.77, 332851.85 4626555.73, 332837.99 4626870.47, 331675.575478004 4625017.10334799, 331449.012974601 4624694.44709314, 330300.575457354 4623624.13457707, 329963.34 4623438.15, 330534.02 4622198.85, 331461.18 4622559.66, 331815.99 4622016.46, 332363.67 4622161.85, 332039.82 4619793.32, 331548.21 4619356.5, 331272.11 4619075.88, 330483.58 4619245.55, 329411.26 4618893.99, 328619.74 4618944.72, 327619.86 4619438.68, 326688.91 4620936.39, 326577.53 4622953.68, 324921.22 4622991.88, 324835.36 4623313.11, 323348.71 4623236.68, 322453.43 4623415.99, 321526.83 4621885.82, 322513.7 4621551.96, 321796.7 4620132.45, 320461.29 4619812.96, 320255.43 4620350.01, 319572.87 4620303.13, 317928.9 4620166.3, 317654.64 4619133.62, 317161.4 4619283.23, 316348.1 4619227.49, 314893.3 4618828.46, 314921.8 4617759.96, 313965.48 4617497.69, 313525.07 4618502.05, 312863.3 4619592.91, 311994.17 4620673.82, 311646.12 4620051.21, 310652.99 4619110.01, 309868.14 4619370.41, 309748.57 4619148.83, 309344.12 4618617.63, 308994.57 4619110.83, 308290.42 4618609.47, 307608.36 4620081.67, 306979.94 4620597.13, 306459.64 4621348.79, 305837.1 4622106.1, 305976.64 4622701.34, 304560.82 4624222.35, 303588.37 4625472.67, 302936.71 4626165.17, 302435.72 4626769.89, 302105.2 4627314.96, 301884.67 4627782.92, 301325.84 4629098.08, 300636.13 4629797.85, 299826.53 4631113.5, 299717.36 4631406.8, 298959.32 4633461.34, 299030.82 4635340.12, 299231.61 4636324.43, 299422.29 4637122.92, 299266.6 4637583.39, 299694.24 4637835.81, 300235.59 4637959.75, 301211.84 4638288.82, 301587.95 4639076.98, 300372.6 4640075.77, 301093.11 4642508.82, 300685.17 4643391.09, 300979.56 4643794.25, 301616.09 4643842.48, 299489.82 4644826.56, 299039.67 4645141.95, 298325.57 4645350.64, 297986.62 4645538.92, 298401.6 4646796.17, 299421.04 4648129.44, 300059.47 4648865.43, 300702.38 4649212.22, 301673.03 4648521.82, 302129.92 4649258.91, 302374.88 4650445.5, 302765 4651012.13, 302908.82 4651542.49, 304450.51 4652031.55, 304784.92 4650772.89, 304833.13 4650721.19, 305094.07 4652077.88, 305993.16 4652643.13, 306655 4654036, 306469 4654283, 306133 4654235, 305945 4655059, 305769 4655592, 306378 4657164, 307183 4657587, 307476 4659683, 308131 4660866, 308527.42 4659900.86, 309684 4659013, 311080 4658315, 313386 4658119, 313531 4657632, 314651 4657011, 315630 4656858, 317824.19 4657234.54, 318608.19 4657010.54, 321077.39 4656665.89, 322340.41 4656183.98, 324054 4656262, 325322 4656791, 325389.11 4656723.11, 325282.9 4656653.63, 325437.09 4656246.31, 326006.69 4655920.61, 328016.6 4654527.37, 330347.36 4654638.54, 331164.52 4654361.73, 331874.02 4654211.39, 334219.09 4654276.1, 335247.27 4654348.5, 336281.84 4655559.24, 336902.75 4655338.66, 338186.59 4655604.53, 340193.95 4655858.03, 340709.05 4654614.94, 340651 4652477, 341383.77 4652660.58, 342153.18 4654850.5, 341824.1 4655697.45, 340833.87 4656838.24, 341665.73 4657598.66, 342115.76 4657792.08, 342736.21 4658712.36, 342926.97 4659445.36, 343650 4660861.38, 344325 4661426.43, 344807.57 4662150, 345203.71 4663077.33, 345979.32 4664344.79, 346419.69 4664859.66, 346808 4664418, 346983.4 4664589.27, 347302 4664437, 347727.87 4665297.16, 348400 4665249, 348545.53 4664701.51, 348156.61 4663357.83, 348365.78 4662834.36, 348487.4 4661764.67, 348461.79 4660759.03, 349377.12 4660893.54, 349703.57 4661239.43, 349778.06 4661377.3, 350156.29 4661225.35, 351178.33 4661539.72, 351725.44 4660468.59, 352143.06 4660191.37, 352419 4660409, 352886.75 4660147.61, 352798.53 4659338.84, 353970.48 4658996.16, 353961.86 4658612.91, 354271.88 4658274.63, 354447 4657129, 353748.83 4656795.82, 354353.85 4655525.55, 354043.15 4654273.36, 354060.04 4653898.46, 355104.46 4652532.58, 354997.03 4652346.75, 355441.24 4652082.53, 356272.45 4651456, 355946.16 4650414.98, 355763.19 4650266.14, 355813.88 4648795.88, 356178.81 4648581.21, 355196.2 4645150.42, 354830.37 4644770.6, 355368.75 4644841.92, 355885.53 4645112.09, 358131.23 4646698.82, 358327.92 4646525.8, 358531.69 4646692.64, 358634.94 4646371.61, 359947.84 4646028.19, 360301.41 4645435.23, 359891.83 4644189.05, 358734.44 4642618.57, 358859.66 4641992.96, 358355.95 4641179.22, 358393.81 4640120.25, 358067.46 4639060.45, 357643.36 4638331.63, 357679.84 4637795.56, 357258.38 4637166.17, 356206.89 4636103.53, 355988 4635822.95, 355617.18 4635454.42, 355472.69 4635609.1, 353688.89 4633658.62, 353784.07 4633170.19, 353413.39 4632667.58, 352636.11 4631435.73, 351697.4 4630680.65, 350839.58 4631011.39, 349765.54 4629671.09, 349109.53 4629125.95, 348015.59 4627945.09, 347465.62 4627358.18, 346170.68 4627755.95, 345499.41 4627909.59, 345459.52 4628907.99, 345412.3 4630001.01, 346424.56 4630969.18, 346614 4631569.89, 346059.25 4631685.36, 345481.32 4631071.73, 345048.93 4629974.31, 344435.88 4630063.22, 344154.82 4630339.72, 342335.35 4630769.92, 342140.15 4631277.5, 342392.03 4631956.77, 342562.08 4632535.31, 343359.88 4631919.91, 344198.79 4632675.69, 344232 4633461.39, 344046 4634955, 343627.63 4635162.42, 343587 4635513, 342559.3 4635413.14, 342727.6 4635716.22, 342285.77 4635847.85, 340968.16 4633264.48, 340276.54 4632170.37, 340678.17 4632249.99, 340507.66 4631990.28, 338581.05 4628384.44, 336616.03 4626194.39, 335520.94 4627090.37, 335106.29 4627078.6, 334615.19 4626543.04, 334181.3 4626533.25), (332155.25 4627068.65, 331890.26 4627098.4, 331711.74 4626081.55, 331167.76249354 4625014.75959795, 330136.51295489 4624147.57208493, 329895.87 4623833.45, 329972.450452426 4623749.13457894, 330582.68 4624217.91, 331203.700470917 4624745.2283439, 331490.42 4625164.94, 331819.325289428 4625713.97835845, 332155.25 4627068.65), (339564.77 4633563.22, 339371.2 4634385.19, 339160.74 4635033.97, 338883.34 4635018.6, 338754.84 4635532.38, 338767.79 4635976.19, 337855.94 4636103.48, 337820.13 4636242.19, 337431.99 4636029.5, 337379.57 4635700.22, 336858.95 4635493.53, 336509.96 4635843.28, 335857.33 4635255.03, 335749.68 4634141.19, 336066.09 4633942.39, 335748.84 4632801.97, 336035.61 4632742.04, 336082.31 4632170.3, 336410.22 4631821.02, 337002.97 4632511.95, 338282.06 4632959.96, 338562.49 4633789.27, 339564.77 4633563.22), (332155.25 4627068.65, 331890.26 4627098.4, 331711.74 4626081.55, 331167.76249354 4625014.75959795, 330136.51295489 4624147.57208493, 329895.87 4623833.45, 329972.450452426 4623749.13457894, 330582.68 4624217.91, 331203.700470917 4624745.2283439, 331490.42 4625164.94, 331819.325289428 4625713.97835845, 332155.25 4627068.65), (339564.77 4633563.22, 339371.2 4634385.19, 339160.74 4635033.97, 338883.34 4635018.6, 338754.84 4635532.38, 338767.79 4635976.19, 337855.94 4636103.48, 337820.13 4636242.19, 337431.99 4636029.5, 337379.57 4635700.22, 336858.95 4635493.53, 336509.96 4635843.28, 335857.33 4635255.03, 335749.68 4634141.19, 336066.09 4633942.39, 335748.84 4632801.97, 336035.61 4632742.04, 336082.31 4632170.3, 336410.22 4631821.02, 337002.97 4632511.95, 338282.06 4632959.96, 338562.49 4633789.27, 339564.77 4633563.22))");
     geom4 = reader.Read("MULTIPOLYGON (((347727.87 4665297.16, 347302 4664437, 346983.4 4664589.27, 346808 4664418, 346419.69 4664859.66, 345979.32 4664344.79, 345203.71 4663077.33, 344807.57 4662150, 344325 4661426.43, 343650 4660861.38, 342926.97 4659445.36, 342736.21 4658712.36, 342115.76 4657792.08, 341665.73 4657598.66, 340833.87 4656838.24, 341824.1 4655697.45, 342153.18 4654850.5, 341383.77 4652660.58, 340651 4652477, 340709.05 4654614.94, 340193.95 4655858.03, 338186.59 4655604.53, 336902.75 4655338.66, 336281.84 4655559.24, 335247.27 4654348.5, 334219.09 4654276.1, 331874.02 4654211.39, 331164.52 4654361.73, 330347.36 4654638.54, 328016.6 4654527.37, 326006.69 4655920.61, 325437.09 4656246.31, 325282.9 4656653.63, 325389.11 4656723.11, 325322 4656791, 324054 4656262, 322340.41 4656183.98, 321077.39 4656665.89, 318608.19 4657010.54, 317824.19 4657234.54, 315630 4656858, 314651 4657011, 313531 4657632, 313386 4658119, 311080 4658315, 309684 4659013, 308527.42 4659900.86, 308131 4660866, 308486 4662077, 308914 4663147, 309508 4663743, 309877 4664990, 310132.24 4666016.64, 309876 4666576.98, 309738.85 4666836.39, 309794.53 4668503.01, 309774 4669301, 310401 4670177, 311229 4670677, 310095.22 4671365.62, 309950 4671760, 310825.93 4673990.35, 310905.75 4674922.43, 311366.41 4675841.6, 311625.62 4676890.64, 311481.08 4677546.8, 312360.79 4678683.57, 312691.81 4679805.42, 313179.04 4680401.77, 313461.13 4681887.68, 313682.52 4683605.63, 314127.61 4684226.73, 314215.28 4685646.38, 315185.53 4686717.15, 315148.64 4687202.55, 316046.82 4688252.06, 315622 4688460.89, 315069.96 4688525.43, 314337.36 4688732.85, 314061.92 4689744.2, 314112.02 4689966.62, 314469.06 4690244.38, 315053.39 4690625.85, 315313.67 4690949.81, 315808.07 4691085.73, 316242.409379774 4690600.45445179, 316998.82 4690233.96, 316648.659385875 4689498.89193525, 318375.01 4688600.52, 318763.3 4688127.76, 319358.68 4687991.76, 320259.24 4687438.46, 322661.82 4687106.03, 323571.53 4686311.96, 324831.94 4685348.19, 325993.98 4686119.69, 325960.86 4687623.47, 326105.64 4688449.87, 326403.89 4689300.35, 325095.66 4690115.12, 324874.82 4690019.31, 324918.04 4690758.26, 324707.19 4690902.97, 324451.08 4691578.36, 324432.09 4692112.13, 324171.12 4693043.75, 322876 4693123.74, 322318.02 4693719.72, 322046.86 4694550.4, 321804.85 4694440.23, 320872.54 4696099.47, 321844.21 4697035.64, 321014.95 4698416.07, 321623.36 4699497.06, 323636.78 4699469.22, 324155.83 4699840.67, 325078.06 4701359.7, 323921.55 4702766.14, 324179.28 4702831.55, 324716.1 4703381.35, 325632.75 4703212.95, 325871.15 4703334.62, 326852.11 4705158.87, 327828.94 4705503.11, 329264.38 4705889.59, 329523.87 4706775.87, 329266.2 4707608.28, 329278.5 4708016.59, 329934.28 4708902.19, 330196.6 4709386.96, 331292.37 4709571.09, 331283.87 4710235.44, 332008.05 4710633.92, 332392.11 4711148.04, 332226.68 4711884.41, 332643.43 4712212.15, 332947.97 4712661.37, 333558.36 4713257.56, 333685.39 4713294.36, 334223.72 4713429.26, 334880.28 4713474.24, 335851.34 4711619.08, 336899.18 4711860.53, 337462.42 4711066.48, 337766.34 4710237.06, 338022.69 4710084.58, 337849.24 4709333.03, 337760.55 4708782.08, 338280.85 4708128.99, 338322.74 4707716.02, 337885.43 4707402.55, 337646.49 4706976.67, 337781.86 4705647.68, 337279.89 4704913.02, 337236.38 4703307.58, 337356.13 4702318.14, 337046.36 4700379.31, 338302.87 4698880.91, 338678.25 4699063.73, 339104.94 4698264.66, 337801.02 4697864.15, 337406.79 4696216.98, 336767.79 4695668.48, 335966.19 4695230.02, 335879.65 4694427.15, 335534.36 4693933.75, 335202.01 4692664.39, 334919.17 4692106.96, 334797.95 4690777.34, 334046.66 4690173.61, 333801.57 4689473.73, 332177.92 4689644.86, 331739.57 4689132.74, 331645.27 4688588.59, 331701.86 4688129.21, 332178.48 4687805.19, 332561.59 4686772.73, 333127.31 4686775.71, 333274.08 4684943.52, 334332.78 4684902.39, 335022.51 4684796.69, 335461.84 4684198.15, 336401.36 4684206.64, 337208.56 4683325.92, 337355.5 4683743.65, 338121.81 4683416.3, 338400 4683100, 339768.14 4682999.77, 340750.29 4682446.41, 341626.25 4682441.53, 342785.6 4682298.75, 344254.04 4681767.48, 344416.94 4681738.28, 344282.02 4682344.67, 344684.49 4682144.86, 345271.46 4681675.3, 345967.66 4680892.58, 347280.09 4680570.11, 347627.54 4680435.09, 347586.21 4680274.59, 348159.28 4679001.47, 346690.04 4678047.9, 346702.75 4677308.94, 347007.38 4676711.76, 348490.98 4676060.16, 348732.05 4676015.81, 348830.41 4673950.38, 348166.11 4673379.36, 347986.37 4672907.95, 348530.44 4672694.12, 349748.71 4671803.07, 350235.53 4671032.04, 350216 4670463.07, 349851.76 4670304.29, 349891.23 4670095.57, 349613 4669339, 349212.24 4668650.52, 348745 4668779.95, 348585.33 4668413.51, 348170 4668431, 348164 4667899, 348069 4667181, 347616.34 4666559.51, 347727.87 4665297.16)), ((316121.46 4691161.34, 316370.83 4691494.63, 315704.26 4692068.99, 315645.1 4692254.09, 315779.7 4692907.83, 316255.3 4693566.22, 316747.49 4694061.2, 317670.27 4693794.47, 317914.284404883 4693631.70449732, 318096.16 4693623.39, 318250.221909928 4693694.20449825, 318704.6 4693061.03, 319534.44 4692130.34, 319411.94 4691663.29, 318847.23 4691497.64, 318643.22 4691192.2, 317150.95 4690849.29, 316633.034385641 4690897.32945625, 316121.46 4691161.34)), ((347727.87 4665297.16, 347302 4664437, 346983.4 4664589.27, 346808 4664418, 346419.69 4664859.66, 345979.32 4664344.79, 345203.71 4663077.33, 344807.57 4662150, 344325 4661426.43, 343650 4660861.38, 342926.97 4659445.36, 342736.21 4658712.36, 342115.76 4657792.08, 341665.73 4657598.66, 340833.87 4656838.24, 341824.1 4655697.45, 342153.18 4654850.5, 341383.77 4652660.58, 340651 4652477, 340709.05 4654614.94, 340193.95 4655858.03, 338186.59 4655604.53, 336902.75 4655338.66, 336281.84 4655559.24, 335247.27 4654348.5, 334219.09 4654276.1, 331874.02 4654211.39, 331164.52 4654361.73, 330347.36 4654638.54, 328016.6 4654527.37, 326006.69 4655920.61, 325437.09 4656246.31, 325282.9 4656653.63, 325389.11 4656723.11, 325322 4656791, 324054 4656262, 322340.41 4656183.98, 321077.39 4656665.89, 318608.19 4657010.54, 317824.19 4657234.54, 315630 4656858, 314651 4657011, 313531 4657632, 313386 4658119, 311080 4658315, 309684 4659013, 308527.42 4659900.86, 308131 4660866, 308486 4662077, 308914 4663147, 309508 4663743, 309877 4664990, 310132.24 4666016.64, 309876 4666576.98, 309738.85 4666836.39, 309794.53 4668503.01, 309774 4669301, 310401 4670177, 311229 4670677, 310095.22 4671365.62, 309950 4671760, 310825.93 4673990.35, 310905.75 4674922.43, 311366.41 4675841.6, 311625.62 4676890.64, 311481.08 4677546.8, 312360.79 4678683.57, 312691.81 4679805.42, 313179.04 4680401.77, 313461.13 4681887.68, 313682.52 4683605.63, 314127.61 4684226.73, 314215.28 4685646.38, 315185.53 4686717.15, 315148.64 4687202.55, 316046.82 4688252.06, 315622 4688460.89, 315069.96 4688525.43, 314337.36 4688732.85, 314061.92 4689744.2, 314112.02 4689966.62, 314469.06 4690244.38, 315053.39 4690625.85, 315313.67 4690949.81, 315808.07 4691085.73, 316242.409379774 4690600.45445179, 316998.82 4690233.96, 316648.659385875 4689498.89193525, 318375.01 4688600.52, 318763.3 4688127.76, 319358.68 4687991.76, 320259.24 4687438.46, 322661.82 4687106.03, 323571.53 4686311.96, 324831.94 4685348.19, 325993.98 4686119.69, 325960.86 4687623.47, 326105.64 4688449.87, 326403.89 4689300.35, 325095.66 4690115.12, 324874.82 4690019.31, 324918.04 4690758.26, 324707.19 4690902.97, 324451.08 4691578.36, 324432.09 4692112.13, 324171.12 4693043.75, 322876 4693123.74, 322318.02 4693719.72, 322046.86 4694550.4, 321804.85 4694440.23, 320872.54 4696099.47, 321844.21 4697035.64, 321014.95 4698416.07, 321623.36 4699497.06, 323636.78 4699469.22, 324155.83 4699840.67, 325078.06 4701359.7, 323921.55 4702766.14, 324179.28 4702831.55, 324716.1 4703381.35, 325632.75 4703212.95, 325871.15 4703334.62, 326852.11 4705158.87, 327828.94 4705503.11, 329264.38 4705889.59, 329523.87 4706775.87, 329266.2 4707608.28, 329278.5 4708016.59, 329934.28 4708902.19, 330196.6 4709386.96, 331292.37 4709571.09, 331283.87 4710235.44, 332008.05 4710633.92, 332392.11 4711148.04, 332226.68 4711884.41, 332643.43 4712212.15, 332947.97 4712661.37, 333558.36 4713257.56, 333685.39 4713294.36, 334223.72 4713429.26, 334880.28 4713474.24, 335851.34 4711619.08, 336899.18 4711860.53, 337462.42 4711066.48, 337766.34 4710237.06, 338022.69 4710084.58, 337849.24 4709333.03, 337760.55 4708782.08, 338280.85 4708128.99, 338322.74 4707716.02, 337885.43 4707402.55, 337646.49 4706976.67, 337781.86 4705647.68, 337279.89 4704913.02, 337236.38 4703307.58, 337356.13 4702318.14, 337046.36 4700379.31, 338302.87 4698880.91, 338678.25 4699063.73, 339104.94 4698264.66, 337801.02 4697864.15, 337406.79 4696216.98, 336767.79 4695668.48, 335966.19 4695230.02, 335879.65 4694427.15, 335534.36 4693933.75, 335202.01 4692664.39, 334919.17 4692106.96, 334797.95 4690777.34, 334046.66 4690173.61, 333801.57 4689473.73, 332177.92 4689644.86, 331739.57 4689132.74, 331645.27 4688588.59, 331701.86 4688129.21, 332178.48 4687805.19, 332561.59 4686772.73, 333127.31 4686775.71, 333274.08 4684943.52, 334332.78 4684902.39, 335022.51 4684796.69, 335461.84 4684198.15, 336401.36 4684206.64, 337208.56 4683325.92, 337355.5 4683743.65, 338121.81 4683416.3, 338400 4683100, 339768.14 4682999.77, 340750.29 4682446.41, 341626.25 4682441.53, 342785.6 4682298.75, 344254.04 4681767.48, 344416.94 4681738.28, 344282.02 4682344.67, 344684.49 4682144.86, 345271.46 4681675.3, 345967.66 4680892.58, 347280.09 4680570.11, 347627.54 4680435.09, 347586.21 4680274.59, 348159.28 4679001.47, 346690.04 4678047.9, 346702.75 4677308.94, 347007.38 4676711.76, 348490.98 4676060.16, 348732.05 4676015.81, 348830.41 4673950.38, 348166.11 4673379.36, 347986.37 4672907.95, 348530.44 4672694.12, 349748.71 4671803.07, 350235.53 4671032.04, 350216 4670463.07, 349851.76 4670304.29, 349891.23 4670095.57, 349613 4669339, 349212.24 4668650.52, 348745 4668779.95, 348585.33 4668413.51, 348170 4668431, 348164 4667899, 348069 4667181, 347616.34 4666559.51, 347727.87 4665297.16)), ((316121.46 4691161.34, 316370.83 4691494.63, 315704.26 4692068.99, 315645.1 4692254.09, 315779.7 4692907.83, 316255.3 4693566.22, 316747.49 4694061.2, 317670.27 4693794.47, 317914.284404883 4693631.70449732, 318096.16 4693623.39, 318250.221909928 4693694.20449825, 318704.6 4693061.03, 319534.44 4692130.34, 319411.94 4691663.29, 318847.23 4691497.64, 318643.22 4691192.2, 317150.95 4690849.29, 316633.034385641 4690897.32945625, 316121.46 4691161.34)))");
     geom5 = reader.Read("POLYGON ((334181.3 4626533.25, 333802.61 4626481.77, 332851.85 4626555.73, 332837.99 4626870.47, 331675.575478004 4625017.10334799, 331449.012974601 4624694.44709314, 330300.575457354 4623624.13457707, 329963.34 4623438.15, 330534.02 4622198.85, 331461.18 4622559.66, 331815.99 4622016.46, 332363.67 4622161.85, 332039.82 4619793.32, 331548.21 4619356.5, 331272.11 4619075.88, 330483.58 4619245.55, 329411.26 4618893.99, 328619.74 4618944.72, 327619.86 4619438.68, 326688.91 4620936.39, 326577.53 4622953.68, 324921.22 4622991.88, 324835.36 4623313.11, 323348.71 4623236.68, 322453.43 4623415.99, 321526.83 4621885.82, 322513.7 4621551.96, 321796.7 4620132.45, 320461.29 4619812.96, 320255.43 4620350.01, 319572.87 4620303.13, 317928.9 4620166.3, 317654.64 4619133.62, 317161.4 4619283.23, 316348.1 4619227.49, 314893.3 4618828.46, 314921.8 4617759.96, 313965.48 4617497.69, 313525.07 4618502.05, 312863.3 4619592.91, 311994.17 4620673.82, 311646.12 4620051.21, 310652.99 4619110.01, 309868.14 4619370.41, 309748.57 4619148.83, 309344.12 4618617.63, 308994.57 4619110.83, 308290.42 4618609.47, 307608.36 4620081.67, 306979.94 4620597.13, 306459.64 4621348.79, 305837.1 4622106.1, 305976.64 4622701.34, 304560.82 4624222.35, 303588.37 4625472.67, 302936.71 4626165.17, 302435.72 4626769.89, 302105.2 4627314.96, 301884.67 4627782.92, 301325.84 4629098.08, 300636.13 4629797.85, 299826.53 4631113.5, 299717.36 4631406.8, 298959.32 4633461.34, 299030.82 4635340.12, 299231.61 4636324.43, 299422.29 4637122.92, 299266.6 4637583.39, 299694.24 4637835.81, 300235.59 4637959.75, 301211.84 4638288.82, 301587.95 4639076.98, 300372.6 4640075.77, 301093.11 4642508.82, 300685.17 4643391.09, 300979.56 4643794.25, 301616.09 4643842.48, 299489.82 4644826.56, 299039.67 4645141.95, 298325.57 4645350.64, 297986.62 4645538.92, 298401.6 4646796.17, 299421.04 4648129.44, 300059.47 4648865.43, 300702.38 4649212.22, 301673.03 4648521.82, 302129.92 4649258.91, 302374.88 4650445.5, 302765 4651012.13, 302908.82 4651542.49, 304450.51 4652031.55, 304784.92 4650772.89, 304833.13 4650721.19, 305094.07 4652077.88, 305993.16 4652643.13, 306655 4654036, 306469 4654283, 306133 4654235, 305945 4655059, 305769 4655592, 306378 4657164, 307183 4657587, 307476 4659683, 308131 4660866, 308527.42 4659900.86, 309684 4659013, 311080 4658315, 313386 4658119, 313531 4657632, 314651 4657011, 315630 4656858, 317824.19 4657234.54, 318608.19 4657010.54, 321077.39 4656665.89, 322340.41 4656183.98, 324054 4656262, 325322 4656791, 325389.11 4656723.11, 325282.9 4656653.63, 325437.09 4656246.31, 326006.69 4655920.61, 328016.6 4654527.37, 330347.36 4654638.54, 331164.52 4654361.73, 331874.02 4654211.39, 334219.09 4654276.1, 335247.27 4654348.5, 336281.84 4655559.24, 336902.75 4655338.66, 338186.59 4655604.53, 340193.95 4655858.03, 340709.05 4654614.94, 340651 4652477, 341383.77 4652660.58, 342153.18 4654850.5, 341824.1 4655697.45, 340833.87 4656838.24, 341665.73 4657598.66, 342115.76 4657792.08, 342736.21 4658712.36, 342926.97 4659445.36, 343650 4660861.38, 344325 4661426.43, 344807.57 4662150, 345203.71 4663077.33, 345979.32 4664344.79, 346419.69 4664859.66, 346808 4664418, 346983.4 4664589.27, 347302 4664437, 347727.87 4665297.16, 348400 4665249, 348545.53 4664701.51, 348156.61 4663357.83, 348365.78 4662834.36, 348487.4 4661764.67, 348461.79 4660759.03, 349377.12 4660893.54, 349703.57 4661239.43, 349778.06 4661377.3, 350156.29 4661225.35, 351178.33 4661539.72, 351725.44 4660468.59, 352143.06 4660191.37, 352419 4660409, 352886.75 4660147.61, 352798.53 4659338.84, 353970.48 4658996.16, 353961.86 4658612.91, 354271.88 4658274.63, 354447 4657129, 353748.83 4656795.82, 354353.85 4655525.55, 354043.15 4654273.36, 354060.04 4653898.46, 355104.46 4652532.58, 354997.03 4652346.75, 355441.24 4652082.53, 356272.45 4651456, 355946.16 4650414.98, 355763.19 4650266.14, 355813.88 4648795.88, 356178.81 4648581.21, 355196.2 4645150.42, 354830.37 4644770.6, 355368.75 4644841.92, 355885.53 4645112.09, 358131.23 4646698.82, 358327.92 4646525.8, 358531.69 4646692.64, 358634.94 4646371.61, 359947.84 4646028.19, 360301.41 4645435.23, 359891.83 4644189.05, 358734.44 4642618.57, 358859.66 4641992.96, 358355.95 4641179.22, 358393.81 4640120.25, 358067.46 4639060.45, 357643.36 4638331.63, 357679.84 4637795.56, 357258.38 4637166.17, 356206.89 4636103.53, 355988 4635822.95, 355617.18 4635454.42, 355472.69 4635609.1, 353688.89 4633658.62, 353784.07 4633170.19, 353413.39 4632667.58, 352636.11 4631435.73, 351697.4 4630680.65, 350839.58 4631011.39, 349765.54 4629671.09, 349109.53 4629125.95, 348015.59 4627945.09, 347465.62 4627358.18, 346170.68 4627755.95, 345499.41 4627909.59, 345459.52 4628907.99, 345412.3 4630001.01, 346424.56 4630969.18, 346614 4631569.89, 346059.25 4631685.36, 345481.32 4631071.73, 345048.93 4629974.31, 344435.88 4630063.22, 344154.82 4630339.72, 342335.35 4630769.92, 342140.15 4631277.5, 342392.03 4631956.77, 342562.08 4632535.31, 343359.88 4631919.91, 344198.79 4632675.69, 344232 4633461.39, 344046 4634955, 343627.63 4635162.42, 343587 4635513, 342559.3 4635413.14, 342727.6 4635716.22, 342285.77 4635847.85, 340968.16 4633264.48, 340276.54 4632170.37, 340678.17 4632249.99, 340507.66 4631990.28, 338581.05 4628384.44, 336616.03 4626194.39, 335520.94 4627090.37, 335106.29 4627078.6, 334615.19 4626543.04, 334181.3 4626533.25), (332155.25 4627068.65, 331890.26 4627098.4, 331711.74 4626081.55, 331167.76249354 4625014.75959795, 330136.51295489 4624147.57208493, 329895.87 4623833.45, 329972.450452426 4623749.13457894, 330582.68 4624217.91, 331203.700470917 4624745.2283439, 331490.42 4625164.94, 331819.325289428 4625713.97835845, 332155.25 4627068.65), (339564.77 4633563.22, 339371.2 4634385.19, 339160.74 4635033.97, 338883.34 4635018.6, 338754.84 4635532.38, 338767.79 4635976.19, 337855.94 4636103.48, 337820.13 4636242.19, 337431.99 4636029.5, 337379.57 4635700.22, 336858.95 4635493.53, 336509.96 4635843.28, 335857.33 4635255.03, 335749.68 4634141.19, 336066.09 4633942.39, 335748.84 4632801.97, 336035.61 4632742.04, 336082.31 4632170.3, 336410.22 4631821.02, 337002.97 4632511.95, 338282.06 4632959.96, 338562.49 4633789.27, 339564.77 4633563.22), (332155.25 4627068.65, 331890.26 4627098.4, 331711.74 4626081.55, 331167.76249354 4625014.75959795, 330136.51295489 4624147.57208493, 329895.87 4623833.45, 329972.450452426 4623749.13457894, 330582.68 4624217.91, 331203.700470917 4624745.2283439, 331490.42 4625164.94, 331819.325289428 4625713.97835845, 332155.25 4627068.65), (339564.77 4633563.22, 339371.2 4634385.19, 339160.74 4635033.97, 338883.34 4635018.6, 338754.84 4635532.38, 338767.79 4635976.19, 337855.94 4636103.48, 337820.13 4636242.19, 337431.99 4636029.5, 337379.57 4635700.22, 336858.95 4635493.53, 336509.96 4635843.28, 335857.33 4635255.03, 335749.68 4634141.19, 336066.09 4633942.39, 335748.84 4632801.97, 336035.61 4632742.04, 336082.31 4632170.3, 336410.22 4631821.02, 337002.97 4632511.95, 338282.06 4632959.96, 338562.49 4633789.27, 339564.77 4633563.22))");
     geom6 = reader.Read("POLYGON ((347645.481756858 4618835.07592096, 347645.481756858 4621300.75477798, 350111.160613874 4621300.75477798, 350111.160613874 4618835.07592096, 347645.481756858 4618835.07592096))");
     geom7 = reader.Read("POLYGON ((334181.3 4626533.25, 333802.61 4626481.77, 332851.85 4626555.73, 332837.99 4626870.47, 331675.575478004 4625017.10334799, 331449.012974601 4624694.44709314, 330300.575457354 4623624.13457707, 329963.34 4623438.15, 330534.02 4622198.85, 331461.18 4622559.66, 331815.99 4622016.46, 332363.67 4622161.85, 332039.82 4619793.32, 331548.21 4619356.5, 331272.11 4619075.88, 330483.58 4619245.55, 329411.26 4618893.99, 328619.74 4618944.72, 327619.86 4619438.68, 326688.91 4620936.39, 326577.53 4622953.68, 324921.22 4622991.88, 324835.36 4623313.11, 323348.71 4623236.68, 322453.43 4623415.99, 321526.83 4621885.82, 322513.7 4621551.96, 321796.7 4620132.45, 320461.29 4619812.96, 320255.43 4620350.01, 319572.87 4620303.13, 317928.9 4620166.3, 317654.64 4619133.62, 317161.4 4619283.23, 316348.1 4619227.49, 314893.3 4618828.46, 314921.8 4617759.96, 313965.48 4617497.69, 313525.07 4618502.05, 312863.3 4619592.91, 311994.17 4620673.82, 311646.12 4620051.21, 310652.99 4619110.01, 309868.14 4619370.41, 309748.57 4619148.83, 309344.12 4618617.63, 308994.57 4619110.83, 308290.42 4618609.47, 307608.36 4620081.67, 306979.94 4620597.13, 306459.64 4621348.79, 305837.1 4622106.1, 305976.64 4622701.34, 304560.82 4624222.35, 303588.37 4625472.67, 302936.71 4626165.17, 302435.72 4626769.89, 302105.2 4627314.96, 301884.67 4627782.92, 301325.84 4629098.08, 300636.13 4629797.85, 299826.53 4631113.5, 299717.36 4631406.8, 298959.32 4633461.34, 299030.82 4635340.12, 299231.61 4636324.43, 299422.29 4637122.92, 299266.6 4637583.39, 299694.24 4637835.81, 300235.59 4637959.75, 301211.84 4638288.82, 301587.95 4639076.98, 300372.6 4640075.77, 301093.11 4642508.82, 300685.17 4643391.09, 300979.56 4643794.25, 301616.09 4643842.48, 299489.82 4644826.56, 299039.67 4645141.95, 298325.57 4645350.64, 297986.62 4645538.92, 298401.6 4646796.17, 299421.04 4648129.44, 300059.47 4648865.43, 300702.38 4649212.22, 301673.03 4648521.82, 302129.92 4649258.91, 302374.88 4650445.5, 302765 4651012.13, 302908.82 4651542.49, 304450.51 4652031.55, 304784.92 4650772.89, 304833.13 4650721.19, 305094.07 4652077.88, 305993.16 4652643.13, 306655 4654036, 306469 4654283, 306133 4654235, 305945 4655059, 305769 4655592, 306378 4657164, 307183 4657587, 307476 4659683, 308131 4660866, 308527.42 4659900.86, 309684 4659013, 311080 4658315, 313386 4658119, 313531 4657632, 314651 4657011, 315630 4656858, 317824.19 4657234.54, 318608.19 4657010.54, 321077.39 4656665.89, 322340.41 4656183.98, 324054 4656262, 325322 4656791, 325389.11 4656723.11, 325282.9 4656653.63, 325437.09 4656246.31, 326006.69 4655920.61, 328016.6 4654527.37, 330347.36 4654638.54, 331164.52 4654361.73, 331874.02 4654211.39, 334219.09 4654276.1, 335247.27 4654348.5, 336281.84 4655559.24, 336902.75 4655338.66, 338186.59 4655604.53, 340193.95 4655858.03, 340709.05 4654614.94, 340651 4652477, 341383.77 4652660.58, 342153.18 4654850.5, 341824.1 4655697.45, 340833.87 4656838.24, 341665.73 4657598.66, 342115.76 4657792.08, 342736.21 4658712.36, 342926.97 4659445.36, 343650 4660861.38, 344325 4661426.43, 344807.57 4662150, 345203.71 4663077.33, 345979.32 4664344.79, 346419.69 4664859.66, 346808 4664418, 346983.4 4664589.27, 347302 4664437, 347727.87 4665297.16, 348400 4665249, 348545.53 4664701.51, 348156.61 4663357.83, 348365.78 4662834.36, 348487.4 4661764.67, 348461.79 4660759.03, 349377.12 4660893.54, 349703.57 4661239.43, 349778.06 4661377.3, 350156.29 4661225.35, 351178.33 4661539.72, 351725.44 4660468.59, 352143.06 4660191.37, 352419 4660409, 352886.75 4660147.61, 352798.53 4659338.84, 353970.48 4658996.16, 353961.86 4658612.91, 354271.88 4658274.63, 354447 4657129, 353748.83 4656795.82, 354353.85 4655525.55, 354043.15 4654273.36, 354060.04 4653898.46, 355104.46 4652532.58, 354997.03 4652346.75, 355441.24 4652082.53, 356272.45 4651456, 355946.16 4650414.98, 355763.19 4650266.14, 355813.88 4648795.88, 356178.81 4648581.21, 355196.2 4645150.42, 354830.37 4644770.6, 355368.75 4644841.92, 355885.53 4645112.09, 358131.23 4646698.82, 358327.92 4646525.8, 358531.69 4646692.64, 358634.94 4646371.61, 359947.84 4646028.19, 360301.41 4645435.23, 359891.83 4644189.05, 358734.44 4642618.57, 358859.66 4641992.96, 358355.95 4641179.22, 358393.81 4640120.25, 358067.46 4639060.45, 357643.36 4638331.63, 357679.84 4637795.56, 357258.38 4637166.17, 356206.89 4636103.53, 355988 4635822.95, 355617.18 4635454.42, 355472.69 4635609.1, 353688.89 4633658.62, 353784.07 4633170.19, 353413.39 4632667.58, 352636.11 4631435.73, 351697.4 4630680.65, 350839.58 4631011.39, 349765.54 4629671.09, 349109.53 4629125.95, 348015.59 4627945.09, 347465.62 4627358.18, 346170.68 4627755.95, 345499.41 4627909.59, 345459.52 4628907.99, 345412.3 4630001.01, 346424.56 4630969.18, 346614 4631569.89, 346059.25 4631685.36, 345481.32 4631071.73, 345048.93 4629974.31, 344435.88 4630063.22, 344154.82 4630339.72, 342335.35 4630769.92, 342140.15 4631277.5, 342392.03 4631956.77, 342562.08 4632535.31, 343359.88 4631919.91, 344198.79 4632675.69, 344232 4633461.39, 344046 4634955, 343627.63 4635162.42, 343587 4635513, 342559.3 4635413.14, 342727.6 4635716.22, 342285.77 4635847.85, 340968.16 4633264.48, 340276.54 4632170.37, 340678.17 4632249.99, 340507.66 4631990.28, 338581.05 4628384.44, 336616.03 4626194.39, 335520.94 4627090.37, 335106.29 4627078.6, 334615.19 4626543.04, 334181.3 4626533.25), (332155.25 4627068.65, 331890.26 4627098.4, 331711.74 4626081.55, 331167.76249354 4625014.75959795, 330136.51295489 4624147.57208493, 329895.87 4623833.45, 329972.450452426 4623749.13457894, 330582.68 4624217.91, 331203.700470917 4624745.2283439, 331490.42 4625164.94, 331819.325289428 4625713.97835845, 332155.25 4627068.65), (339564.77 4633563.22, 339371.2 4634385.19, 339160.74 4635033.97, 338883.34 4635018.6, 338754.84 4635532.38, 338767.79 4635976.19, 337855.94 4636103.48, 337820.13 4636242.19, 337431.99 4636029.5, 337379.57 4635700.22, 336858.95 4635493.53, 336509.96 4635843.28, 335857.33 4635255.03, 335749.68 4634141.19, 336066.09 4633942.39, 335748.84 4632801.97, 336035.61 4632742.04, 336082.31 4632170.3, 336410.22 4631821.02, 337002.97 4632511.95, 338282.06 4632959.96, 338562.49 4633789.27, 339564.77 4633563.22), (332155.25 4627068.65, 331890.26 4627098.4, 331711.74 4626081.55, 331167.76249354 4625014.75959795, 330136.51295489 4624147.57208493, 329895.87 4623833.45, 329972.450452426 4623749.13457894, 330582.68 4624217.91, 331203.700470917 4624745.2283439, 331490.42 4625164.94, 331819.325289428 4625713.97835845, 332155.25 4627068.65), (339564.77 4633563.22, 339371.2 4634385.19, 339160.74 4635033.97, 338883.34 4635018.6, 338754.84 4635532.38, 338767.79 4635976.19, 337855.94 4636103.48, 337820.13 4636242.19, 337431.99 4636029.5, 337379.57 4635700.22, 336858.95 4635493.53, 336509.96 4635843.28, 335857.33 4635255.03, 335749.68 4634141.19, 336066.09 4633942.39, 335748.84 4632801.97, 336035.61 4632742.04, 336082.31 4632170.3, 336410.22 4631821.02, 337002.97 4632511.95, 338282.06 4632959.96, 338562.49 4633789.27, 339564.77 4633563.22))");        
 }
		public virtual void  Intersection(string wktA, string wktB, PrecisionModel pm)
		{
			Console.WriteLine("Running example using Precision Model = " + pm);
			GeometryFactory fact = new GeometryFactory(pm);
			WKTReader wktRdr = new WKTReader(fact);
			
			IGeometry A = wktRdr.Read(wktA);
			IGeometry B = wktRdr.Read(wktB);
			IGeometry C = A.Intersection(B);
			
			Console.WriteLine("A intersection B = " + C);
		}
Exemple #11
0
        /// <summary>
        /// 
        /// </summary>
        private void PerformTest(IGeometryFactory factory) 
        {
            IGeometry path = new WKTReader(factory).Read(GeomText);
            Assert.IsNotNull(path); 
            Debug.WriteLine(String.Format("Original Points: {0}", path.NumPoints));

            IGeometry simplified = DouglasPeuckerSimplifier.Simplify(path, 2);
            Assert.IsNotNull(simplified); 
            Debug.WriteLine(String.Format("Simplified Points: {0}", simplified.NumPoints));

            IGeometry buffered = simplified.Buffer(1.143);            
            Assert.IsNotNull(buffered);
            Debug.WriteLine(buffered);
        }
        /// <summary>
        /// 
        /// </summary>
		public virtual void Run()
		{
			GeometryFactory fact = new GeometryFactory();
			WKTReader wktRdr = new WKTReader(fact);
			
			string wktA = "POLYGON((40 100, 40 20, 120 20, 120 100, 40 100))";
			string wktB = "LINESTRING(20 80, 80 60, 100 140)";
			IGeometry A = wktRdr.Read(wktA);
			IGeometry B = wktRdr.Read(wktB);
            IGeometry C = A.Intersection(B);
			Console.WriteLine("A = " + A);
			Console.WriteLine("B = " + B);
			Console.WriteLine("A intersection B = " + C);
			Console.WriteLine("A relate C = " + A.Relate(B));
		}
Exemple #13
0
		public static void main(string[] args)
		{
			// read a point from a WKT string (using the default point factory)
			IGeometry g1 = new WKTReader().Read("LINESTRING (0 0, 10 10, 20 20)");
			Console.WriteLine("Geometry 1: " + g1);
			
			// create a point by specifying the coordinates directly
			ICoordinate[] coordinates = new ICoordinate[] { new Coordinate(0, 0), 
                new Coordinate(10, 10), new Coordinate(20, 20) };
			// use the default factory, which gives full double-precision
			IGeometry g2 = new GeometryFactory().CreateLineString(coordinates);
			Console.WriteLine("Geometry 2: " + g2);
			
			// compute the intersection of the two geometries
			IGeometry g3 = g1.Intersection(g2);
			Console.WriteLine("G1 intersection G2: " + g3);
		}
Exemple #14
0
        public void OverlayUsingFixedPrecision()
        {
            IGeometryFactory factory = GeometryFactory.Fixed;
            WKTReader reader = new WKTReader(factory);

            IGeometry pol = reader.Read(wktpol);
            Assert.IsNotNull(pol);
            Assert.IsTrue(pol.IsValid);
            Assert.IsTrue(pol.Factory.PrecisionModel == factory.PrecisionModel);

            IGeometry line = reader.Read(wktline);
            Assert.IsNotNull(line);
            Assert.IsTrue(line.IsValid);
            Assert.IsTrue(line.Factory.PrecisionModel == factory.PrecisionModel);

            Assert.IsTrue(pol.Intersects(line));
        }
		internal virtual void Run()
		{
			WKTReader rdr = new WKTReader();
			IList lines = new ArrayList();
			
			lines.Add(rdr.Read("LINESTRING (0 0 , 10 10)"));            // isolated edge
            lines.Add(rdr.Read("LINESTRING (185 221, 100 100)"));       //dangling edge
            lines.Add(rdr.Read("LINESTRING (185 221, 88 275, 180 316)"));
            lines.Add(rdr.Read("LINESTRING (185 221, 292 281, 180 316)"));
            lines.Add(rdr.Read("LINESTRING (189 98, 83 187, 185 221)"));
            lines.Add(rdr.Read("LINESTRING (189 98, 325 168, 185 221)"));
			
			Polygonizer polygonizer = new Polygonizer();
			polygonizer.Add(lines);
			
			ICollection polys = polygonizer.Polygons;
			
			Console.WriteLine("Polygons formed (" + polys.Count + "):");
            foreach(object obj in polys)
			    Console.WriteLine(obj);
		}
Exemple #16
0
        private void TestFormatting(ICoordinate c)
        {            
            IGeometry point = GeometryFactory.Floating.CreatePoint(c);
            String result = writer.Write(point);
            Debug.WriteLine(result);
            IGeometry geom = new WKTReader(GeometryFactory.Floating).Read(result);
            string tos = geom.ToString();
            Assert.IsTrue(String.Equals(tos, result));

            point = GeometryFactory.FloatingSingle.CreatePoint(c);
            result = writer.Write(point);
            Debug.WriteLine(result);
            geom = new WKTReader(GeometryFactory.Floating).Read(result);
            tos = geom.ToString();
            Assert.IsTrue(String.Equals(tos, result));

            point = GeometryFactory.Fixed.CreatePoint(c);
            result = writer.Write(point);
            Debug.WriteLine(result);
            geom = new WKTReader(GeometryFactory.Floating).Read(result);
            tos = geom.ToString();
            Assert.IsTrue(String.Equals(tos, result));
        }
        public void GetIntersectionArea()
        {
            var polygon = new WKTReader().Read(
                    "POLYGON((2 -10,1.4 -7,3.4 -7,2.6 -3,0.6 -3,0 0,0 1,10 1,10 0,9 -5,8.6 -7,8 -10,2 -10))");

            var polygon2 = new WKTReader().Read(
                    "POLYGON((3 -10,2.4 -7,4.4 -7,3.6 -3,1.6 -3,1 0,1 1,11 1,11 0,10 -5,9.6 -7,9 -10,3 -10))");

            //self area
            Assert.AreEqual(polygon.Area, GeometryHelper.GetSampledIntersectionArea(polygon, polygon), 3);

            var actualArea = GeometryHelper.GetIntersectionArea(polygon, polygon2);
            Assert.AreEqual(71, actualArea, 0.1);
            Assert.AreEqual(actualArea, GeometryHelper.GetSampledIntersectionArea(polygon, polygon2), 3);
        }
Exemple #18
0
        public void UnionPolygons()
        {
            var wktReader = new WKTReader(new GeometryFactory(new PrecisionModel(1000)));

            var polygon1 = wktReader.Read("POLYGON((0 0,1 1,1 -1,0 0))");
            var polygon2 = wktReader.Read("POLYGON((1 1,2 0,1 -1,1 1))");

            var union = polygon1.Union(polygon2);

            var wkt = new WKTWriter().Write(union);

            Trace.WriteLine(wkt);

            Assert.AreEqual("POLYGON((0 0,1 1,2 0,1 -1,0 0))", wkt, "polygons are merged");
        }
Exemple #19
0
        public void IntersectsIgnoresZCoordinates()
        {
            var wktReader = new WKTReader(new GeometryFactory(new PrecisionModel(1000)));
            
            var polygon = wktReader.Read("POLYGON((0 0,1 1,1 -1,0 0))");
            var disjointLine = wktReader.Read("LINESTRING(0 1,1 2)");
            var intersectingLine = wktReader.Read("LINESTRING(0 1,1 0)");
            

            Assert.IsFalse(polygon.Intersects(disjointLine));
            Assert.IsTrue(polygon.Intersects(intersectingLine));

            foreach (var coordinate in polygon.Coordinates)
            {
                coordinate.Z = 1;
            }
            foreach (var coordinate in disjointLine.Coordinates)
            {
                coordinate.Z = 1;
            }
            foreach (var coordinate in intersectingLine.Coordinates)
            {
                coordinate.Z = -1;
            }
           
            Assert.IsFalse(polygon.Intersects(disjointLine));
            Assert.IsTrue(polygon.Intersects(intersectingLine));
        }
Exemple #20
0
        public void GeometryTransformScaleTest()
        {
            var wktReader = new WKTReader(new GeometryFactory(new PrecisionModel(1000)));
            var geometry = wktReader.Read("POLYGON((0 -3,5 -3,5 -7,0 -7,0 -3))");
            
            var scale = 5.0;
            
            var scaledGeometry = SharpMap.CoordinateSystems.Transformations.GeometryTransform.Scale(geometry, scale);

            Assert.AreEqual(scaledGeometry.Coordinates.Length,geometry.Coordinates.Length);
            Assert.AreEqual(scaledGeometry.Centroid, geometry.Centroid);

            Assert.AreEqual(-10.0, scaledGeometry.Coordinates[0].X);
            Assert.AreEqual(5.0, scaledGeometry.Coordinates[0].Y);
            Assert.AreEqual(15.0, scaledGeometry.Coordinates[1].X);
            Assert.AreEqual(5.0, scaledGeometry.Coordinates[1].Y);
            Assert.AreEqual(15.0, scaledGeometry.Coordinates[2].X);
            Assert.AreEqual(-15.0, scaledGeometry.Coordinates[2].Y);
            Assert.AreEqual(-10.0, scaledGeometry.Coordinates[3].X);
            Assert.AreEqual(-15.0, scaledGeometry.Coordinates[3].Y);
            Assert.AreEqual(-10.0, scaledGeometry.Coordinates[4].X);
            Assert.AreEqual(5.0, scaledGeometry.Coordinates[4].Y);
        }
Exemple #21
0
        public override void Start()
        {                       
            xmlreader = writer.Write(point);
            document = new XmlDocument();
            document.Load(xmlreader);
            Write(document.InnerXml);
            result = reader.Read(document);
            Debug.Assert(point.Equals(result), "ERROR!");

			//string gml = document.InnerXml;
			//gml = gml.Replace("gml:", "");
			//result = reader.Read(gml);
            
            xmlreader = writer.Write(line);
            document = new XmlDocument();
            document.Load(xmlreader);
            Write(document.InnerXml);
            result = reader.Read(document);
            Debug.Assert(line.Equals(result), "ERROR!");
            
            xmlreader = writer.Write(polygon);
            document = new XmlDocument();
            document.Load(xmlreader);
            Write(document.InnerXml);
            result = reader.Read(document);
            Debug.Assert(polygon.Equals(result), "ERROR!");
            
            xmlreader = writer.Write(multiPoint);
            document = new XmlDocument();
            document.Load(xmlreader);
            Write(document);
            result = reader.Read(document);
            Debug.Assert(multiPoint.Equals(result), "ERROR!");
            
            MultiLineString multiLineString = new WKTReader().Read("MULTILINESTRING ((10 10, 20 20), (30 30, 40 40, 50 50, 70 80, 990 210), (2000.1 22, 457891.2334 3456.2, 33333 44444))") as MultiLineString;
            xmlreader = writer.Write(multiLineString);            
            document = new XmlDocument();
            document.Load(xmlreader);
            Write(document.InnerXml);
            result = reader.Read(document);
            Debug.Assert(multiLineString.Equals(result), "ERROR!");
            
            MultiPolygon multiPolygon = new WKTReader().Read("MULTIPOLYGON (((10 10, 10 20, 20 20, 20 10, 10 10), (12 12, 18 12, 18 18, 12 18, 12 12), (14 14, 16 14, 16 16, 14 16, 14 14)), ((30 30, 30 40, 40 40, 40 30, 30 30), (32 32, 38 32, 38 38, 32 38, 32 32)))") as MultiPolygon;
            xmlreader = writer.Write(multiPolygon);
            document = new XmlDocument();
            document.Load(xmlreader);
            Write(document.InnerXml);
            result = reader.Read(document);
            Debug.Assert(multiPolygon.Equals(result), "ERROR!");
            
            IGeometry[] geometries = new IGeometry[]  { point, line, polygon, multiPoint, multiLineString, multiPolygon, };
            IGeometryCollection geometryCollection = Factory.CreateGeometryCollection(geometries);
            xmlreader = writer.Write(geometryCollection);
            document = new XmlDocument();
            document.Load(xmlreader);
            Write(document.InnerXml);
            result = reader.Read(document);
            Debug.Assert(geometryCollection.Equals(result), "ERROR!");            
        }
        public XmlTestFactory(PrecisionModel pm)
		{
            m_objGeometryFactory = new GeometryFactory(pm);
            m_objReader = new WKTReader(m_objGeometryFactory);
        }
Exemple #23
0
        public void SimpleContainerTest()
        {
            const string wktPoint = @"POINT(-93.4224469 41.873883)";
            const string wktPolygon = @"POLYGON((-93.4252049042723 
        41.8704201522236,-93.4252045886767 41.8704218292759,-93.4251944663897 
        41.8704537436275,-93.4251912197049 41.8704751660195,-93.4251948772194 
        41.8704965513943,-93.4252023698805 41.8705187509512,-93.4252031837553 
        41.8705225189422,-93.4252013741425 41.8705260880256,-93.4251919984311 
        41.8705406212441,-93.4251846877274 41.870554964673,-93.4251807415669 
        41.8705700276367,-93.4251610235833 41.8707058897986,-93.4251612742548 
        41.8707269111328,-93.4252067472159 41.8709954862244,-93.4251863485251 
        41.8708750062709,-93.4251848466664 41.8708762908204,-93.4251814703271 
        41.8708798411836,-93.4251813748423 41.8708841964667,-93.425184280435 
        41.8709100287988,-93.4251831539811 41.8709319742527,-93.4251749552422 
        41.8709530635708,-93.4251616935005 41.870976184821,-93.4251599358149 
        41.8709804064762,-93.4251628997049 41.8709842327966,-93.4251895738534 
        41.8710116852033,-93.425193635959 41.8710150578611,-93.4251995752811 
        41.8710159992246,-93.4252074274666 41.8710166126567,-93.4252210606089 
        41.8720660100162,-93.4252205912993 41.8720720702808,-93.4251880495579 
        41.872265100336,-93.4251838686256 41.8722768053143,-93.4251045552961 
        41.8724184221462,-93.425098662675 41.8724265021885,-93.4248948199516 
        41.8726483991353,-93.4248890453106 41.8726537556485,-93.4247108452105 
        41.872795354139,-93.4247025228298 41.8728008485359,-93.4242909335975 
        41.873025633358,-93.4242856074445 41.873028716465,-93.4237160047944 
        41.8733779010074,-93.4237102611061 41.8733810175834,-93.4234195707745 
        41.8735199614456,-93.423415606449 41.87352170068,-93.4226517008991 
        41.8738281659771,-93.4226384031757 41.8738320598293,-93.422467020796 
        41.8738653386381,-93.4224582647299 41.8738665305927,-93.4224133086026 
        41.8738701102812,-93.4224097033486 41.8738619707344,-93.4224076078678 
        41.8738583702397,-93.4224028451526 41.8738567133354,-93.4218775515979 
        41.8737156048709,-93.4218731370963 41.8737146973482,-93.4218685889793 
        41.8737143041044,-93.42183119329 41.8737132261088,-93.4218256665677 
        41.8737134589251,-93.4218211788643 41.8737158810341,-93.4218001007567 
        41.8737297059474,-93.4217960676661 41.8737329518983,-93.4217952651938 
        41.8737373408247,-93.4217942243631 41.8737604067779,-93.4217918066286 
        41.8737755718807,-93.421785995501 41.8737902136688,-93.4217769580596 
        41.873803911162,-93.4217615185511 41.8738230308915,-93.4217591091977 
        41.873826795763,-93.4217609126713 41.8738307454565,-93.4217657528559 
        41.8738387225474,-93.4215861414162 41.8738038429246,-93.4215668071151 
        41.8738013223973,-93.4215471818151 41.8738011808854,-93.4209719837377 
        41.8738321311546,-93.4209688555411 41.8738322384827,-93.4204562370128 
        41.8738398552622,-93.420438200035 41.873841141465,-93.4203366269377 
        41.8738542016968,-93.4203154869866 41.8738584265833,-93.4200173195471 
        41.8739403294419,-93.4200126606169 41.8739412976035,-93.4200078537452 
        41.8739416914026,-93.4195734083426 41.8739508396298,-93.4195612437284 
        41.8739501702688,-93.4194534359162 41.8739359118352,-93.4194997454025 
        41.8738684456478,-93.4195017766702 41.8738646324802,-93.4194997296961 
        41.8738608240073,-93.4194796156393 41.8738317416152,-93.4194761174718 
        41.8738277865413,-93.4194754592426 41.8738273069659,-93.4194600947936 
        41.8738136428908,-93.4194487590572 41.8737981493136,-93.4194356266997 
        41.8738029920358,-93.4194135707879 41.8738075232658,-93.4193907666262 
        41.8738088580361,-93.4193680358109 41.8738069482571,-93.4193461972958 
        41.8738018627352,-93.4193370867838 41.8737990071934,-93.4193321892472 
        41.8738001860736,-93.4193124446989 41.8738064279494,-93.4193080470773 
        41.8738081560318,-93.4193046561677 41.8738108701041,-93.4192738907502 
        41.8738400565964,-93.4192574522145 41.8738528330795,-93.4192426928691 
        41.8738605075661,-93.4190969793893 41.8737751277868,-93.419091849215 
        41.873771753445,-93.4189266353222 41.8736499730052,-93.4189196964212 
        41.8736438527437,-93.4188370138157 41.8735561095034,-93.418832050838 
        41.873549810764,-93.4187558563283 41.8734321706269,-93.4187527629448 
        41.8734264123099,-93.4186918565983 41.873285647926,-93.418689179961 
        41.8732758226561,-93.4186756233146 41.8731622213312,-93.4186756502494 
        41.8731580506233,-93.4186767172506 41.8731539568197,-93.4188163739183 
        41.8727992253419,-93.4188172671282 41.8727971444236,-93.4190677627168 
        41.8722588330373,-93.4190695724474 41.8722557258512,-93.4190719897785 
        41.8722528588262,-93.4191626522209 41.8721615012424,-93.4191715324621 
        41.8721543360235,-93.4192813541089 41.8720831167264,-93.4192904398438 
        41.8720782525092,-93.4194208195845 41.8720213524179,-93.4194283335857 
        41.8720185782358,-93.4197783107842 41.8719113217688,-93.4197950399571 
        41.8719050183585,-93.419810259779 41.8718968530794,-93.4201961375966 
        41.8716537384591,-93.4202008601772 41.8716513135205,-93.4202065894559 
        41.8716512650148,-93.4202531112403 41.8716543016209,-93.4202588643003 
        41.8716551254288,-93.4202619959158 41.8716588254083,-93.4202759424096 
        41.8716797661855,-93.4202865742242 41.8716928203978,-93.4203000058353 
        41.8717043432108,-93.4203158505396 41.8717140028756,-93.4203453805483 
        41.8717290793642,-93.4203671305076 41.8717378857342,-93.4203908280343 
        41.8717431872122,-93.4204154746004 41.8717447604132,-93.4204400316884 
        41.871742539048,-93.4204634645511 41.8717366167172,-93.4204847858127 
        41.8717272429661,-93.4213430869941 41.8712550393925,-93.4213484257599 
        41.8712524167342,-93.4217696326327 41.8710686413585,-93.4217819675583 
        41.8710624681806,-93.4225011721807 41.8706524108576,-93.422504609009 
        41.8706505898104,-93.4228038745353 41.8705034953921,-93.4228114819352 
        41.8705003205078,-93.422918397479 41.8704630131536,-93.4229322313883 
        41.8704596406827,-93.4230372029452 41.8704442436142,-93.4230429813516 
        41.8704438272402,-93.4230487579878 41.8704442571176,-93.4232717005119 
        41.8704774993309,-93.4232990833298 41.870479194736,-93.423326268146 
        41.8704762096956,-93.4236253751133 41.8704167071638,-93.4236335610087 
        41.870415525385,-93.4238145318733 41.870399012684,-93.4238210224332 
        41.8703986850827,-93.4250122305449 41.8703867692288,-93.425015148263 
        41.8703867928497,-93.4251551243301 41.8703904614261,-93.4251614184953 
        41.8703911423719,-93.4251667433205 41.8703937415644,-93.4252015466182 
        41.8704150901537,-93.425205330148 41.8704178891504,-93.4252048259347 
        41.8704175161412,-93.4252049042723 41.8704201522236),(-93.4208870841416 
        41.8724356341242,-93.4204504898438 41.8724299995943,-93.4197024469119 
        41.8724199642879,-93.4196972546475 41.8724187961132,-93.4196353408064 
        41.8724000931151,-93.4196198291984 41.8723939248574,-93.4195982913747 
        41.8723872683468,-93.4195754419732 41.8723838351084,-93.419552135681 
        41.8723837535633,-93.4195292442755 41.8723870267617,-93.4195076240148 
        41.8723935322689,-93.4194880836107 41.8724030267448,-93.4194713539778 
        41.8724151550461,-93.4194580608944 41.8724294635104,-93.4194487015946 
        41.8724454169255,-93.4193439049526 41.8726846688587,-93.419395200573 
        41.8725675603701,-93.4193877396226 41.8725704665946,-93.4193659535056 
        41.8725753507093,-93.4193433275646 41.8725770881644,-93.4192665269722 
        41.8725775398523,-93.4192603524051 41.8725780679252,-93.4192550160649 
        41.8725804488741,-93.4192190574867 41.8726006370315,-93.4192151170512 
        41.8726033114076,-93.4192156301849 41.872607271081,-93.4192232672457 
        41.8726370206333,-93.4192253880039 41.8726562540265,-93.4192219780526 
        41.8726753835933,-93.4192108643559 41.8727093579771,-93.4192100703796 
        41.872713699906,-93.4192146768558 41.8727164111226,-93.4192461426288 
        41.8727312573426,-93.419265721321 41.8727427710309,-93.4192817140852 
        41.8727570476324,-93.419293437433 41.8727734770053,-93.4192988775902 
        41.8727874668423,-93.4191329059232 41.8731663820577,-93.4191276849472 
        41.8731843040893,-93.4191274300223 41.8732026450275,-93.4191321517247 
        41.8732206442571,-93.4191702773132 41.8733142152074,-93.4191837698745 
        41.8733361900205,-93.4192304374412 41.8733912269825,-93.419229433288 
        41.8733927666126,-93.4192166441372 41.8734057897667,-93.4191916566367 
        41.8734269561956,-93.4191884410569 41.8734302646578,-93.4191891480306 
        41.8734343196234,-93.419195806784 41.8734561337928,-93.419198813257 
        41.8734774597635,-93.4191949894282 41.8734987124909,-93.4191846527334 
        41.8735285946617,-93.4191838107888 41.8735324447607,-93.419187360553 
        41.8735353048818,-93.4192203304999 41.8735574436094,-93.4192256701439 
        41.8735602904165,-93.4192321341885 41.8735611213189,-93.4193540307386 
        41.8735664108143,-93.4193778314199 41.873569247953,-93.4194004007161 
        41.873575568208,-93.4194208358789 41.8735851187759,-93.4194383195221 
        41.8735975176438,-93.419452152316 41.8736122688698,-93.4194617809601 
        41.8736287824197,-93.4194668203147 41.8736463977674,-93.419466919936 
        41.8736470689857,-93.4194760195824 41.8736540390248,-93.4194759071328 
        41.8736541210325,-93.4194854774525 41.8736612293223,-93.4194983633347 
        41.8736753544259,-93.4195031993325 41.8736837086428,-93.4195144314412 
        41.8736793033788,-93.4195373507007 41.8736742891635,-93.4195611428728 
        41.873672751279,-93.4201248312579 41.8736782174628,-93.420130993152 
        41.8736777829684,-93.4201355791947 41.8736746765217,-93.4201613321703 
        41.873653059001,-93.4201648599462 41.8736494023375,-93.4201663231686 
        41.8736443629005,-93.4201675701888 41.8736361010465,-93.4201754671183 
        41.8736183283238,-93.4201881107788 41.8736021603025,-93.4202049545688 
        41.8735882959423,-93.4202147937897 41.8735829872061,-93.4202246929138 
        41.8735767894139,-93.4202477515228 41.8735595553436,-93.4202539726685 
        41.8735538890089,-93.4202705697844 41.873541468662,-93.4202900750461 
        41.8735316903226,-93.42031174756 41.8735249254134,-93.4203347641126 
        41.8735214308941,-93.4203582504382 41.8735213395012,-93.4203813144277 
        41.8735246547062,-93.4204030800139 41.8735312505837,-93.4204227204476 
        41.8735408765945,-93.4204394897012 41.8735531671021,-93.4204416745214 
        41.8735551153495,-93.4204463790795 41.87355790629,-93.4204902294489 
        41.8735789021067,-93.4204952204885 41.8735808182804,-93.4205008069311 
        41.8735812102933,-93.42301128543 41.8735781524808,-93.4230164520042 
        41.8735778092075,-93.4230214609996 41.8735768024597,-93.4230551245979 
        41.8735676262439,-93.4230602764925 41.8735657762103,-93.4230631849409 
        41.8735620987199,-93.4230755586795 41.8735422320505,-93.4230773564861 
        41.8735384904594,-93.4230762964724 41.8735345946511,-93.4230702913923 
        41.8735196377041,-93.4230659424137 41.8735036880736,-93.4230655053245 
        41.873487413881,-93.4230689943974 41.8734713466553,-93.4230779166186 
        41.873445380668,-93.4230787729028 41.8734411693134,-93.4230744727682 
        41.8734383736541,-93.4230327699652 41.873416340546,-93.4230275102874 
        41.8734141286126,-93.4230215060696 41.8734136726635,-93.4227615124581 
        41.8734139733128,-93.4228815784502 41.8733676687166,-93.4227806811426 
        41.8734065807266,-93.4230760445901 41.8734054630616,-93.4230813975882 
        41.8734050735237,-93.4230856826632 41.8734026442473,-93.4231152202784 
        41.8733824496982,-93.4231191123381 41.8733791851228,-93.4231185956998 
        41.8733748296328,-93.4231122312659 41.8733501568882,-93.4231100526547 
        41.8733328490405,-93.4231123633808 41.8733155507669,-93.4231190773581 
        41.8732989064876,-93.4231299444646 41.8732835362591,-93.4231445598611 
        41.8732700126745,-93.4231623790725 41.8732588395328,-93.4231827382722 
        41.8732504330711,-93.4232048790112 41.8732451064581,-93.4232279764732 
        41.8732430581278,-93.4234417042937 41.8732396317651,-93.4234476086901 
        41.8732390818086,-93.4234520058442 41.8732360858048,-93.4234780167991 
        41.87321432125,-93.4234813137245 41.873210957771,-93.4234805245035 
        41.8732068301756,-93.4234745982371 41.8731886299726,-93.4234713231299 
        41.8731717108147,-93.423472384232 41.873154633905,-93.4234777433134 
        41.8731380144445,-93.4234872073084 41.8731224511541,-93.4235004352714 
        41.8731085047051,-93.4235169506596 41.8730966775217,-93.4235361585012 
        41.8730873956807,-93.4235573668289 41.8730809935621,-93.4235798116086 
        41.8730777018034,-93.4236962916709 41.8730690794396,-93.4237020396927 
        41.8730682038061,-93.4237051107155 41.8730644681774,-93.4237182387602 
        41.8730440840845,-93.4237201066225 41.8730403450043,-93.4237190962689 
        41.8730364258915,-93.4237171113154 41.8730312981414,-93.4237127302435 
        41.8730132856517,-93.4237133129601 41.8729949831347,-93.4237188353853 
        41.872977146782,-93.4237290693494 41.8729605135243,-93.4237435920205 
        41.8729457705846,-93.4237618033748 41.8729335270843,-93.4237829509878 
        41.8729242888778,-93.4238061611212 41.8729184376519,-93.4238304748222 
        41.8729162151563,-93.4239589016107 41.8729143057101,-93.4239644127474 
        41.8729138378755,-93.4239697124109 41.8729126147705,-93.4240024065487 
        41.8729024930713,-93.4240082450175 41.872900067987,-93.4240120463081 
        41.8728959629666,-93.4240189960191 41.8728862451295,-93.4240210522714 
        41.8728826189639,-93.4240203216228 41.872878718604,-93.4240159142763 
        41.8728645928883,-93.4240128403466 41.8728473129274,-93.4240142776292 
        41.8728299140335,-93.4240201722822 41.8728130479413,-93.4240303034983 
        41.8727973464269,-93.424044291776 41.8727833976428,-93.4240616131358 
        41.8727717240869,-93.4240816187478 41.8727627630304,-93.4241035592354 
        41.8727568501392,-93.424126612746 41.8727542068996,-93.424194150818 
        41.8727514127599,-93.4241993529452 41.8727508479525,-93.4242039659304 
        41.8727489640076,-93.4242313352164 41.8727352956486,-93.4242364284873 
        41.8727320658399,-93.4242390852299 41.8727274854207,-93.4242434953501 
        41.8727166193551,-93.4242446584849 41.8727120682403,-93.4242423383631 
        41.872704805503,-93.4242378296534 41.8726913540726,-93.4242365521323 
        41.8726743495037,-93.4242395802857 41.8726574692006,-93.4242449117233 
        41.8726455509592,-93.4243511207047 41.8725880867061,-93.4243548976868 
        41.8725877695432,-93.4245533622779 41.8725852186763,-93.4245593705201 
        41.8725846696181,-93.424563805743 41.8725815909068,-93.4246012545241 
        41.8725495400984,-93.4246047050754 41.8725458729739,-93.4246033573454 
        41.872541504414,-93.4245965561398 41.8725267390515,-93.4245913478126 
        41.8725108892297,-93.4245900518579 41.8724945971345,-93.4245927108255 
        41.8724783977205,-93.4246003684798 41.8724519086947,-93.4246010066206 
        41.8724476550214,-93.4245965217194 41.8724449933004,-93.4245527485082 
        41.8724240244069,-93.4245477255838 41.8724220978964,-93.4245421031349 
        41.8724217155676,-93.4208870841416 41.8724356341242),(-93.4192557005874 
        41.8728860404338,-93.4192517738604 41.8728885030989,-93.4192316535636 
        41.8728968530734,-93.4192097763753 41.8729021920072,-93.4191869401851 
        41.8729043251824,-93.4191253031 41.8729056478384,-93.4191199570662 
        41.8729061329136,-93.4191157475125 41.872908643248,-93.4190819616882 
        41.8729329121701,-93.4190780625782 41.8729363783874,-93.4190789683006 
        41.8729408560156,-93.4190869620863 41.8729636645257,-93.4190908651678 
        41.8729844768383,-93.4190882090529 41.8730053986299,-93.4190785265384 
        41.8730390976159,-93.4190778951598 41.8730432567085,-93.419082185042 
        41.873045947512,-93.4191187757531 41.8730646433075,-93.4191372239398 
        41.8730762543055,-93.4191522091692 41.8730903784457,-93.4191607147421 
        41.8731028942059,-93.4192557005874 41.8728860404338),(-93.4242521428096 
        41.8709201736071,-93.4242514694803 41.8709158991529,-93.4242419330463 
        41.8708836377243,-93.4242391177842 41.8708624687927,-93.4242430236301 
        41.8708413968033,-93.4242502682079 41.8708207122768,-93.4242511455668 
        41.8708166935025,-93.4242481030991 41.8708133157374,-93.4242231384712 
        41.8707905606972,-93.4242187997491 41.8707873609043,-93.4242127703634 
        41.8707866931061,-93.4241346175012 41.8707842471854,-93.4241292922226 
        41.8707844435167,-93.4241248799971 41.8707866808148,-93.4240901075826 
        41.8708080103253,-93.424086375367 41.8708107626315,-93.4240870153 
        41.8708146521309,-93.4240958922729 41.8708452100554,-93.424098597497 
        41.8708666023168,-93.4240944464083 41.8708878647417,-93.4240867278873 
        41.8709091675878,-93.4240858021456 41.8709132154711,-93.4240888683084 
        41.8709166231094,-93.4241143452632 41.8709398262683,-93.4241184670278 
        41.870942895316,-93.4241241878441 41.8709436868213,-93.4241735344762 
        41.8709467536389,-93.4241854172703 41.8709466109134,-93.4242151203326 
        41.870944044338,-93.4242214818433 41.8709429467027,-93.4242265830706 
        41.8709399011627,-93.4242485006204 41.8709235072776,-93.4242521428096 
        41.8709201736071))";

            var reader = new WKTReader();

            var point = reader.Read(wktPoint);
            Assert.IsTrue(point.IsValid);

            var polygon = reader.Read(wktPolygon);
            Assert.IsFalse(polygon.IsValid);

            var fixedPol = polygon.Buffer(0);
            Assert.IsTrue(fixedPol.IsValid);

            var result = fixedPol.Contains(point);
            Assert.IsFalse(result);
        }
Exemple #24
0
        public void IsPointInRingTest()
        {
            const string wkt1 =
                @"LINESTRING(159084.138183715 215384.465334836,159085.255551952 
215382.299118879,159084.287081382 215380.125720536,159081.909029527 
215380.063184668,159080.685184241 215382.030015885,159081.870080819 
215384.260803017,159084.138183715 215384.465334836)";
            const string wkt2 =
                @"LINESTRING(159081.417 215432.901,159081.484 215412.286,159069.343 
215411.729,159063.929 215411.79,159063.765 215441.011,159055.84 
215440.909,159055.756 215439.794,159050.254 215439.759,159050.231 
215426.571,159029.91 215426.438,159029.894 215420.862,159028.749 
215420.841,159028.787 215412.904,159050.376 215412.995,159050.394 
215404.475,159051.839 215404.512,159051.721 215397.907,159050.448 
215397.876,159050.48 215385.756,159037.29 215385.669,159037.274 
215380.139,159036.129 215380.118,159036.18 215372.161,159050.58 
215372.256,159050.641 215357.846,159061.806 215357.884,159061.764 
215355.578,159063.703 215355.583,159063.834 215344.331,159062.797 
215344.264,159062.878 215338.481,159063.885 215338.48,159063.94 
215333.569,159062.002 215333.52,159062.061 215329.565,159063.973 
215329.565,159064.019 215324.529,159063.008 215324.569,159062.948 
215318.85,159064.078 215318.847,159064.229 215304.453,159074.999 
215304.543,159074.895 215315.988,159082.789 215316.117,159082.751291265 
215325.067329746,159076.257853729 215325.010585012,159076.145672787 
215330.246673065,159077.726943351 215330.292687136,159077.64265916 
215336.096838446,159075.46670601 215336.028874838,159075.17015073 
215349.460814847,159091.770139291 215349.583804507,159091.835913025 
215356.268745225,159114.649 215356.642,159114.529 215396.632,159109.671 
215396.625,159109.501 215398.902,159112.021 215398.92,159111.982 
215404.407,159112.999 215404.421,159113.001 215412.415,159095.019 
215412.366,159094.928 215434.091,159086.987 215433.984,159086.928 
215432.972,159081.417 215432.901)";
            const string wkt3 = @"LINESTRING(159063.929280482 215399.247659686,159103.333615111 
215398.947801304,159103.342074891 215397.380179598,159101.054815857 
215397.403687265,159101.283398228 215370.145108237,159064.458615271 
215370.009119945,159063.929280482 215399.247659686)";

            var reader = new WKTReader(GeometryFactory.Fixed);
            var wkts = new[] { wkt1, wkt2, wkt3,};            
            var polygonizer = new Polygonizer();
            foreach (var wkt in wkts)
            {
                var geom = (ILineString) reader.Read(wkt);
                Assert.IsNotNull(geom);
                Assert.IsTrue(geom.IsValid);
                Assert.AreEqual(geom.Factory.PrecisionModel, GeometryFactory.Fixed.PrecisionModel);
                polygonizer.Add(geom);
            }

            ICollection polys = polygonizer.Polygons;
            Console.WriteLine("Polygons formed (" + polys.Count + "):");
            foreach (var obj in polys)
            {
                Assert.IsNotNull(obj);
                Console.WriteLine(obj);
            }
        }
        public void FailedUnionTest()
        {            
            string s1 = "MULTIPOLYGON(((267225 195936,267063 195904,266895 195872,266825 195858,266822 195891,266850 196044,266934 196203,267047 196249,267352 196374,267281 196302,267255 196275,267222 196244,267166 196191,267160 196153,267157 196139,267196 196136,267225 195936)),((265704 193056,265703 193055,265692 193057,265678 193060,265663 193056,265659 193055,265655 193053,265653 193053,265651 193052,265648 193052,265646 193052,265631 193058,265616 193064,265612 193066,265609 193068,265605 193071,265603 193076,265595 193089,265596 193103,265597 193107,265623 193128,265631 193130,265630 193130,265609 193142,265608 193153,265608 193157,265607 193161,265607 193163,265606 193164,265603 193169,265619 193172,265623 193173,265619 193183,265618 193185,265618 193187,265613 193209,265618 193209,265622 193209,265620 193220,265626 193220,265626 193230,265617 193230,265616 193235,265616 193237,265615 193238,265604 193252,265606 193257,265607 193259,265607 193262,265607 193264,265607 193266,265607 193270,265607 193274,265607 193279,265606 193284,265605 193289,265602 193294,265595 193312,265598 193318,265600 193322,265601 193326,265602 193330,265602 193334,265602 193336,265602 193337,265599 193344,265610 193360,265611 193361,265612 193364,265613 193369,265615 193375,265615 193377,265615 193380,265613 193393,265609 193392,265607 193392,265605 193393,265587 193403,265588 193412,265589 193419,265610 193422,265629 193424,265631 193418,265633 193409,265637 193402,265642 193392,265659 193409,265661 193410,265662 193414,265662 193416,265663 193418,265664 193419,265664 193420,265665 193422,265665 193424,265666 193426,265666 193428,265665 193452,265657 193455,265652 193457,265640 193441,265636 193435,265623 193444,265642 193493,265645 193490,265649 193487,265665 193513,265673 193526,265681 193532,265683 193534,265684 193536,265685 193540,265686 193544,265687 193545,265687 193546,265690 193576,265682 193584,265655 193612,265667 193624,265668 193624,265670 193627,265679 193624,265683 193623,265693 193623,265692 193632,265692 193633,265693 193635,265695 193642,265693 193642,265692 193643,265691 193644,265690 193644,265689 193644,265679 193645,265679 193655,265678 193655,265677 193673,265676 193682,265670 193684,265659 193688,265654 193700,265652 193704,265631 193701,265629 193701,265628 193703,265619 193718,265617 193718,265616 193709,265612 193683,265614 193678,265609 193678,265571 193681,265551 193657,265495 193716,265492 193726,265481 193765,265481 193774,265480 193846,265479 193902,265478 193936,265526 193966,265563 193990,265548 194006,265547 194006,265546 194005,265544 194004,265543 194003,265542 194003,265541 194002,265540 194002,265540 194003,265521 194040,265525 194046,265527 194049,265527 194050,265528 194059,265528 194061,265543 194059,265544 194059,265544 194060,265549 194064,265554 194068,265555 194070,265557 194073,265558 194073,265558 194074,265559 194077,265561 194079,265564 194084,265567 194088,265568 194090,265570 194090,265581 194093,265569 194117,265567 194120,265567 194124,265567 194125,265568 194126,265569 194127,265569 194128,265570 194129,265571 194130,265572 194131,265573 194132,265574 194133,265575 194134,265576 194134,265577 194135,265596 194153,265583 194158,265540 194205,265530 194216,265473 194277,265462 194289,265461 194290,265451 194299,265432 194314,265410 194332,265394 194348,265372 194370,265371 194369,265359 194355,265362 194353,265362 194352,265367 194342,265342 194356,265341 194357,265340 194358,265339 194358,265338 194359,265337 194360,265336 194361,265335 194362,265335 194363,265334 194363,265333 194364,265332 194365,265331 194366,265330 194367,265325 194347,265308 194363,265302 194369,265326 194391,265308 194398,265306 194400,265304 194401,265303 194402,265302 194402,265301 194402,265300 194402,265294 194402,265288 194404,265286 194404,265286 194405,265285 194406,265284 194407,265283 194408,265282 194409,265282 194410,265281 194411,265280 194412,265279 194413,265278 194414,265277 194415,265276 194416,265275 194418,265275 194419,265274 194420,265273 194421,265272 194422,265272 194423,265271 194424,265270 194425,265269 194426,265268 194428,265268 194429,265267 194430,265266 194431,265266 194432,265265 194433,265264 194434,265263 194435,265262 194435,265261 194436,265260 194438,265258 194438,265253 194438,265254 194450,265254 194452,265253 194453,265252 194454,265251 194455,265243 194464,265234 194454,265238 194471,265238 194473,265237 194473,265235 194475,265234 194476,265232 194477,265231 194478,265230 194478,265229 194478,265228 194477,265227 194477,265226 194476,265225 194475,265224 194474,265224 194473,265223 194472,265222 194472,265222 194471,265221 194470,265220 194469,265217 194466,265216 194465,265166 194437,265165 194447,265164 194476,265158 194508,265158 194511,265173 194549,265176 194555,265199 194612,265205 194606,265214 194603,265238 194592,265244 194601,265246 194605,265257 194601,265263 194598,265265 194598,265266 194599,265268 194601,265270 194602,265272 194604,265274 194604,265278 194605,265281 194605,265282 194605,265283 194605,265292 194603,265290 194595,265284 194577,265320 194599,265336 194580,265351 194590,265302 194548,265300 194546,265298 194545,265295 194542,265295 194541,265298 194536,265285 194522,265285 194521,265284 194520,265283 194519,265282 194518,265281 194517,265280 194516,265279 194514,265279 194512,265247 194500,265262 194484,265277 194470,265278 194469,265287 194460,265304 194444,265306 194442,265325 194424,265330 194429,265370 194431,265371 194430,265372 194429,265374 194428,265376 194427,265377 194426,265378 194425,265379 194425,265380 194424,265381 194423,265382 194423,265383 194422,265384 194421,265385 194420,265386 194419,265387 194419,265388 194418,265389 194417,265390 194417,265390 194416,265391 194415,265392 194415,265393 194414,265395 194413,265396 194412,265398 194411,265399 194409,265401 194408,265402 194407,265403 194406,265404 194405,265405 194405,265406 194404,265407 194403,265408 194402,265409 194402,265410 194401,265411 194400,265412 194399,265413 194398,265414 194398,265414 194397,265416 194396,265417 194396,265418 194395,265419 194394,265420 194393,265421 194393,265422 194392,265423 194391,265424 194390,265425 194390,265426 194389,265427 194388,265428 194387,265429 194387,265430 194386,265431 194385,265432 194384,265433 194383,265434 194383,265435 194382,265436 194381,265437 194381,265438 194380,265439 194379,265440 194379,265441 194378,265442 194377,265443 194376,265444 194376,265445 194375,265446 194374,265447 194373,265448 194373,265448 194372,265449 194371,265450 194370,265451 194370,265451 194368,265453 194363,265466 194371,265467 194372,265467 194373,265468 194374,265469 194375,265469 194376,265470 194377,265471 194378,265471 194379,265471 194380,265469 194381,265469 194382,265468 194382,265466 194384,265462 194386,265425 194414,265430 194411,265430 194410,265428 194412,265433 194418,265448 194406,265463 194421,265464 194421,265465 194421,265466 194421,265467 194422,265487 194442,265507 194463,265548 194465,265548 194473,265578 194475,265578 194477,265579 194477,265602 194498,265595 194503,265594 194505,265593 194507,265592 194510,265590 194513,265590 194514,265589 194515,265589 194516,265589 194517,265588 194518,265587 194520,265587 194521,265586 194523,265585 194525,265585 194526,265582 194536,265579 194545,265578 194547,265577 194548,265576 194550,265575 194552,265574 194553,265573 194555,265572 194556,265571 194557,265570 194558,265570 194560,265569 194561,265569 194562,265568 194563,265568 194565,265567 194566,265566 194569,265565 194572,265565 194574,265564 194575,265562 194579,265560 194583,265559 194585,265557 194588,265557 194590,265556 194591,265555 194592,265555 194593,265554 194594,265553 194596,265553 194597,265552 194598,265552 194599,265551 194601,265551 194602,265550 194603,265549 194605,265548 194606,265548 194607,265548 194609,265547 194623,265538 194624,265508 194628,265508 194629,265501 194629,265461 194633,265456 194639,265458 194655,265462 194682,265463 194689,265491 194705,265527 194725,265534 194729,265561 194745,265575 194752,265589 194755,265593 194755,265598 194755,265603 194755,265607 194752,265630 194734,265651 194712,265652 194710,265654 194708,265656 194707,265657 194705,265658 194704,265658 194703,265659 194702,265659 194701,265659 194700,265659 194698,265660 194697,265660 194696,265663 194693,265666 194689,265666 194688,265666 194686,265666 194683,265666 194678,265666 194677,265667 194676,265671 194671,265675 194667,265678 194663,265682 194660,265689 194653,265698 194650,265714 194645,265700 194593,265699 194589,265701 194586,265704 194583,265706 194580,265711 194573,265716 194567,265724 194559,265730 194551,265734 194547,265737 194543,265739 194539,265742 194535,265747 194528,265749 194519,265752 194507,265754 194495,265755 194490,265757 194486,265769 194467,265779 194448,265780 194447,265780 194445,265780 194444,265780 194443,265780 194442,265780 194441,265779 194440,265779 194439,265779 194437,265779 194436,265780 194435,265780 194434,265779 194433,265780 194431,265780 194430,265779 194429,265779 194428,265779 194427,265779 194426,265779 194424,265779 194423,265779 194422,265778 194421,265778 194419,265777 194418,265777 194417,265777 194416,265777 194414,265777 194413,265777 194411,265777 194410,265777 194409,265778 194408,265784 194399,265791 194390,265791 194389,265791 194388,265790 194387,265790 194386,265790 194385,265789 194384,265789 194383,265789 194381,265788 194380,265788 194379,265788 194378,265787 194376,265787 194375,265787 194374,265786 194373,265786 194372,265786 194371,265786 194370,265785 194364,265785 194358,265785 194357,265785 194356,265784 194355,265784 194353,265784 194352,265783 194351,265783 194350,265783 194348,265782 194347,265782 194346,265782 194341,265783 194336,265783 194335,265783 194334,265783 194332,265783 194331,265783 194330,265784 194328,265784 194327,265785 194326,265785 194325,265786 194323,265787 194321,265788 194319,265788 194318,265787 194318,265785 194317,265785 194318,265775 194318,265775 194313,265768 194310,265748 194302,265754 194293,265761 194282,265765 194272,265773 194252,265780 194235,265781 194231,265780 194230,265778 194225,265775 194219,265775 194218,265775 194216,265774 194215,265774 194213,265770 194202,265767 194190,265767 194189,265767 194187,265768 194181,265802 194173,265813 194153,265814 194148,265834 194139,265836 194138,265838 194136,265840 194135,265841 194135,265842 194134,265843 194133,265845 194132,265847 194130,265848 194130,265849 194129,265850 194129,265851 194128,265852 194127,265853 194127,265854 194126,265857 194121,265858 194115,265859 194113,265860 194110,265860 194108,265862 194107,265876 194093,265869 194090,265868 194089,265868 194088,265867 194087,265867 194085,265866 194084,265866 194083,265866 194082,265865 194081,265865 194079,265865 194078,265864 194077,265864 194076,265864 194075,265863 194073,265863 194071,265862 194069,265862 194068,265861 194068,265849 194059,265853 194017,265853 194016,265852 194014,265852 194013,265852 194011,265851 194010,265851 194009,265851 194008,265850 194007,265849 194004,265848 194002,265848 194000,265847 193997,265845 193992,265845 193991,265845 193989,265853 193957,265844 193964,265806 193997,265780 194074,265743 193975,265748 193972,265748 193971,265746 193968,265740 193965,265731 193960,265727 193957,265732 193952,265733 193950,265734 193948,265735 193947,265734 193946,265734 193944,265734 193943,265734 193942,265734 193940,265734 193939,265734 193938,265734 193936,265734 193935,265734 193934,265733 193932,265733 193930,265732 193928,265726 193922,265732 193902,265732 193900,265732 193897,265730 193879,265723 193879,265716 193879,265714 193873,265744 193875,265749 193874,265715 193833,265717 193832,265717 193824,265718 193817,265718 193816,265763 193761,265764 193762,265767 193773,265768 193780,265775 193785,265783 193791,265773 193814,265770 193821,265768 193829,265766 193839,265762 193848,265759 193856,265758 193862,265758 193872,265763 193881,265768 193889,265781 193866,265790 193850,265794 193845,265840 193774,265837 193806,265837 193809,265831 193827,265860 193838,265882 193774,265905 193718,266059 193881,266139 193966,266196 193861,266170 193795,266180 193724,266194 193619,266209 193557,266221 193508,266225 193492,266224 193475,266222 193325,266223 193318,266225 193297,266227 193280,266228 193266,266234 193210,266137 193221,266121 193247,266068 193233,266066 193191,266066 193188,266064 193152,266039 193057,266035 193043,266025 192991,266019 192991,266019 192981,266023 192981,266021 192972,265989 192940,266005 192938,266006 192953,266064 192989,266071 192986,266087 192979,266104 192977,266228 192963,266223 192995,266219 193016,266270 193017,266400 192817,266413 192797,266561 192570,266615 192536,266620 192553,266632 192599,266607 192635,266547 192722,266661 192907,266693 192959,266872 192896,266899 192887,266926 192889,266972 192892,266968 192741,266967 192695,266871 192667,266737 192629,266764 192622,266727 192409,266717 192352,266808 192287,266885 192231,266873 192268,266868 192283,266894 192340,266987 192540,267003 192550,267304 192739,267285 192641,267270 192566,266933 192196,266928 192191,266906 192166,266889 192142,266873 192118,266813 192175,266797 192190,266763 192137,266358 192253,266369 192237,266370 192235,266367 192235,266296 192224,266281 192203,266023 191829,266016 191826,266005 191816,266002 191816,265998 191816,265991 191822,265991 191829,265991 191834,265989 191839,265987 191844,265983 191847,265980 191850,265976 191851,265974 191852,265969 191850,265969 191842,265967 191837,265966 191834,265964 191831,265960 191827,265958 191826,265950 191829,265949 191862,265932 191858,265932 191853,265931 191849,265929 191845,265925 191841,265922 191838,265899 191861,265888 191860,265886 191858,265883 191854,265881 191850,265880 191847,265879 191840,265866 191833,265859 191846,265852 191842,265846 191839,265840 191837,265838 191837,265837 191839,265835 191844,265834 191850,265835 191858,265834 191859,265831 191862,265828 191864,265825 191864,265821 191864,265818 191862,265802 191848,265800 191847,265796 191847,265790 191847,265785 191849,265768 191855,265765 191856,265761 191855,265755 191852,265742 191848,265739 191834,265725 191801,265720 191793,265715 191789,265709 191785,265705 191783,265696 191780,265684 191778,265681 191779,265680 191780,265679 191782,265679 191784,265683 191799,265681 191831,265677 191841,265663 191836,265652 191833,265648 191836,265643 191839,265638 191840,265632 191839,265631 191838,265629 191821,265626 191817,265624 191818,265623 191818,265620 191825,265618 191834,265615 191841,265612 191848,265608 191854,265603 191859,265597 191864,265592 191868,265589 191869,265586 191869,265579 191868,265575 191868,265567 191865,265559 191865,265556 191865,265552 191867,265548 191870,265543 191876,265537 191874,265533 191873,265528 191873,265523 191874,265515 191877,265491 191878,265479 191881,265468 191886,265456 191883,265445 191877,265413 191877,265399 191875,265389 191874,265372 191875,265360 191874,265334 191870,265329 191869,265398 192004,265565 192332,265564 192333,265557 192337,265556 192341,265555 192343,265555 192344,265556 192345,265559 192363,265563 192381,265564 192384,265565 192386,265580 192409,265596 192429,265599 192432,265603 192434,265610 192436,265616 192438,265621 192440,265626 192442,265648 192448,265670 192455,265673 192456,265676 192457,265679 192458,265682 192460,265694 192468,265708 192475,265717 192479,265726 192483,265729 192484,265731 192485,265734 192487,265738 192488,265748 192491,265759 192494,265772 192498,265784 192504,265807 192515,265824 192531,265847 192551,265855 192574,265865 192601,265864 192627,265864 192659,265802 192646,265842 192760,265835 192794,265823 192853,265779 192863,265804 192879,265823 192892,265812 192890,265808 192890,265807 192890,265806 192891,265805 192892,265803 192900,265801 192908,265800 192916,265800 192924,265800 192927,265772 192935,265767 192936,265765 192936,265764 192931,265761 192923,265760 192923,265757 192924,265756 192923,265729 192905,265724 192909,265715 192914,265704 192914,265698 192914,265698 192916,265695 192916,265687 192942,265704 192951,265719 192954,265715 192957,265710 192960,265706 192962,265706 192974,265707 192976,265705 192978,265704 192979,265704 192981,265701 192987,265698 192994,265695 192994,265691 192993,265687 192994,265680 192994,265677 193008,265676 193010,265685 193012,265712 193020,265712 193017,265713 193015,265711 193012,265711 193010,265726 193011,265725 193038,265721 193041,265704 193056),(265681 194364,265681 194367,265671 194367,265671 194358,265671 194357,265681 194357,265681 194364),(265672 194259,265672 194252,265682 194252,265682 194261,265682 194262,265672 194262,265672 194259),(265660 194241,265669 194241,265669 194251,265659 194251,265659 194249,265659 194241,265660 194241),(265730 193180,265761 193187,265770 193167,265773 193196,265778 193238,265780 193284,265780 193290,265781 193296,265781 193300,265781 193305,265781 193310,265781 193315,265737 193357,265704 193365,265692 193357,265689 193334,265698 193344,265699 193335,265701 193319,265703 193305,265718 193219,265723 193191,265728 193192,265730 193180),(265829 193249,265833 193249,265833 193259,265828 193259,265823 193259,265823 193250,265823 193249,265829 193249),(265892 193510,265906 193514,266004 193467,265951 193602,265890 193576,265899 193549,265892 193510),(266286 192856,266219 192756,266168 192757,266168 192748,266169 192722,266220 192689,266281 192648,266286 192670,266318 192815,266290 192850,266286 192856),(266044 192606,266037 192606,266037 192596,266047 192596,266047 192603,266047 192606,266044 192606),(266039 192790,266039 192800,266029 192800,266029 192790,266037 192790,266039 192790),(265749 192996,265749 192986,265759 192986,265759 192996,265749 192996),(265848 192834,265848 192824,265858 192824,265858 192834,265848 192834),(265978 192980,265978 192970,265988 192970,265988 192980,265978 192980),(266088 192809,266088 192813,266080 192813,266078 192813,266078 192803,266088 192803,266088 192809),(265981 192800,265981 192790,265991 192790,265991 192800,265981 192800),(265951 192844,265951 192834,265961 192834,265961 192844,265951 192844),(265917 193026,265917 193016,265927 193016,265927 193026,265917 193026),(265926 193055,265926 193045,265936 193045,265936 193055,265926 193055),(265966 192746,265966 192736,265976 192736,265976 192746,265966 192746),(266046 192708,266046 192698,266056 192698,266056 192708,266046 192708),(265692 193744,265687 193751,265684 193755,265682 193756,265667 193763,265635 193732,265630 193728,265650 193718,265652 193717,265662 193716,265673 193718,265676 193718,265679 193718,265681 193718,265682 193719,265683 193723,265687 193723,265687 193733,265692 193744),(265611 193820,265611 193810,265621 193810,265621 193820,265611 193820),(265731 193735,265731 193725,265741 193725,265741 193735,265731 193735),(265708 193562,265708 193552,265718 193552,265718 193562,265708 193562),(265650 193477,265640 193477,265640 193467,265648 193467,265650 193467,265650 193477),(265680 193109,265680 193099,265690 193099,265690 193109,265680 193109),(265611 193335,265611 193325,265621 193325,265621 193335,265611 193335),(265610 194005,265610 193995,265620 193995,265620 194005,265610 194005),(265570 193944,265570 193934,265580 193934,265580 193944,265570 193944),(265643 193872,265643 193862,265653 193862,265653 193872,265643 193872),(265909 193141,265909 193131,265919 193131,265919 193141,265909 193141),(265800 193015,265800 193005,265810 193005,265810 193015,265800 193015),(265728 194212,265728 194202,265738 194202,265738 194212,265728 194212),(265691 194370,265691 194360,265701 194360,265701 194370,265691 194370)),((265057 193097,265050 193096,265044 193093,265043 193093,265041 193093,265038 193093,265037 193093,265035 193093,265029 193092,265031 193093,265035 193094,265060 193099,265076 193103,265058 193097,265057 193097)),((265246 193239,265266 193230,265268 193230,265279 193209,265282 193211,265281 193210,265290 193199,265273 193188,265269 193196,265260 193213,265249 193234,265246 193239)),((265525 192957,265525 192962,265524 192965,265526 192968,265530 192975,265533 192983,265536 192990,265540 192993,265562 193014,265575 193011,265609 193004,265606 192991,265602 192978,265607 192966,265613 192953,265573 192946,265533 192939,265527 192954,265525 192957)),((265345 192929,265348 192937,265349 192941,265371 192945,265372 192945,265373 192938,265374 192935,265374 192934,265364 192919,265363 192920,265345 192929)))";
            string s2 = "POLYGON((265433 194418,265428 194412,265430 194410,265430 194411,265425 194414,265462 194386,265466 194384,265468 194382,265469 194382,265469 194381,265471 194380,265471 194379,265471 194378,265470 194377,265469 194376,265469 194375,265468 194374,265467 194373,265467 194372,265466 194371,265453 194363,265451 194368,265451 194370,265450 194370,265449 194371,265448 194372,265448 194373,265447 194373,265446 194374,265445 194375,265444 194376,265443 194376,265442 194377,265441 194378,265440 194379,265439 194379,265438 194380,265437 194381,265436 194381,265435 194382,265434 194383,265433 194383,265432 194384,265431 194385,265430 194386,265429 194387,265428 194387,265427 194388,265426 194389,265425 194390,265424 194390,265423 194391,265422 194392,265421 194393,265420 194393,265419 194394,265418 194395,265417 194396,265416 194396,265414 194397,265414 194398,265413 194398,265412 194399,265411 194400,265410 194401,265409 194402,265408 194402,265407 194403,265406 194404,265405 194405,265404 194405,265403 194406,265402 194407,265402 194407,265401 194408,265399 194409,265398 194411,265396 194412,265395 194413,265393 194414,265392 194415,265391 194415,265390 194416,265390 194417,265389 194417,265388 194418,265387 194419,265386 194419,265385 194420,265384 194421,265383 194422,265382 194423,265381 194423,265380 194424,265379 194425,265378 194425,265377 194426,265376 194427,265374 194428,265372 194429,265371 194430,265370 194431,265330 194429,265369 194467,265379 194477,265422 194481,265427 194484,265433 194488,265467 194515,265469 194508,265487 194442,265467 194422,265466 194421,265465 194421,265464 194421,265463 194421,265448 194406,265433 194418))";

            WKTReader reader = new WKTReader(GeometryFactory.Fixed);
            Assert.IsNotNull(reader);
            
            IGeometry g1 = reader.Read(s1);
            Assert.IsNotNull(g1);

            IGeometry g2 = reader.Read(s2);
            Assert.IsNotNull(g2);

            IGeometry result = g1.Union(g2);
            Assert.IsNotNull(result);
            Debug.WriteLine(result);            
        }
Exemple #26
0
        public void FromXML(XmlReader reader)
        {
            if (reader.IsStartElement("Feature"))
            {
                reader.ReadStartElement("Feature");

                //Read the geometry
                if (reader.IsStartElement("Geometry"))
                {
                    reader.ReadStartElement("Geometry");
                    string wkt = reader.ReadString();
                    WKTReader wktReader = new WKTReader();
                    Shape = wktReader.Read(wkt);
                    reader.ReadEndElement();//Read [Geometry] end
                }

                //Read the attributes
                if (Attributes != null)
                {
                    Attributes.FromXML(reader);
                }
                else
                {
                    throw new NullReferenceException("Cannot read attribute values into feature. The [Attributes] property is NULL.");
                }

                reader.ReadEndElement();//Read [Feature] end
            }
        }
 public void Normalize()
 {
     var polygon =
         new WKTReader().Read(
             "POLYGON((2 -10,1.4 -7,3.4 -7,2.6 -3,0.6 -3,0 0,0 1,10 1,10 0,9 -5,8.6 -7,8 -10,2 -10))");
     var normal = GeometryHelper.NormalizeGeometry(polygon);
     
     Assert.AreEqual(polygon.Coordinates.Length-2,normal.Coordinates.Length);
 }
        public void NormalizeLineString()
        {
            var line =
                new WKTReader().Read(
                    "LINESTRING(10 10,5 5,0 0)");
            var normal = GeometryHelper.NormalizeGeometry(line);

            Assert.AreEqual(new[]{new Coordinate(10,10),new Coordinate(0,0)}, normal.Coordinates);
        }
		private void InitBlock()
		{
			reader = new WKTReader();
		}
Exemple #30
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="factory"></param>
 protected BaseSamples(IGeometryFactory factory, WKTReader reader)
 {
     this.factory = factory;
     this.reader = reader;
 }