= GPlates Tutorial: ShapeFiles == Author Sabin Zahirovic^1^ ^1^EarthByte Research Group, School of Geosciences, University of Sydney, Australia == Introduction This tutorial describes some common tasks related to managing shapefiles that can be carried out in *GPlates*. Shapefiles can be viewed natively in GPlates without having to perform any file conversions (assuming they conform to shapefile standards). *GPlates* will also export shapefiles to be used in other GIS platforms, such as ArcGIS. Additionally, *GPlates* is capable of converting legacy PLATES4-formatted files into the shapefile format, as well as GPlates GPML and GMTxy. .IMPORTANT: 1. Shapefiles are actually a collection of linked files. All these files *must* be located in the same directory as the .shp file that is being loaded into *GPlates*. The file extensions include: .sbx, .dbf, .pri, .sbn, .shx. When using *GPlates* only the file with the .shp extension is loaded, the rest are automatically referenced by the program, but will not have to be opened or read by you the user. 2. When you create shapefiles in *GPlates*, *GPlates* will automatically generate the necessary ancillary files. 3. Only rename shapefiles in your GIS editor, including GPlates (ie do not rename the .shp file in your Finder/MyComputer etc). [NOTE] =================================== The shapefiles associated with this tutorial are in a WGS 84 geographic datum. If you are working in another projection within ArcGIS, you may need to apply a geographic transformation to the data. This is reasonably straight-forward and automatic in most GIS packages. Refer to the manual of your GIS package for more information. =================================== === Required Data - http://www.earthbyte.org/Resources/GPlates_tutorials/Shapefile_Tutorial/SampleData/Shapefile_Tutorial_Data.zip[Shapefile tutorial data] Create a folder named +Working_with_Shapefiles+, unarchive the data bundles into this folder, and remember the location so you can access the datasets later. == Exercise A - Exporting GPlates files to shapefiles for use in GIS packages such as ArcGIS - Open *GPlates* - The sample *GPlates* data is contained in the data bundle for this tutorial. In *GPlates*, navigate to *File -> Manage Feature Collections -> Open Fileā€¦* - Navigate to the sample data directory, and select the coastline file. i.e. +Global_EarthByte_GPlates_Coastlines_20091014.dat+ (Figure 1) -> *Open* image::shapefile_tut_image1.JPG[] _________ *Figure 1:* Loading feature data into GPlates. _________ - Coastlines are now displayed in GPlates. To export these data in the shapefile format, open the 'Manage Feature Collection' window again. Next to the filename, click the 'Save a copy of the file with a different name' image:save_copy.JPG[] button (Figure 2). image::shapefile_tut_image_2_2.JPG[] _________ *Figure 2:* There are different options for saving files under the Actions tab in the Manage Feature Collections window. In this exercise we are using the option to save a copy of our data with a different name. _________ - Specify the name of the output shapefile as "GPlates_Coastline", and select the +ESRI shapefile (.shp) file type+ (Figure 3). Click *Save* to complete export. *GPlates* exports the geometry with the accompanying attribute information such as Plate ID, Name, etc. This means that this shapefile can be directly loaded in *GPlates* again. image::shapefile_tut_image_3_2.JPG[] _________ *Figure 3:* The 'Save as type' drop down box enables you to choose which format you would like your data to be saved in. _________ == Exercise B - Load geological province shapefiles in GPlates - *File -> Manage Feature Collections -> Open File ...* - Navigate to where you have saved sample data for this tutorial, select the four geological province shapefiles (+CarpentariaBasin.shp+, +EuclaBasin.shp+, +MarionTerrain.shp+ and +QLD_Plateau.shp+) and click *Open*. The first time you load a shapefile in *GPlates*, you will be prompted to assign the shapefile fields that correspond to the *GPlates* model properties. For our purposes, ensure that 'Plate ID' and 'Name' match the corresponding shapefile fields of the same titles, by making the necessary selections from the drop-down lists (Figures 4 and 5). Click *OK* and repeat this process for the other geological provinces. NOTE: Warning messages regarding unknown feature types may appear upon loading, but these can be ignored. This is because we have not assigned Feature Types in this exercise. image::shapefile_tut_image_4_2.JPG[] _________ *Figure 4:* Selecting the shapefile attribute that corresponds to each GPlates geometry. _________ image::shapefile_tut_image_5_2.JPG[] _________ *Figure 5:* Use the dropdown boxes to make sure that the GPlates Plate ID and Name fields match the correct shapefile attributes. _________ If by accident you choose the wrong shapefile attribute, you can reopen the Map Shapefile Attributes window at any time by using the 'Edit the files configuration' button image:edit_files_config.JPG[], under 'Actions', in the 'Manage Feature Collections' window. - *File -> Manage Feature Collections* -> select the 'coastline' and 'rotation' files from the *GPlates* data bundle folder (the coastline file will already be loaded if you are continuing from the last exercise) -> *Open* -> now close the 'Manage Feature Collections screen to return to the main globe view. The coastline and rotation files are now loaded. Use the animation tools to reconstruct your data. You will notice that the four geological provinces will move with the Australian plate (as they share the same plate ID). In Figure 6, screenshots from *GPlates* are taken at present day (0 Ma) and 20 Ma. image::shapefile_tut_image_6_2.JPG[] _________ *Figure 6:* View of the Australian region showing that the basins are moving fixed to Australia. _________