Create 2D shapefile
    • 21 Oct 2022
    • 4 Minutes to read

    Create 2D shapefile


    Article summary

    Flood Modeller provides options to create shapefiles specific for active areas, computational areas, boundary lines, and more. However, sometimes there may be circumstances where these shapefiles need to be edited or recreated altogether.

    To create a 2D shapefile in the event of this:

    1. Provide a boundary references for the viewport
      Load an existing GIS file into the Flood Modeller viewport. This will normally be a ground grid, i.e. DEM, which will provide guidance as to where to draw a line to represent a reservoir boundary or river centre line, etc. Alternatively a geo-referenced image file, i.e. an aerial photograph or Ordnance Survey map tile, can be loaded to provide similar guidance.
      Load data by clicking the ‘Add GIS Data’ button from the Home toolbar. A new window is displayed that enables the user to browse to the file they wish to load.
    2. Start Shapefile Editing Mode
      Click on the New icon in the Home toolbar. This displays a drop-down list of new file types that can be created (as shown below). Select the shapefile option.
      EditingToolsimagescreateshapefile.gif
      A new window displays the shapefile options that can be generated in Flood Modeller.
      EditingToolsimagesnewshapefilelist.jpg
      After selecting the appropriate shapefile type use the browse button to define a new filename (and location). This displays a standard Windows browser for you to use to define the new file. When a filename is defined in the provided text box, click the OK button. The Layer Editor toolbar is then displayed above the viewport when the layer is in edit mode.
      EditingToolsimageslayeredit.jpg

    3. Start drawing a new shape
      The ‘Draw’ and ‘Edit Features’ toolbar groups provide the drawing functionality options available for the selected type of shapefile. These options are as follows:
      • For points - draw point
      • For lines - draw line, extend left, extend right, extend line settings - wherein you can specify the number of points to add per click and minimum distance between points when extending.
      • For polygons - draw polygon, add vertex, move vertex, delete vertex, move shape, reverse, and rotate.
        Drawing shapes on screen is controlled by the left and right mouse buttons as follows:
        1. To start drawing on screen left click at the required start point.
        2. Move the mouse across the viewport. A line will be drawn from the start point to the current mouse pointer location. This will be coloured red (default setting) to signify that it is a new line not yet saved to the shapefile.
        3. Left click again to add another point to the viewport and start another line segment. The line will be then coloured to green.
          Snow
          Forest
        4. If a mistake is made, right mouse-click and then click the Undo Last Point option from the pop-up display to undo the last point added.
        5. To end a shape, double click the left mouse button to define the last required point or right mouse-click and select the finish shape option from the pop-up display.
        6. Drawing mode will still be active so it is possible to start drawing a new line or polygon (repeat steps (i) to (v)). When a new line is started then the previously completed shape will turn green (default setting) to signify it is no longer being edited. It should be noted that at this point none of the new shapes drawn on the viewport will be saved to the shapefile under edit.
        7. The attributes of features added to a shapefile can also be edited. To show the attribute table right click on the layer in the TOC and choose Show Attributes. You may also do so by clicking the Attribute Window in the Properties toolbar.
          Edit attribute fields - the attribute data associated to the shapefile in edit mode is displayed in a new table. Double click on a cell to open a new table to edit attributes of a single feature, as shown below, or just highlight a field in the main attribute table and type values in there:
          EditingToolsimagesshpattributes.jpg
          Add new attribute columns - the current attribute columns associated to the shapefile in edit mode are displayed in a new table. Using the Edit Attribute Table Fields button  new columns can be added (defining a data type, e.g. text string or real number) and existing columns deleted. In addition, new columns can be auto-populated with an incremented text string if required.
        8. To save the new shape, select Save or Save As from the layer editor menu. Note the save operation will also update any new features added that have not been accepted using the update button and save the associated dbf data to your shapefile.
        9. To exit the shapefile editing mode, select Stop Edit also from the Layer Editor menu. If there are unsaved changes, Flood Modeller asks if these should be saved on exit. The shapefile editing toolbar then disappears from the Flood Modeller window.

    Useful tip: After a drawing action has been completed the Layer Editor menu contains undo buttons to roll back individual edits of shapes. The following toolbar buttons can be utilised:

    • Delete selected feature – this button can be found in the Selection group menu
    • Undo / redo last feature – these buttons can be found in the History group menu. If an arrow is coloured blue this means something is available to undo or redo.

    However, once the save button is clicked then actions performed before this cannot be undone.


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence