-
Notifications
You must be signed in to change notification settings - Fork 36
Configuration examples
To output data in Shapefile format you will want to specify ESRI Shapefile in the OGR command and if loading OS MasterMap there is an alternative prep_cmd to prepare the data and an accompanying gfs file to specify attributes and their names:
# Specify ESRI Shapefile as the format that ogr2ogr should output to and
# use the $output_dir token to specify the folder that the Shapefiles will be written to
ogr_cmd=ogr2ogr -append -skipfailures -f 'ESRI Shapefile' $output_dir $file_path
# Use the Use the Sharefile / QGIS specific preparation routine
prep_cmd=python prepgml4ogr.py $file_path prep_osgml.prep_osmm_topo_qgis
# Use the Sharefile / QGIS specific gfs file which specifies short column names,
# list attributes such as Descriptive Term as a comma separated list and some QGIS
# specific attributes for displaying labels
gfs_file=../gfs/osmm_topo_shape_qgis.gfs
To output data in MapInfo TAB format you simply need to specify MapInfo File as the format in the OGR command:
# Specify MapInfo File as the output format
# and use the $output_dir token to specify the folder that the Shapefiles will be written to
ogr_cmd=ogr2ogr -append -skipfailures -f "MapInfo File" $output_dir/$base_file_name $file_path
Note: OGR does not support updating / appending to MapInfo TAB files so you may want to use the $base_file_name to specify a folder in which to write the output for each source file as shown above. The individual tables can then be stitched together for display using a seamless table.
Currently there is basic support for loading OS VectorMap Local with no value add. To load VectorMap Local you need to specify a suitable prep_cmd to prepare the GML for loading specify a suitable gfs file:
# Use the basic GML preperation routine
prep_cmd=python prepgml4ogr.py $file_path prep_osgml.prep_vml
# Do not specify a .gfs file - let OGR create one for VectorMap Local
gfs_file=../gfs/vml_postgres.gfs
When specifying paths for the src_dir, tmp_dir etc. on Windows it should be fine to simply use a single backslash to separate the parts of the path such as: C:\Temp
. However when specifying paths for the ogr_cmd or prep_cmd you should escape the backslashes to ensure that the correct path is used, so instead of C:\Temp
use C:\\Temp
(use two backslashes).