~~META: creator = Christian Heine &date created = 2016-11-26 ~~ ====== Workflow to generate PaleoGIS projects ====== Having to work with PaleoGIS at work, I've been iterating on a workflow with the colleagues from the EarthByte group to produce a minimal, yet production-ready workflow to generate PaleoGIS models from scratch (or GPlates-default files - ''%%*.rot%%'' and ''%%*.shp%%''. Find the workflow on the [[software:paleogis|Notes on PaleoGIS]] section of the wiki ===== Notes on PaleoGIS ===== * The public manual for version 4.2 can be found on [[https://docs.google.com/document/d/1lCnru7iZ8Xhvf5XXyo9WhP4KAVkRRmo76eMD10OzK9o/pub|Rothwell's Google Docs page]] * The manual //for the plate modeler// 8-O is located [[https://docs.google.com/document/d/1HIFtjldYRzQa2OpBXSP6n80Ss78S_Llt3lO6x95wW8E/pub#h.iia746-m2m1cx|here]] and describes the steps to get a model set up. ===== Setting up a clean database ===== Building a PaleoGIS model without a PaleoGIS license, access to MS Access and being in Windows is close to impossible. There are ways to programatically do this but almost exclusively this is limited to the settings above. Some days of researching the webs didn't yield anything useful (e.g. using Python to write the database table). The used ''*.mdb'' format makes it very hard to reverse-engineer, the inability of ArcGIS to rename the ''OBJECTID'' field in the plate rotation table is another one. Here's my take on what I think is the most robust way to generate a working PaleoGIS model without actually having access to PaleoGIS. It leaves the last step of model building (importing the rotation file) to the PaleoGIS user with a valid license: - Use ArcCatalogue to generate an empty Personal Geodatabase (''%%*.mdb%%'' format){{ :software:arccatalogue_createpersonaldatabase.png?nolink | Creating an empty .mdb file}} - Import the feature data through right-clicking on the database file and selecting ''Import'' -> ''Feature Class (single)'' or ''Feature Class (multiple)'' depending on your input.{{ :software:arccatalogue_importfeatureclasses.png?nolink |}} - From an existing and working PaleoGIS database, copy over the following tables by simple drag'n'drop into your new database: - ''%%T_Model_Settings%%'' (required PaleoGIS model settings table), - ''PLATENAM'' (optional, referenced by the ''%%NUMBER_NAME_MAPPING%%'' parameter in the settings table). - ''DATATYPE'' (this table is required by [[https://docs.google.com/document/d/1HIFtjldYRzQa2OpBXSP6n80Ss78S_Llt3lO6x95wW8E/pub#h.1j3qwe-ue3dfu|PaleoGIS]] and is referenced by the ''%%DATATYPE_NAME_MAPPING%%'' parameter), as well as - a timescale table of choice (referenced by the ''%%TIMESCALE_SOURCE%%'' parameter). - Modify the following parameters in the ''%%T_Model_Settings%%'' in a way that the variables point to the correct feature classes or tables: * ''%%TIMESCALE_PREFERRED%%'': Value should be set to the name of the timescale table you've copied into your database. * ''%%DISPLAY_LAYER_[1-9]%%'': Value should be set to the feature class that should be displayed when the model is loaded. Increment the number at the end of the name string for any other added feature. Note that you need to use the following notation if you have simple, unstyled feature classes: ''%%$PGD$|%%'', if you have styled layers files, the syntax becomes: ''%%$PGD$|DATABASE_LAYERS\%%''. * ''%%DATATYPE_NAME_MAPPING%%'': This value points to the ''DATATYPE'' table which is required to be present. * ''%%TIMESCALE_SOURCE%%'': Name of the timescale table. * Adjust the ''%%PLATE_COLUMN%%'', ''%%APPEARS_COLUMN_1%%'', ''%%DISAPPEARS_COLUMN_1%%'' to the correct names of the corresponding columns in your feature class files. Following the formal GPlates Standard Naming scheme, the column names should be ''PLATEID1'', ''FROMAGE'', and ''TOAGE''. Leave the parameters specifying the rotation table columns (such as ''%%MODEL_LATITUDE_COLUMN%%'' or ''%%MODEL_REFPLATE_COLUMN%%'' unchanged as the PaleoDataConverter output will automatically use the default PaleoGIS naming scheme for these columns Once the database is complete and the name-attribute mapping in the ''%%T_MODEL_SETTINGS%%'' table is correct, pass the database on to your friendly plate modeler with a PaleoGIS license. The steps to complete the assembly of the PaleoGIS database are then simply to: - Open up an ArcMap document with PaleoGIS installed. - Open up the PaleoGIS settings {{ :software:paleogis_settings.png?nolink |}} - Register the new model by clicking on ''Register Model'', then click on the ''...'' Button next to ''Model Path''. The settings table should be automagically be registered, as the model name (''CITATION'' value in the ''%%T_MODEL_SETTINGS%%'' table). Once done, click ''OK'' to load the model (with the tickbox for ''Load model after registering'' checked).{{ :software:paleogis_registerplatemodel.png?nolink|}} Registering a plate model without a rotation file causes a slight hickup in PaleoGIS probably displaying an error. However, I found that this doesn't have any major repercussions. Once this workflow is completed, the plate model should work fine. - Once this is done, PaleoGIS will probably have a little hissy fit, but close the ''Configuration'' window. - Make sure that the toolbar is available through right clicking on the ArcMap menu bar, the activating the ''%%PaleoGIS: Analysis Tool%%'' menu.{{ :software:paleogis_analysistoolbar.png?nolink |}} - Select the ''%%Paleo Data Converter%%'' from the PaleoGIS Analysis Toolbar {{ :software:paleogis_importsettings_paleodataconverter0_earthbyte.png?nolink |}} - Select ''Rotation File (.rot)'' as input data type.{{ :software:paleogis_importsettings_paleodataconverter1_earthbyte.png?nolink |}} - Select ''Personal Geodatabase Table (.mdb)'' as Output format, the output location needs to be in the newly created ''*.mdb'' database. Afterwards click on ''Run''.{{ :software:paleogis_importsettings_rotationfile_earthbyte.png?nolink |}} - Your plate model for PaleoGIS should now be complete and useable. If necessary adjust the ''%%T_MODEL_SETTINGS%%'' table. {{tag> PaleoGIS software Plate_tectonics Reconstructions GIS GPlates workflow}}