Marine Data Literacy 2.0

Providing instruction for managing, converting, analyzing and displaying oceanographic station data, marine meteorological data, GIS-compatible marine and coastal data or model simulations, and mapped remote sensing imagery

 

 

 

 

Home >2. Marine GIS > 2.12 Cutting a Shape

2.12 Cutting a Shape to the Project Map Extent in Saga

1.  You should already have the first 2 shapes in PRODUCTS > SAGA > VECTORS.  If you don't have them, copy them there and unzip them.
2.  METHOD 1:  Cutting a Point Shape
3.  Copy the file temp_atl_annu_woaselect.tar.gz to DATA > OCEAN > WOA and unzip it in place.  You will find 3 files with these names:
  • output.ps.shp
  • output.ps.shx
  • output.ps.dbf

Rename them as follows:

  • temp_atl_annu_woaselect.shp
  • temp_atl_annu_woaselect.shx
  • temp_atl_annu_woaselect.dbf
4.  You should already have the last 2 shapes in DATA > BORDERS.  If you don't have them, copy them there and unzip them.
5.  Load all 5 shapes into Saga.

NOTE:  Some of these objects may have higher versions numbers now.

6.  Use ADD TO MAP to show the point shape of temperatures.  It is hard to see and not really useful yet.
7.  In the properties (right panel) uncheck OUTLINE.
8.  For COLORS > TYPE selected GRADUATED COLORS.  Then open the drop-down menu beside ATTRIBUTE.  You can see the WOA "secret" here that all downloads include all depths.  Select SURFACE.

Then click SETTINGS > APPLY.

9.  Now you can see the colors for the analysis.  It is rather crude looking.
10.  In the properties, use the COLOR control to set 100 colors and the PRESET > RAINBOW palette.
11.  But we want to get only the data for Liberia, so zoom into the general area, as you see here.

 

12.  In the properties panel, select SIZE > DEFAULT SIZE = 2.

Then click SETTINGS > APPLY

13.  You can see the strange property of WOA:  It appears to be a grid, but viewed more closely it is actually a dense pattern of points.  This is a rare, but not unheard-of, method to visualize gridded data.
14.  Select TOOLS > SHAPES-TOOLS > CUT SHAPES LAYER
15.  Click on the ellipsis (...) to the right of SHAPES.
16.  Hers is a choice of shapes to cut.  Select temp_atl_annu_woaselect
17.  Then click > to move it to the right side.  Click OK.
18.  Now for METHOD select COMPLETELY CONTAINED.  And for EXTENT you can choose either SHAPE LAYER or POLYGON, because we have both available.

Here the author chooses SHAPES LAYER.

Then click OK.

19.  Now you are asked which shape to use.  Select the frame_liberia_lines shapefile.  Then click OK.
20.  A new point shape appears with the name temp_atl_annu_woaselect[CUT]
21.  If you ADD TO MAP with the new shape, it looks like this.  The COLOR control has been used to set 100 colors in a RAINBOW palette.  The temperature range, for your information, is roughly 25-28 deg C.
22.  Select the new point shape and use SAVE AS to navigate to PRODUCTS > SAGA > VECTORS to save it with the name temp_liberia_annu_woaselect_saga
23.  Panel removed
24.  METHOD 2:  Cutting a Polygon Shape.  Now we're going to cut a global polygon down to the Liberia area of interest.
25.  This is the general area of Liberia in the shape TM World Borders-0.3.
26.  Select TOOLS > SHAPES-POLYGONS > POLYGON PARTS TO SEPARATE POLYGONS.

For POLYGON, select the World Borders.  For POLYGON PARTS, select CREATE.

Then click OK.

NOTE:  This cleanup-step is needed to allow completely separate treatment of all national polygons, avoiding physical ties between polygons inside and outside the desired map.

27.  First we must split the polygons along the border of the Liberia area into separate smaller polygons that are either inside the Liberia frame or outside.

Select TOOLS > SHAPES-POLYGONS > POLYGON-LINE INTERSECTION.

28.  For the POLYGON, select TM World Borders [PARTS].  Then for the LINE, select frame_liberia_lines.  Then click OK.
29.  The new shape appears:  TM_WORLD_BORDERS-3.0 [PARTS][INTERSECTION: frame_liberia_lines]
30.  Here's the new polygon.  You can see that several countries in the Liberia area have been cut into separate parts.  The right-angle is not a simple line shape, it is the boundary between the newly separated shapes.  There are at least 5 distinctly separate polygons south-west of the right-angle line.
31.  Now cut out the 5 polygons in the new polygon shape, using the frame_liberia_lines shape, exactly as you did above in Panels 14-20.
32.  Here's the setup for the CUT SHAPES LAYER tool.  The shape to be cut is the new multiple polygon shape in Panel 30.
33.  Here's the selection of the shape to cut with.  It is the original Liberia frame, a lines shape.
34.  And here are the 5 polygons that survive the cutting process.

NOTE:  Examine closely to see if there are any "missing countries".

35.  Select SAVE AS and navigate to PRODUCTS > SAGA > VECTORS to save the new polygon as map_liberia_world_borders_saga
36.  METHOD 3:  Cutting a Lines Shape.  Now we're going to cut a global set of lines (i.e. not polygons) down to the Liberia area of interest.
37.  This is the lines shape World_EEZ_v7_20121120.zip, unzipped and mapped in Saga. 

NOTE:  Actually the low resolution version is shown and used here.  They both work similarly.

38.  You can zoom into the general area of Liberia to see that lines we will cut.
39.  Select TOOLS > SHAPES-LINES > LINE-POLYGON INTERSECTION.

For LINES select the World EEZ shape, renamed World Maritime Boundaries here.

For POLYGON, select the frame_liberia_poly shape.

This author selected KEEP ORIGINAL for the OUTPUT.

Then click OK.

40.  This new shape appears (number 000000003 in this group).

NOTE:  Ignore the old version number of the boundaries.

41.  Here' what the new shape looks like, mapped by itself.
42.  Select SAVE AS and navigate to PRODUCTS > SAGA > VECTORS to save the new shape as map_liberia_maritime_boundaries_saga
43.  Here we've added the Liberia frame to make the pieces look better, and to check that they fit exactly.
44.  And here we've added the new polygon from Panel 34, above, to see how all these pieces fit together.
45.  The author believes above 3 methods are robust, and will serve for most shape cutting work.
46.  SPECIAL NOTE ON LABELING POLYGONS IN THE ABOVE PRODUCTS:

If you have multiple polygons for a single country, and you want to label the main section and not many small sections:

  • Go to the polygon shape of interest, and select it with the (arrow-shaped action tool)

  • Show the attribute table.

  • In the attributes, you can delete the names of the entries you do not want to show. For example, under the NAMES attribute of the World Borders, you have multiple entries for Sierra Leona. You can make one of them blank (just erase the values inside the field), and the plotting will reflect that. 

  • If you want, you can also delete the whole entry (whole row), but you will no longer be able to use that definition for coloring, for example.  [From Mihael Souza, Pontal do Sul Course, 2013]
47.  If you're working on Pacific-centered data, then begin with a map system made in 2.13 Creating a 0-360˚ Map System in Saga for Pacific-Centered Analyses & Products, and then make sure your datasets are based on the same 0-360 degree system.  After those steps, then the above steps should all be the same.