QGIS to update MapInfo model: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
Can I use QGIS for a model originally developed in MapInfo? The answer is, yes.<br>
<br>
TUFLOW models can use a combination of MapInfo MIF/MID and QGIS SHP files. The existing MapInfo files can be left in their current form and new updates can be added using SHP format. <br>
<br>
Line 11 ⟶ 10:
* Select "Information" and review the CRS details.
<li> Initialise your QGIS session using the TUFLOW Plugin:
* Select '''Plugins >> TUFLOW >> Edditing > Create/Configure TUFLOW Project'''.
* Select the open MapInfo file via the ''Source Project Layer'' drop menu. this will populate the Projection infromation for you.
* Select the folder that contains the TUFLOW model.
* Select the TUFLOW Executable location.
Line 20 ⟶ 19:
* Tick Create Template Files. This will create the QGIS empty template files for any future additons to the model.
<li> Open the two TCF Files:
*'''TUFLOW/runs/Create_Empties.tcf'''; and
* The TCF for the existing TUFLOW model using the MapInfo format inputs.
<li> Copy the following command line to clipboard from '''Create_Empties.tcf''': <font color="blue"><tt>SHP Projection</tt></font> <font color="red"><tt>==</tt></font><tt> ..\model\gis\Projection.prj</tt>
<li> Paste the command to the TCF for the existing TUFLOW model using the MapInfo format inputs below, <font color="blue"><tt>MI Projection</tt></font> <font color="red"><tt>==</tt></font>
<li> Also in the MapInfo model TCF file, change the command <font color="blue"><tt>GIS Format</tt></font> <font color="red"><tt> == </tt></font> <tt>MIF</tt> to <font color="blue"><tt>GIS Format</tt></font> <font color="red"><tt> == </tt></font> <tt>SHP</tt>
</ol>
 
You will now be able to add compatible QGIS SHP format files to your model.<br>
 
It is best practice to leave the MapInfo file references as is, and use TUFLOW's datalayering functionality the add new GIS entries below existing MapInfo entries. For example.
 
<li> Save the command below <font color="blue"><tt>SHP Projection</tt></font> <font color="red"><tt>==</tt></font><tt> ..\model\gis\Projection.prj</tt>
</tt> in the MapInfo model TCF file.
<li> Also in the MapInfo model TCF file, change the command <font color="blue"><tt>GIS Format</tt></font> <font color="red"><tt> == </tt><tt>MIF</tt> to <font color="blue"><tt>GIS Format</tt></font> <font color="red"><tt> == </tt><tt>SHP</tt>
 
If you need to make changes to existing MIF files, follow these steps:
 
<brol>
MI Projection == ..\model\mi\Projection.mif ! Sets the GIS projection for the TUFLOW Model
<li> Open the the MapInfo MIF file in GIS. If the file includes a combaintion of regions, lines and points QGIS will display a pop up message asking which of these features you would like to open. Select all. QGIS will split the MIF file into it's respective object types.
 
<li> Import empty QGIS SHP template files for the required object types.
 
<li> Copy the features from the MapInfo object tye layers to teh relevent new QGIS SHP files. NOte, double check the attribute values have been correctly transfered to the new file. In some rare instances, when the field attribute type is incompatible this does not occur.
Write Empty GIS Files == ..\model\gis\empty
<li> Update the commands within your updated TUFLOw model to reference to the new QGIS SHP files. For future tracability it is best to comment out the prior MapInfo input commands, instead of deleting them.
 
<ol>
 
</ol>
 
* Use the same projection as MapInfo files and add <font color="blue"><tt>SHP Projection</tt></font> <font color="red"><tt>==</tt></font><tt> ..\model\gis\Projection.prj</tt> to the <font color="blue"><tt>MI Projection</tt></font> command. Both should be included in the model.
* Replace <font color="blue"><tt>GIS Format</tt></font> <font color="red"><tt>==</tt></font><tt> MIF</tt> with <font color="blue"><tt>GIS Format</tt></font> <font color="red"><tt>==</tt></font><tt> SHP</tt>. This will apply to check files and results.
* Create empty TUFLOW files with <font color="blue"><tt>Write Empty GIS Files</tt></font> <font color="red"><tt>==</tt></font><tt> ..\model\gis\empty</tt>. These will automatically generate SHP format files when <font color="blue"><tt>GIS Format</tt></font> <font color="red"><tt>==</tt></font><tt> SHP</tt> is specified.
If changes need to be made to existing MapInfo layers, use QGIS to convert MIF to SHP by either:
* Exporting MIF files to shapefiles.
* Copying MIF features (points, lines and polygons separately) into a TUFLOW empty file in shapefile format.
After the conversion, attributes should be checked if they were transferred correctly.<br>
 
<br>