public void SetTableSchemaShouldMatchShapeFileSchema() { ShapeFileProvider shapeFile = new ShapeFileProvider(@"..\..\..\TestData\BCROADS.SHP"); shapeFile.Open(); FeatureDataTable<uint> queryTable = new FeatureDataTable<uint>("OID"); shapeFile.ExecuteIntersectionQuery(BoundingBox.Empty, queryTable); FeatureDataTable nonKeyedTable = new FeatureDataTable(); shapeFile.SetTableSchema(nonKeyedTable); DataTableHelper.AssertTableStructureIdentical(nonKeyedTable, queryTable); FeatureDataTable<uint> keyedTable = new FeatureDataTable<uint>("OID"); shapeFile.SetTableSchema(keyedTable); DataTableHelper.AssertTableStructureIdentical(keyedTable, queryTable); }
public void SetTableSchemaWithDifferentKeyNameAndSchemaMergeAction() { ShapeFileProvider shapeFile = new ShapeFileProvider(@"..\..\..\TestData\BCROADS.SHP"); shapeFile.Open(); FeatureDataTable<uint> queryTable = new FeatureDataTable<uint>("OID"); shapeFile.ExecuteIntersectionQuery(BoundingBox.Empty, queryTable); FeatureDataTable<uint> keyedTable = new FeatureDataTable<uint>("FID"); shapeFile.SetTableSchema(keyedTable, SchemaMergeAction.KeyByType); DataTableHelper.AssertTableStructureIdentical(keyedTable, queryTable); }
public void SetTableSchemaShouldFailIfShapeFileNotOpen() { ShapeFileProvider shapeFile = new ShapeFileProvider(@"..\..\..\TestData\BCROADS.SHP"); FeatureDataTable nonKeyedTable = new FeatureDataTable(); shapeFile.SetTableSchema(nonKeyedTable); }