Difference between revisions of "QGIS to update MapInfo model"

From Tuflow
Jump to navigation Jump to search
Line 11: Line 11:
 
<li> Initialise your QGIS session using the TUFLOW Plugin:
 
<li> Initialise your QGIS session using the TUFLOW Plugin:
 
* Select '''Plugins >> TUFLOW >> Edditing > Create/Configure TUFLOW Project'''.
 
* 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 open MapInfo file via the Source Project Layer drop menu. this will populate the Projection information for you.
 
* Select the folder that contains the TUFLOW model.
 
* Select the folder that contains the TUFLOW model.
 
* Select the TUFLOW Executable location.
 
* Select the TUFLOW Executable location.
 
* Tick TUFLOW Classic / HPC
 
* Tick TUFLOW Classic / HPC
 
* Tick Save Default Settings
 
* Tick Save Default Settings
* Tick Create Model Folder Structure. This will add any missing folders to the existing folder structure (eg. TUFLOW/gis)  
+
* Tick Create Model Folder Structure. This will add any missing folders to the existing folder structure (e.g. TUFLOW/gis)  
* Tick Create Template Files. This will create the QGIS empty template files for any future additons to the model.
+
* Tick Create Template Files. This will create the QGIS empty template files for any future additions to the model.
 
<li> Open the two TCF Files:  
 
<li> Open the two TCF Files:  
 
*'''TUFLOW/runs/Create_Empties.tcf'''; and  
 
*'''TUFLOW/runs/Create_Empties.tcf'''; and  
Line 28: Line 28:
 
You will now be able to add compatible QGIS SHP format files to your model.<br>
 
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.
+
It is best practice to leave the MapInfo file references as is, and use TUFLOW's data layering functionality the add new GIS entries below existing MapInfo entries. For example.
  
  
 
If you need to make changes to existing MIF files, follow these steps:
 
If you need to make changes to existing MIF files, follow these steps:
 
<ol>
 
<ol>
<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> Open the MapInfo MIF file in GIS. If the file includes a combination 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> 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.
+
<li> Copy the features from the MapInfo layers to the relevent new QGIS SHP files. Note, double check the attribute values have been correctly transferred to the new file. In some rare instances, when the field attribute type is incompatible this does not occur.
<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.
+
<li> Update the commands within your updated TUFLOW model to reference to the new QGIS SHP files. For future traceability it is best to comment out the prior MapInfo input commands, instead of deleting them.
 
<ol>
 
<ol>
  

Revision as of 16:05, 16 June 2021

Can I use QGIS for a model originally developed in MapInfo? The answer is, yes.
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.

Follow these steps:

  1. Open QGIS.
  2. Familarise yourself with the projection of the MapInfo files used by the model. You can do this using QGIS:
    • Drag a mif file from the existing model into the Map Window of QGIS. The will open it for viewing. Editing the read only file in QGIS is not possible.
    • Right click the MapInfo File in the QGIs Layer Panel and select Properties.
    • Select "Information" and review the CRS details.
  3. 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 information for you.
    • Select the folder that contains the TUFLOW model.
    • Select the TUFLOW Executable location.
    • Tick TUFLOW Classic / HPC
    • Tick Save Default Settings
    • Tick Create Model Folder Structure. This will add any missing folders to the existing folder structure (e.g. TUFLOW/gis)
    • Tick Create Template Files. This will create the QGIS empty template files for any future additions to the model.
  4. Open the two TCF Files:
    • TUFLOW/runs/Create_Empties.tcf; and
    • The TCF for the existing TUFLOW model using the MapInfo format inputs.
  5. Copy the following command line to clipboard from Create_Empties.tcf: SHP Projection == ..\model\gis\Projection.prj
  6. Paste the command to the TCF for the existing TUFLOW model using the MapInfo format inputs below MI Projection ==
  7. Also in the MapInfo model TCF file, change the command GIS Format == MIF to GIS Format == SHP

You will now be able to add compatible QGIS SHP format files to your model.

It is best practice to leave the MapInfo file references as is, and use TUFLOW's data layering functionality the add new GIS entries below existing MapInfo entries. For example.


If you need to make changes to existing MIF files, follow these steps:

  1. Open the MapInfo MIF file in GIS. If the file includes a combination 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.
  2. Import empty QGIS SHP template files for the required object types.
  3. Copy the features from the MapInfo layers to the relevent new QGIS SHP files. Note, double check the attribute values have been correctly transferred to the new file. In some rare instances, when the field attribute type is incompatible this does not occur.
  4. Update the commands within your updated TUFLOW model to reference to the new QGIS SHP files. For future traceability it is best to comment out the prior MapInfo input commands, instead of deleting them.


      Up
      Go-up.png Back to QGIS Tips And Tricks