span8
span4
span8
span4
Previous: Correcting Topological Errors
In this exercise,you will learn how to import data into your database and export data from your database using FME.It's a simple drag and drop process that supports over 400 data types;however,this tutorial will only provide examples of importing/exporting data from 3 categories: database tables,raster data,and vector data.
Note: Since you areworking on a public facing database,tables can occasionally be overwritten and/or modified.If your translation produces unexpected results,see theResetting the PostGIS Training Databasearticle.Alternatively,you can download the provided file(s) and replace the PostGIS reader with a reader of the appropriate format.
In this scenario,you will learn how to make a copy of an existing database table.
Alternatively,if you want to export the table as a CSV,swap out the PostGIS Writer for a CSV writer.This would result in your PostGIS table being exported to the CSV format.Similarly,if you have a CSV file that you want to be created as a table in your PostGIS database,replace the PostGIS Reader with a CSV Reader.This would result in your CSV file being imported into PostGIS as a new table.
In this scenario,you will be exporting a Raster image and the attribute data from your database to a GeoTIFF.
FME allows you to generate both World and TAB files when writing to the GeoTIFF format.World files (.tfw) are important because they store georeferencing information about the raster image (i.e.the origin,spacing,and rotation of the raster image).Additionally,TAB files (.tab) are important because they allow you to export the user-defined attributes of the raster image,meaning all of the attributes in the associated database table will be exported along with the GeoTIFF.For more technical information on using the GeoTIFF reader,see theDocumentation.
You have successfully exported Raster data from your database.You can view the output by selecting the writer feature type and clicking the FME Data Inspector logo in the shortcut menu that appears above it.
In this scenario,you will be importing a Raster image and its attributes into your database.
You have successfully imported a GeoTIFF into your database.You can view the output by selecting the writer and clicking the FME Data Inspector logo in the shortcut menu that appears.
In this scenario,you want to export a copy of some vector data that is currently stored in your database.
Next,open the Reader Parameters and select the VanBlocks table from the Table List.
Shapefile features consist of geometry and a set of user-defined attributes.In this case,you are reading 3D polygon data from a PostGIS database because a Z value (0) has been appended to the feature coordinates.
Note: since there is a Z coordinate specified in the coordinate dimensions the Shapefile Writer will assume the output is intended to be 3D if you use the default output dimension "Dimension from the first feature".
You have successfully exported polygon features from your database into the shapefile format.You can view the output by selecting the writer and clicking the FME Data Inspector logo in the shortcut menu that appears.
In this scenario,you will be importing polygon features from a shapefile into your database.
Data used in this tutorial originates from open data made available by theCity of Vancouver,British Columbia.It contains information licensed under the Open Government License - Vancouver.
© 2019 亚搏在线Safe Software Inc |Legal