2.15 Shape from XYs

Home > 2. Marine GIS > 2.15 Shape from XYs

2.15 Creating a New Shape in Saga from Published Coordinates

1.  Open and read through the Garden Banks website, covering some really wonderful reefs in the Gulf of Mexico.  It includes maps for the different banks that make up the Sanctuary.  We're interested in Stetson Bank, shown here.

Its coordinates, as is true of all national and international marine protected areas, are established by law and must be quoted and used exactly.

2.  To convert the coordinates to usable signed decimal degrees, make this Excel spreadsheet.

You can see the easy formula to change each value to "original" format to "decimal" format:

  • Degrees
  • Plus minutes/60
  • Plus seconds/3600

With the overall signs given by the hemisphere of the original data.  Negative longitudes in this case.

Note that the first column contains integers.  Only one polygon is included here (Stetson Bank), and it is arbitrarily named 1.  Only the polygon corners are needed (4 in this case), and the first coordinate is not repeated at the end to close the polygon.  Saga does that automatically.

3.  Save these files:
  • stetson_bank_coordinates.xlsx - Excel spreadsheet; for possible future editing
  • stetson_bank_coordinates.txt - Tab-separated ASCII for import into Saga

4.  In Saga, select FILE > TABLE > LOAD TABLE and load the TXT file you just made.

6.  This description indicates that you can make points, lines or polygons.  The input must include X, Y and IDENTIFIER columns.
7.  Here the proper choices have been made. 
  • If you selected LINES you would get a multi-sided shape that is not closed.
  • If you selected POINTS then you would get a set of separate, unconnected points. 
  • We chose POLYGONS to get a closed shape.
8.  And here is the polygon shape, color-filled, which is a characteristic of new polygons.
9.  And here is the polygon mapped in Saga.  You can see the Texas coast (from World Borders) along the western side of the map.  Great things come in small packages.
10.  Make sure to save the new shape with an appropriate name in PRODUCTS > SAGA > VECTORS.
11.  The TXT file can contains more than one polygon.  Each separate polygon is identified by unique integer identifiers; below they are 1 and 2.  Here is the word from Volker Wichmann, the author of the module:

"For polygons, the table should look like this (tab-delimited example for two polygons [just two simple rectangles]):

ID         X            Y

1          0.0          0.0

1          0.0          1.0

1          1.0          1.0

1          1.0          0.0

2          10.0        10.0

2          10.0        20.0

2          20.0        20.0

2          20.0        10.0


Where ID is an identifier unique to each polygon, and X and Y are coordinates for each polygon vertex."

12.  And of course you could have chosen LINES or POINTS in Panel 7 above, to create any type of shape you want.  So whenever the object location is defined by an existing set of coordinates, you can easily use this method to create and save the shapefile.