Collection col1 = new Collection(); col1.Add(new DbfColumn("val", DbfColumnType.Integer, 1, 0)); ShapeFileFeatureLayer.CreateShapeFile(ThinkGeo.MapSuite.Core.ShapeFileType.Polyline, @"c:\tmp\test.shp", col1, Encoding.Default, OverwriteMode.Overwrite); ShapeFileFeatureSource featureSource1 = new ShapeFileFeatureSource(@"c:\tmp\test.shp", ShapeFileReadWriteMode.ReadWrite); MultilineShape ml1 = new MultilineShape("MULTILINESTRING((-12 226.57984,-11 226.271314285714,-10 226.211022222222,-9 226.263563636364,-8 226.2416,-7 226.2416,-6 226.263563636364,-5 226.322133333333,-4 226.6124,-3.37984000000006 227,-3 227.271314285714,-2 227.842742857143,-1.63306666666686 228,-1 228.2374,0 228.271314285714,1 228.128457142857,1.44959999999987 228,2 227.877688888889,3 227.766577777778,4 227.877688888889,4.36693333333314 228,5 228.9496,5.02520000000004 229,5.22015999999985 230,6 230.9748,6.01680000000003 231,7 231.9832,7.01680000000003 232,7.68346666666669 233,7.62015999999994 234,7 234.62016,6.52520000000004 235,6 235.2626,5 235.677866666667,4 235.900088888889,3 235.81008,2 235.645527272727,1 235.5084,0 235.2584,-1 235.091733333333,-2 235.007753846154,-2.10080000000025 235,-3 234.850133333334,-4 234.850133333334,-5 234.728685714286,-6 234.5126,-7 234.122311111111,-7.22015999999985 234,-8 233.442971428571,-8.62015999999994 233,-9 232.728685714286,-10 232.0126,-10.0252 232,-11 231.566755555556,-12 231.11008,-12.1834666666666 231,-13 230.183466666667,-13.1572571428571 230,-13.5168 229,-13.2751999999999 228,-13 227.4496,-12.700266666667 227,-12 226.57984))"); MultilineShape ml2 = new MultilineShape("MULTILINESTRING((-27 217.4496,-26 217.299733333333,-25 217.4748,-24 217.4748,-23 217.816533333333,-22.7248000000001 218,-22 218.57984,-21.4747999999998 219,-21 219.271314285714,-20 219.877688888889,-19.8165333333334 220,-19 220.48992,-18.1498666666667 221,-18 221.099911111111,-17 221.718109090909,-16.3798399999999 222,-16 222.135657142857,-15 222.5562,-14 222.9944,-13.98992 223,-13 223.47139047619,-12 223.875968,-11.6124 224,-11 224.188430769231,-10 224.410317241379,-9 224.49664,-8 224.479282758621,-7 224.315968,-6 224.042819047619,-5.87154285714284 224,-5 223.59328,-4 223.207085714286,-3 223.135657142857,-2 223.172654545454,-1 223.433244444444,0 223.8624,0.275199999999907 224,1 224.263563636364,2 224.536290909091,3 224.718109090909,4 224.899927272727,4.27519999999991 225,5 225.1812,6 225.526613333333,7 225.9312,7.2201599999999 226,8 226.205221052632,9 226.39496,10 226.51900952381,11 226.59496,12 226.772177777778,13 226.994070588235,13.0144 227,14 227.6272,14.4556444444445 228,15 228.6124,15.3445333333333 229,16 229.9832,16.0126 230,16.4429714285714 231,16.8715428571428 232,17 232.17984,17.5858285714287 233,18 233.4832,18.6201600000001 234,19 234.9496,19.0336000000001 235,19 235.0144,18 235.2626,17 235.41008,16 235.463709090909,15 235.61008,14 235.736436363636,13.0336000000001 236,13 236.0072,12 236.1938,11 236.417694117647,10 236.672266666667,9.01680000000003 237,9 237.004581818182,8 237.385752380952,7 237.838933333333,6.71008000000006 238,6 238.473386666667,5.12231111111105 239,5 239.084676923077,4 239.425066666667,3 239.425066666667,2 239.007753846154,1.98739999999998 239,1 238.341733333333,0.316533333333181 238,0 237.8813,-1 237.616711111111,-2 237.5056,-3 237.478989473684,-4 237.5056,-5 237.450044444444,-6 237.338933333333,-7 237.116711111111,-7.30011428571435 237,-8 236.711811764706,-9 236.241223529412,-9.45564444444452 236,-10 235.673386666667,-11 235.0688,-11.1100799999999 235,-12 234.40672,-12.7626000000001 234,-13 233.864342857143,-14 233.2563,-14.4556444444445 233,-15 232.623138461538,-15.8100800000001 232,-16 231.827345454546,-16.91008 231,-17 230.918254545455,-18 230.084676923077,-18.1375999999999 230,-19 229.469292307692,-19.6778666666667 229,-20 228.71008,-20.7100800000001 228,-21 227.6376,-21.51008 227,-22 226.455644444445,-22.5126000000001 226,-23 225.566755555556,-23.8501333333333 225,-24 224.871542857143,-24.8715428571428 224,-25 223.82016,-25.5858285714287 223,-26 222.42016,-26.3501333333334 222,-26.7752 221,-27 220.1008,-27.02016 220,-27.0336000000001 219,-27.5503999999998 218,-27 217.4496))"); MultilineShape ml3 = new MultilineShape("MULTILINESTRING((-68 202.9856,-67 202.699885714286,-66 202.6124,-65 202.7374,-64 202.8624,-63 202.842742857143,-62 202.699885714286,-61 202.649866666667,-60 202.557028571428,-59 202.699885714286,-58 202.842742857143,-57 202.8624,-56 202.8624,-55 202.9874,-54 202.9874,-53 202.9856,-52 202.842742857143,-51 202.77984,-50 202.649866666667,-49 202.649866666667,-48 202.7248,-47 202.7248,-46 202.57984,-45 202.4832,-44 202.414171428571,-43 202.4832,-42 202.7248,-41 202.9748,-40.8991999999999 203,-40 203.149866666667,-39.1008000000001 203,-39 202.97984,-38 202.97984,-37.8991999999999 203,-37 203.2248,-36 203.7248,-35.4495999999999 204,-35 204.299733333333,-34 204.4748,-33 204.7248,-32.4495999999999 205,-32 205.4496,-31.4495999999999 206,-31 206.299733333333,-30 206.7248,-29 206.7248,-28 206.9748,-27.9495999999999 207,-27 207.633066666666,-26.4495999999999 208,-26 208.299733333333,-25 208.633066666666,-24 208.9664,-23.9748 209,-23.5798399999999 210,-23.17984 211,-23 211.299733333333,-22.5798399999999 212,-22 212.57984,-21.6998857142856 213,-21 213.97984,-20.98992 214,-20.48992 215,-20 215.699885714286,-19.7665777777777 216,-19 216.68992,-18.5570285714285 217,-18 217.38992,-17.1284571428571 218,-17 218.08992,-16 218.78992,-15.7373999999999 219,-15 219.536290909091,-14.2713142857142 220,-14 220.172654545454,-13 220.9888,-12.98992 221,-12 221.98992,-11.9908363636363 222,-11 222.605511111111,-10.1124 223,-10 223.031006896552,-9 223.103542857143,-8.27520000000011 223,-8 222.926613333333,-7 222.278514285714,-6.64552727272732 222,-6 221.526613333333,-5 221.052894117647,-4.82015999999999 221,-4 220.707085714286,-3 220.08992,-2.91007999999999 220,-2.85390769230775 219,-3 218.788977777778,-3.5462153846154 218,-4 217.2626,-4.13130000000004 217,-4 216.299733333333,-3.91007999999999 216,-3 215.349942857143,-2 215.259946666667,-1 215.5562,0 215.859946666667,1 215.9928,2 215.992246153846,3 215.921371428571,4 215.9312,4.55040000000007 216,5 216.059946666667,6 216.229364705882,7 216.347011764706,8 216.4928,9 216.78992,9.30011428571435 217,9.78897777777787 218,9.44297142857152 219,9 219.7752,8.85013333333333 220,8.68346666666676 221,9 221.633066666666,9.22016000000008 222,9.62016000000017 223,10 223.633066666666,10.5504000000001 224,11 224.08992,12 224.172654545454,13 224.18992,14 224.322133333333,15 224.544355555556,16 224.9856,16.0168 225,16.5667555555556 226,17 226.649866666667,17.1750666666667 227,18 227.899927272727,18.1223111111112 228,19 228.526613333333,20 228.8687,21 228.9937,22 228.926613333333,23 228.824933333333,24 228.655466666667,25 228.77984,25.2752000000001 229,26 229.7248,26.2201600000001 230,27 230.77984,27.3669333333335 231,28 231.4748,29 231.97984,29.0504000000001 232,30 232.4748,31 232.9748,31.0504000000001 233,32 233.316533333333,33 233.699885714286,33.7002666666667 234,34 234.1124,35 234.3624,36 234.699885714286,37 234.97984,37.0504000000001 235,38 235.37984,39 235.9748,39.0252 236,39.5252000000002 237,39.3669333333335 238,39 238.5504,38.5504000000001 239,38 239.366933333334,37.0504000000001 240,37 240.0336,36.0336000000001 241,36 241.0252,35 241.5252,34 241.62016,33 241.350133333333,32 241.0144,31.9495999999999 241,31 240.62016,30 240.0168,29.9663999999999 240,29 239.42016,28.2997333333333 239,28 238.700266666667,27 238.0252,26.8991999999999 238,26 237.82016,25 237.850133333333,24 237.91008,23.1008000000001 238,23 238.01008,22 238.100072727273,21 238.190981818182,20 238.3728,19 238.554618181818,18 238.736436363636,17 238.841733333333,16 238.853907692308,15 238.673386666667,14 238.478989473684,13 238.338133333333,12 238.2542,11 238.284032,10 238.426953846154,9 238.7542,8.50840000000001 239,8 239.338933333333,7.20672000000006 240,7 240.2584,6.31544615384616 241,6 241.273386666667,5 241.689515789474,4 241.700034782609,3 241.5808,2 241.30002962963,1.09991111111111 241,1 240.95504,0 240.50504,-1 240.140945454545,-1.51680000000012 240,-2 239.838933333333,-3 239.689515789474,-4 239.65504,-5 239.576228571429,-6 239.413672727273,-7 239.178295652174,-7.45564444444445 239,-8 238.766704761905,-9 238.322763636364,-9.64552727272732 238,-10 237.814323809524,-11 237.290514285714,-11.5546181818182 237,-12 236.742147368421,-13 236.10504,-13.1500571428572 236,-14 235.433371428571,-14.6500571428571 235,-15 234.766704761905,-16 234.091339130435,-16.1313 234,-17 233.368218181818,-17.4765176470589 233,-18 232.576228571429,-18.80672 232,-19 231.847410526316,-20 231.170866666667,-20.2733866666667 231,-21 230.48099047619,-21.7769846153847 230,-22 229.8188,-23 229.0056,-23.0077538461539 229,-24 228.1938,-24.3100800000001 228,-25 227.5688,-26 227.064752941176,-26.1223111111112 227,-27 226.435771428571,-27.61008 226,-28 225.566755555556,-28.5667555555556 225,-29 224.566755555556,-29.5667555555556 224,-30 223.566755555556,-30.51008 223,-31 222.300114285714,-31.1909818181819 222,-31.7100800000001 221,-32 220.42016,-32.2100800000001 220,-32.8100800000001 219,-33 218.683466666667,-33.3728 218,-33.8273454545455 217,-34 216.683466666667,-34.41008 216,-35 215.157257142857,-35.11008 215,-35.9000888888889 214,-36 213.871542857143,-36.7626000000001 213,-37 212.728685714286,-37.8501333333333 212,-38 211.871542857143,-39 211.2626,-39.4201600000001 211,-40 210.585828571429,-41 210.2626,-42 210.0112,-42.1008000000001 210,-43 209.871542857143,-44 209.6376,-45 209.344533333333,-46 209.21008,-47 209.100072727273,-48 209.01008,-49 209.11008,-50 209.233422222222,-51 209.5126,-51.9748 210,-52 210.0144,-53 210.728685714286,-53.3165333333332 211,-54 211.82016,-54.1498666666667 212,-55 212.850133333333,-55.1284571428571 213,-55.9856 214,-56 214.0168,-56.8427428571428 215,-57 215.183466666667,-57.6123999999999 216,-58 216.5168,-58.3623999999999 217,-59 217.850133333333,-59.1124 218,-59.8623999999999 219,-60 219.157257142857,-61 219.8876,-61.17984 220,-62 220.41008,-63 220.841733333333,-63.3798399999998 221,-64 221.2584,-65 221.578628571429,-66 221.80672,-67 221.9438,-67.4495999999999 222,-68 222.078628571429,-69 222.315446153846,-70 222.591733333333,-70.97984 223,-71 223.02016,-72 223.683466666667,-72.6330666666665 224,-73 224.2752,-74 224.366933333334,-75 224.0336,-75.0504000000001 224,-76 223.788977777778,-77 223.3876,-77.7752 223,-78 222.918254545455,-79 222.455644444444,-79.5858285714286 222,-80 221.5168,-80.4429714285715 221,-81 220.22016,-81.1834666666667 220,-82 219.455644444444,-82.5858285714286 219,-83 218.6376,-83.6376000000001 218,-84 217.2752,-84.1223111111112 217,-84.5917333333334 216,-85 215.02016,-85.0091636363637 215,-85.3417333333334 214,-85.2385230769231 213,-85 212.37984,-84.7889777777779 212,-84.0144 211,-84 210.9832,-83 210.17984,-82.7752 210,-82.1834666666667 209,-82 208.77984,-81.4429714285715 208,-81 207.6124,-80.1834666666667 207,-80 206.88992,-79 206.38992,-78.0252 206,-78 205.9888,-77 205.655466666667,-76 205.322133333333,-75 205.099911111111,-74.7002666666667 205,-74 204.649866666667,-73 204.149866666667,-72.5504000000001 204,-72 203.8624,-71 203.7374,-70 203.544355555556,-69 203.2374,-68.0504000000001 203,-68 202.9856))"); Collection columns1 = new Collection(); columns1.Add("val:1"); Feature f1 = new Feature(ml1, columns1); columns1 = new Collection(); columns1.Add("val:2"); Feature f2 = new Feature(ml2, columns1); columns1 = new Collection(); columns1.Add("val:3"); Feature f3 = new Feature(ml3, columns1); featureSource1.Open(); featureSource1.BeginTransaction(); featureSource1.AddFeature(f1); featureSource1.AddFeature(f2); featureSource1.CommitTransaction(); Collection features = featureSource1.GetAllFeatures(ReturningColumnsType.AllColumns); bool r1 = features[0].IsWithin(features[1]); bool r2 = features[1].Contains(features[0]); featureSource1.Close(); Console.WriteLine(r1); Console.WriteLine(r2); Console.ReadLine();