예제 #1
0
        public void SetTableSchemaWithDifferentKeyNameAndSchemaMergeAction()
        {
            ShapeFileProvider shapeFile = new ShapeFileProvider(
                BcRoadsShapeFile, _geoFactory, _coordSysFactory);

            shapeFile.Open();
            IGeometry empty = _geoFactory.CreatePoint();
            FeatureDataTable <UInt32> queryTable = shapeFile.CreateNewTable() as FeatureDataTable <UInt32>;
            // expecting a new FeatureDataTable<UInt32>("OID", _geoFactory);

            FeatureDataTable <UInt32> keyedTable = new FeatureDataTable <UInt32>("FID", _geoFactory);

            shapeFile.SetTableSchema(keyedTable, SchemaMergeAction.KeyByType);
            DataTableHelper.AssertTableStructureIdentical(keyedTable, queryTable);
        }
예제 #2
0
        public void SetTableSchemaShouldMatchShapeFileSchema()
        {
            ShapeFileProvider shapeFile = new ShapeFileProvider(
                BcRoadsShapeFile, _geoFactory, _coordSysFactory);

            shapeFile.Open();
            IGeometry empty = _geoFactory.CreatePoint();
            FeatureDataTable <UInt32> queryTable = shapeFile.CreateNewTable() as FeatureDataTable <UInt32>;

            FeatureDataTable nonKeyedTable = new FeatureDataTable(_geoFactory);

            shapeFile.SetTableSchema(nonKeyedTable);
            DataTableHelper.AssertTableStructureIdentical(nonKeyedTable, queryTable);

            FeatureDataTable <UInt32> keyedTable = new FeatureDataTable <UInt32>("OID", _geoFactory);

            shapeFile.SetTableSchema(keyedTable);
            DataTableHelper.AssertTableStructureIdentical(keyedTable, queryTable);
        }
예제 #3
0
        public void SetTableSchemaWithDifferentKeyNameAndSchemaMergeAction()
        {
            ShapeFileProvider shapeFile = new ShapeFileProvider(
                BcRoadsShapeFile, _geoFactory, _coordSysFactory);
            shapeFile.Open();
            IGeometry empty = _geoFactory.CreatePoint();
            FeatureDataTable<UInt32> queryTable = shapeFile.CreateNewTable() as FeatureDataTable<UInt32>;
            // expecting a new FeatureDataTable<UInt32>("OID", _geoFactory);

            FeatureDataTable<UInt32> keyedTable = new FeatureDataTable<UInt32>("FID", _geoFactory);
            shapeFile.SetTableSchema(keyedTable, SchemaMergeAction.KeyByType);
            DataTableHelper.AssertTableStructureIdentical(keyedTable, queryTable);
        }
예제 #4
0
        public void SetTableSchemaShouldMatchShapeFileSchema()
        {
            ShapeFileProvider shapeFile = new ShapeFileProvider(
                BcRoadsShapeFile, _geoFactory, _coordSysFactory);
            shapeFile.Open();
            IGeometry empty = _geoFactory.CreatePoint();
            FeatureDataTable<UInt32> queryTable = shapeFile.CreateNewTable() as FeatureDataTable<UInt32>;

            FeatureDataTable nonKeyedTable = new FeatureDataTable(_geoFactory);
            shapeFile.SetTableSchema(nonKeyedTable);
            DataTableHelper.AssertTableStructureIdentical(nonKeyedTable, queryTable);

            FeatureDataTable<UInt32> keyedTable = new FeatureDataTable<UInt32>("OID", _geoFactory);
            shapeFile.SetTableSchema(keyedTable);
            DataTableHelper.AssertTableStructureIdentical(keyedTable, queryTable);
        }