Difference between revisions of "TUFLOW Message 0305"
(19 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{TUFLOW_Message | {{TUFLOW_Message | ||
− | |tuflow_message=ERROR 0305 - Projection of .mif file is different to that specified by the MI Projection == command. | + | |tuflow_message=ERROR 0305 - Projection of .mif file is different to that specified by the <font color="black"><tt>MI Projection </tt></font><font color="black"><tt>== </tt></font>command. |
− | |alt_msg=WARNING 0305 - Projection of .shp file is different to that specified by the GIS Projection == command. | + | |alt_msg=WARNING 0305 - Projection of .mif file is different to that specified by the <font color="black"><tt>MI Projection </tt></font><font color="black"><tt>== </tt></font> command.<br> |
+ | ERROR 0305 - Projection of .shp file is different to that specified by the <font color="black"><tt>GIS Projection </tt></font><font color="black"><tt>== </tt></font> command.<br> | ||
+ | WARNING 0305 - Projection of .shp file is different to that specified by the <font color="black"><tt>GIS Projection </tt></font><font color="black"><tt>== </tt></font> command.<br> | ||
+ | ERROR 0305 - Projection of .gpkg layer is different to that specified by the <font color="black"><tt>GPKG Projection </tt></font><font color="black"><tt>== </tt></font> command.<br> | ||
+ | WARNING 0305 - Projection of .gpkg layer is different to that specified by the <font color="black"><tt>GPKG Projection </tt></font><font color="black"><tt>== </tt></font> command.<br> | ||
|type=[[ERROR]] <br> [[WARNING]] | |type=[[ERROR]] <br> [[WARNING]] | ||
− | |message_desc=By default, TUFLOW checks that the projection in each '''.shp''' or '''.mif''' file matches that specified in the SHP Projection == or MI Projection == command, respectively. This ensures that incoming files are in the same projection as the TUFLOW model. TUFLOW is not a GIS software and does not use the projection information in each file (apart for the check). TUFLOW uses the co-ordinates of the objects in the GIS layer and locates them in the TUFLOW model. Hence the need for a projection check. All model input files should be in the same projection, if inputs are not in the correct projection the data will be in the wrong location and won't be used. If your model is in | + | |message_desc=By default, TUFLOW checks that the projection in each '''.shp''' or '''.mif''' file matches that specified in the <font color="blue"><tt>SHP Projection </tt></font><font color="red"><tt>== </tt></font> or <font color="blue"><tt>MI Projection </tt></font><font color="red"><tt>== </tt></font> command, respectively. This ensures that incoming files are in the same projection as the TUFLOW model. TUFLOW is not a GIS software and does not use the projection information in each file (apart for the check). TUFLOW uses the co-ordinates of the objects in the GIS layer and locates them in the TUFLOW model. Hence the need for a projection check. All model input files should be in the same projection, if inputs are not in the correct projection the data will be in the wrong location and won't be used. If your model is in for example MGA 94 zone 56, and the 2d materials (2d_mat) file is in the wrong projection (e.g. NSW ISG 56/1), these material polygons will be in the wrong location (probably in the middle of the ocean) and they won't be assigned to any model cells.<br> |
This message prevents problems with the data provided having a different projection than the TUFLOW model.<br><br> | This message prevents problems with the data provided having a different projection than the TUFLOW model.<br><br> | ||
<u>Message Options</u><br> | <u>Message Options</u><br> | ||
This message can be set to give either an error (this is the default): <br> | This message can be set to give either an error (this is the default): <br> | ||
− | <font color=" | + | <font color="blue"><tt> |
− | SHP Projection Check == ERROR<br> | + | SHP Projection Check </tt></font><font color="red"><tt>== </tt></font><font color="black"><tt>ERROR</tt></font><br> |
− | MI Projection Check == ERROR</tt></font><br> | + | <font color="blue"><tt>MI Projection Check </tt></font><font color="red"><tt>== </tt></font><font color="black"><tt>ERROR</tt></font><br> |
This message can be downgraded to a warning: <br> | This message can be downgraded to a warning: <br> | ||
− | <font color=" | + | <font color="blue"><tt> |
− | SHP Projection Check = | + | SHP Projection Check </tt></font><font color="red"><tt>== </tt></font><font color="black"><tt>WARNING</tt></font><br> |
− | + | <font color="blue"><tt>MI Projection Check </tt></font><font color="red"><tt>== </tt></font><font color="black"><tt>WARNING</tt></font><br> | |
− | |||
− | |||
− | <font color=" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | Or this message can be turned off entirely (use with caution - all files should be checked they are in the correct projection!): <br> | ||
+ | <font color="blue"><tt> | ||
+ | SHP Projection Check </tt></font><font color="red"><tt>== </tt></font><font color="black"><tt>OFF</tt></font><br> | ||
+ | <font color="blue"><tt>MI Projection Check </tt></font><font color="red"><tt>== </tt></font><font color="black"><tt>OFF</tt></font><br> | ||
+ | <br> | ||
<u>Projection Files'''</u><br> | <u>Projection Files'''</u><br> | ||
QGIS or ArcMap - The .prj file associated with each shapefile might start similarly as below:<br> | QGIS or ArcMap - The .prj file associated with each shapefile might start similarly as below:<br> | ||
− | <tt>PROJCS["GDA94_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137,298.257222101]<br> | + | <tt>PROJCS["GDA94_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137,298.257222101]</tt><br> |
+ | <br> | ||
MapInfo - The fourth line of a .mif file contains the projection information. For example it may look like this:<br> | MapInfo - The fourth line of a .mif file contains the projection information. For example it may look like this:<br> | ||
<tt>CoordSys Earth Projection 8, 104, "m", 177, 0, 0.9996, 500000, 10000000 Bounds (-7745844.29597, 2035.05676326) (8745844.29597, 19997964.9432)</tt><br> | <tt>CoordSys Earth Projection 8, 104, "m", 177, 0, 0.9996, 500000, 10000000 Bounds (-7745844.29597, 2035.05676326) (8745844.29597, 19997964.9432)</tt><br> | ||
<br> | <br> | ||
− | + | The shapefile projection string can be written slightly differently when switching between GIS packages (e.g. QGIS, ArcMap) or using different tools for shapefile exporting even though it is still the same projection. | |
Example 1:<br> | Example 1:<br> | ||
<tt>PROJCS["<font color="red">GDA94</font>_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137,298.257222101]<br> | <tt>PROJCS["<font color="red">GDA94</font>_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137,298.257222101]<br> | ||
− | PROJCS["<font color="red">GDA_1994</font>_MGA_Zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137,298.257222101]</tt | + | PROJCS["<font color="red">GDA_1994</font>_MGA_Zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137,298.257222101]</tt><br> |
Example 2:<br> | Example 2:<br> | ||
<tt>PROJCS["GDA94_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980","<font color="red">6378137</font>,298.257222101]<br> | <tt>PROJCS["GDA94_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980","<font color="red">6378137</font>,298.257222101]<br> | ||
PROJCS["GDA94_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980","<font color="red">6378137.0</font>,298.257222101]</tt><br><br> | PROJCS["GDA94_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980","<font color="red">6378137.0</font>,298.257222101]</tt><br><br> | ||
− | In the | + | |suggestions= |
− | + | * Check the projection of the problem file, this can be done following the steps below: <br> | |
− | + | ** QGIS - Layer Properties >> Source under the “Assigned Coordinate Reference System (CRS) header.<br> | |
+ | ** MapInfo - Table >> Maintenance >> Table Structure and selecting the Projection button.<br> | ||
+ | * If the GIS layer projection is different from the model projection, re-project to the correct projection. This can be done by saving a copy of the file with correct projection: | ||
+ | **QGIS: | ||
+ | *** Right click on the file to be re-projected | ||
+ | *** Select '''Export >> Save Features As''' | ||
+ | *** Under '''CRS''' select the correct projection and save | ||
+ | **MapInfo: | ||
+ | *** Select '''File >> Save Copy As''' and select the table to be saved | ||
+ | *** Select the '''Projection...''' button in the dialogue box | ||
+ | *** In the '''Choose Projection''' dialogue set the desired projection and save | ||
+ | * If the file is in the same projection as the TUFLOW model, compare the projection line from the '''.shp''' or '''.mif''' file with that specified in the <font color="blue"><tt>SHP Projection </tt></font><font color="red"><tt>== </tt></font> or <font color="blue"><tt>MI Projection </tt></font><font color="red"><tt>== </tt></font> command. If the bounds are different (refer to Examples above), you can overwrite the projection line. This should correct the issue of the TUFLOW error without changing the GIS data. If multiple files are different, this message can be set to warning or OFF (as described above), however you should check all files with this warning to ensure that they are in the same projection.<br> | ||
+ | ** Shapefiles - the '''.prj''' file associated with the shapefile with that in the '''projection.shp'''<br> | ||
+ | ** MIF files - the projection line (line 4) in the problem '''.mif''' file with that in the projection.mif, re-import the file and export the file (backup first). | ||
+ | * Develop a model entirely within one GIS software. | ||
+ | * Use the latest TUFLOW release. Since 2020-01-AB release, TUFLOW parses the parameter data into number values and compares each of these numbers to check they are consistent. This should provide a more robust check less prone to falsely flagging the projections as different with "Message 0305" from Example 2. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|uplink=[[0xxx_TUFLOW_Messages|0xxx Messages]] | |uplink=[[0xxx_TUFLOW_Messages|0xxx Messages]] | ||
− | |||
}} | }} |
Latest revision as of 11:12, 22 December 2022
TUFLOW Message
ERROR 0305 - Projection of .mif file is different to that specified by the MI Projection == command.
Alternate Message
WARNING 0305 - Projection of .mif file is different to that specified by the MI Projection == command.
ERROR 0305 - Projection of .shp file is different to that specified by the GIS Projection == command.
WARNING 0305 - Projection of .shp file is different to that specified by the GIS Projection == command.
ERROR 0305 - Projection of .gpkg layer is different to that specified by the GPKG Projection == command.
WARNING 0305 - Projection of .gpkg layer is different to that specified by the GPKG Projection == command.
Description
By default, TUFLOW checks that the projection in each .shp or .mif file matches that specified in the SHP Projection == or MI Projection == command, respectively. This ensures that incoming files are in the same projection as the TUFLOW model. TUFLOW is not a GIS software and does not use the projection information in each file (apart for the check). TUFLOW uses the co-ordinates of the objects in the GIS layer and locates them in the TUFLOW model. Hence the need for a projection check. All model input files should be in the same projection, if inputs are not in the correct projection the data will be in the wrong location and won't be used. If your model is in for example MGA 94 zone 56, and the 2d materials (2d_mat) file is in the wrong projection (e.g. NSW ISG 56/1), these material polygons will be in the wrong location (probably in the middle of the ocean) and they won't be assigned to any model cells.
This message prevents problems with the data provided having a different projection than the TUFLOW model.
Message Options
This message can be set to give either an error (this is the default):
SHP Projection Check == ERROR
MI Projection Check == ERROR
This message can be downgraded to a warning:
SHP Projection Check == WARNING
MI Projection Check == WARNING
Or this message can be turned off entirely (use with caution - all files should be checked they are in the correct projection!):
SHP Projection Check == OFF
MI Projection Check == OFF
Projection Files
QGIS or ArcMap - The .prj file associated with each shapefile might start similarly as below:
PROJCS["GDA94_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137,298.257222101]
MapInfo - The fourth line of a .mif file contains the projection information. For example it may look like this:
CoordSys Earth Projection 8, 104, "m", 177, 0, 0.9996, 500000, 10000000 Bounds (-7745844.29597, 2035.05676326) (8745844.29597, 19997964.9432)
The shapefile projection string can be written slightly differently when switching between GIS packages (e.g. QGIS, ArcMap) or using different tools for shapefile exporting even though it is still the same projection.
Example 1:
PROJCS["GDA94_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137,298.257222101]
PROJCS["GDA_1994_MGA_Zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137,298.257222101]
Example 2:
PROJCS["GDA94_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980","6378137,298.257222101]
PROJCS["GDA94_MGA_zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980","6378137.0,298.257222101]
Suggestions
- Check the projection of the problem file, this can be done following the steps below:
- QGIS - Layer Properties >> Source under the “Assigned Coordinate Reference System (CRS) header.
- MapInfo - Table >> Maintenance >> Table Structure and selecting the Projection button.
- QGIS - Layer Properties >> Source under the “Assigned Coordinate Reference System (CRS) header.
- If the GIS layer projection is different from the model projection, re-project to the correct projection. This can be done by saving a copy of the file with correct projection:
- QGIS:
- Right click on the file to be re-projected
- Select Export >> Save Features As
- Under CRS select the correct projection and save
- MapInfo:
- Select File >> Save Copy As and select the table to be saved
- Select the Projection... button in the dialogue box
- In the Choose Projection dialogue set the desired projection and save
- QGIS:
- If the file is in the same projection as the TUFLOW model, compare the projection line from the .shp or .mif file with that specified in the SHP Projection == or MI Projection == command. If the bounds are different (refer to Examples above), you can overwrite the projection line. This should correct the issue of the TUFLOW error without changing the GIS data. If multiple files are different, this message can be set to warning or OFF (as described above), however you should check all files with this warning to ensure that they are in the same projection.
- Shapefiles - the .prj file associated with the shapefile with that in the projection.shp
- MIF files - the projection line (line 4) in the problem .mif file with that in the projection.mif, re-import the file and export the file (backup first).
- Shapefiles - the .prj file associated with the shapefile with that in the projection.shp
- Develop a model entirely within one GIS software.
- Use the latest TUFLOW release. Since 2020-01-AB release, TUFLOW parses the parameter data into number values and compares each of these numbers to check they are consistent. This should provide a more robust check less prone to falsely flagging the projections as different with "Message 0305" from Example 2.
Up |
---|
0xxx Messages |