antikythera survey project - ucl

16
ANTIKYTHERA SURVEY PROJECT 1 Tutorial 1b – Introduction to ASP Data and QGIS (with GRASS) Andrew Bevan and James Conolly (15.01.08) I. Introduction This tutorial is an introduction to ASP datasets using the Open Source GIS software known as Quantum GIS (QGIS), including the powerful added functionality provided by its plugin to GRASS GIS. The tutorial and the datasets it uses can be found on the ‘Downloads’ page of the ASP website (http://www.ucl.ac.uk/asp/ and/or http://naxos.tuarc.trentu.ca/~aspweb/ ) and will also be archived with the UK Archaeology Data Service (http://ads.ahds.ac.uk/ ) from 2009. This particular tutorial seeks to convey the key features of ASP’s primary datasets, how they are integrated with one another and how they might be most easily manipulated. ASP methods sought to strike a balance between maintaining some direct comparability with a range of existing survey datasets in the Aegean area, developing practices that streamline field recovery methods, facilitating meaningful spatial statistical analysis and making our results relatively easily understood and used by others. As a result of the compromises that such a balancing act requires, the recovery and recording methods are certainly not claimed as a single form of best practice for such research, though we are happy that they nonetheless offer a reliable basis for more substantive archaeological interpretation. This tutorial is also certainly not meant to provide a full overview of QGIS/GRASS functionality, but nonetheless assumes little or no previous knowledge of these package. QGIS is the name for a platform-independent (i.e. it runs on Windows, Unix and Mac OSX) piece of Open Source GIS software that handles a wide range of data formats, and some very nicely designed functionality. Although QGIS started life (in 2002) primarily as a spatial data viewer with limited initial functionality, its core features have increased steadily and the current release (0.9.1 Ganymede) offers the ability to: manage map projections and coordinate systems, read/write multiple spatial data formats, link to and query a range of external databases (such as PostgreSQL), create and editing vector data, manage and georeference raster datasets, handle GPS input, and produce effective map output. Through a plugin, it can also make use of the extremely powerful tools available in the GRASS GIS package. QGIS also mimics streamlined menus systems and tools offered by commercial packages such as ESRI’s ArcGIS package – it is still in a relatively early stage of development, but, with GRASS, already offers an important no-cost alternative to the major commercial GIS packages. QGIS is released under a GNU General Public License, meaning that you are allowed to download it freely as well as read and modify the original source code. In terms of software, this tutorial therefore requires that you have downloaded and installed QGIS from (v.0.9 or later) from the project website at http://www.qgis.org/ and also GRASS GIS (v.6.3 or later). The latter can be obtained from http://grass.itc.it/ but sometimes is already bundled with QGIS, depending on the platform (Windows, OSX, Linux, etc.) that you are working on. II. ASP Data Setup Please download the following datasets (about 18.5 Mb in total) from the ‘Downloads’ page of the ASP website (http://www.ucl.ac.uk/asp/ and/or http://naxos.tuarc.trentu/~asp/ ). If, for whatever reason, you are not able to get them from this source, they will have been bundled with this tutorial or, from 2009 onwards, will also be archived with the UK Archaeology Data Service (http://ads.ahds.ac.uk/ ). Survey Units – this will be a file called survey.zip Database - this will be a file called db.zip Quickbird Satellite Imagery - this will be a file called qb.zip Full Resolution Quickbird Sample - this will be a file called qb10.zip

Upload: others

Post on 26-Nov-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

1

Tutorial 1b – Introduction to ASP Data and QGIS (with GRASS) Andrew Bevan and James Conolly (15.01.08)

I. Introduction This tutorial is an introduction to ASP datasets using the Open Source GIS software known as Quantum GIS (QGIS), including the powerful added functionality provided by its plugin to GRASS GIS. The tutorial and the datasets it uses can be found on the ‘Downloads’ page of the ASP website (http://www.ucl.ac.uk/asp/ and/or http://naxos.tuarc.trentu.ca/~aspweb/) and will also be archived with the UK Archaeology Data Service (http://ads.ahds.ac.uk/) from 2009. This particular tutorial seeks to convey the key features of ASP’s primary datasets, how they are integrated with one another and how they might be most easily manipulated. ASP methods sought to strike a balance between maintaining some direct comparability with a range of existing survey datasets in the Aegean area, developing practices that streamline field recovery methods, facilitating meaningful spatial statistical analysis and making our results relatively easily understood and used by others. As a result of the compromises that such a balancing act requires, the recovery and recording methods are certainly not claimed as a single form of best practice for such research, though we are happy that they nonetheless offer a reliable basis for more substantive archaeological interpretation. This tutorial is also certainly not meant to provide a full overview of QGIS/GRASS functionality, but nonetheless assumes little or no previous knowledge of these package. QGIS is the name for a platform-independent (i.e. it runs on Windows, Unix and Mac OSX) piece of Open Source GIS software that handles a wide range of data formats, and some very nicely designed functionality. Although QGIS started life (in 2002) primarily as a spatial data viewer with limited initial functionality, its core features have increased steadily and the current release (0.9.1 Ganymede) offers the ability to: manage map projections and coordinate systems, read/write multiple spatial data formats, link to and query a range of external databases (such as PostgreSQL), create and editing vector data, manage and georeference raster datasets, handle GPS input, and produce effective map output. Through a plugin, it can also make use of the extremely powerful tools available in the GRASS GIS package. QGIS also mimics streamlined menus systems and tools offered by commercial packages such as ESRI’s ArcGIS package – it is still in a relatively early stage of development, but, with GRASS, already offers an important no-cost alternative to the major commercial GIS packages. QGIS is released under a GNU General Public License, meaning that you are allowed to download it freely as well as read and modify the original source code. In terms of software, this tutorial therefore requires that you have downloaded and installed QGIS from (v.0.9 or later) from the project website at http://www.qgis.org/ and also GRASS GIS (v.6.3 or later). The latter can be obtained from http://grass.itc.it/ but sometimes is already bundled with QGIS, depending on the platform (Windows, OSX, Linux, etc.) that you are working on.

II. ASP Data Setup Please download the following datasets (about 18.5 Mb in total) from the ‘Downloads’ page of the ASP website (http://www.ucl.ac.uk/asp/ and/or http://naxos.tuarc.trentu/~asp/). If, for whatever reason, you are not able to get them from this source, they will have been bundled with this tutorial or, from 2009 onwards, will also be archived with the UK Archaeology Data Service (http://ads.ahds.ac.uk/). Survey Units – this will be a file called survey.zip Database - this will be a file called db.zip Quickbird Satellite Imagery - this will be a file called qb.zip Full Resolution Quickbird Sample - this will be a file called qb10.zip

Page 2: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

2

To avoid trouble during this tutorial, we will adopt filenaming conventions that keep file and folder names to seven or fewer characters in length with no capitals and no spaces. Please extract ASP data to a folder path on your computer that conforms to these requirements and places all datasets within a directory called asp (e.g. C:\asp\ in Windows would be good). Within this folder, you should end up with extracted datasets that have the separate sub-directory names \survey, \db, \qb10 and \qb (you could then delete the original zip files to save space).

III. QGIS: the basics Now Launch QGIS. If you maximize the resulting screen you should end up with something similar to the one below (although it will differ slightly depending on your platform: this one is for MacOS):

The basic QGIS interface has six parts:

i) Menu Bar – is a typical hierarchical menu system which offers access to a range of functions for file management (File), map navigation (View), loading and removing datasets (Layer), adjusting the general properties of your GIS project (settings) and adding in extra GIS functionality (Plugins).

ii) Tool Bar – is typically located at the top of the screen and provides button shortcuts to most of the same functions as the menus, and some navigation and query tools. Toolbars can be docked or made to float free on screen as in many other windows programs.

iii) Map Legend – is typically located on the left-hand side of the screen and allows you to turn on and off the visibility of particular layers and alter the order in which they are displayed (those listed first are displayed above). Individual layers can also be grouped together in the map legend if required. This roughly the equivalent of the Dataframe Table of Contents in ArcGIS, for example.

iv) Map View – is typically located on the right-hand side of the screen and is where map data is displayed. It facilitates panning and zooming functions and its contents are linked to the display order, symbology and loaded layers specified in the Map

Page 3: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

3

Legend. v) Map Overview – offers a quick impression of the full spatial extent of the area

pertaining to loaded map data. A rectangle also specifies the current extent of the Map View. you need to specify that a layer should be displayed in the overview before it will appear.

vi) Status Bar – gives you the current location of the cursor/pointer in map coordinates (e.g. meters or decimal degrees) and the scale of the current Map View.

The Map Navigation tool bar (shown far right and partially off-screen in the QGIS map screen grab above).

It gives you basic ways to zoom in and out, while the Attributes Toolbar allows you some basic methods to select features and extract attribute information about datasets in the map window. The best way to explore these features is to experiment and you might toggle on and off various toolbars in the ViewToolbar Visibility option to see which one is which. A handy button to use if you get lost while zooming in and out is ‘Zoom Full’ which will zoom you back to the full extent of the data shown in your map window.

QGIS works with an excellent range of different spatial formats, but we will work primarily with the long-established, traditional ESRI vector datasets called shapefiles (to mirror tutorial 1a), and with the ESRI raster datasets known as Grids. Shapefiles are usually referred to by their .shp suffix but both these and the Grid datasets actually comprise a number of related files that work together (or, alas, not at all if they become separated through bad file management). 1. Please click on the Add a Vector Layer button in the main button bar.

This brings up a dialog box: please browse to the shapefile \survey\coast.shp and add it to your QGIS map window. The QGIS interface operates with a left-hand table of contents where the new dataset now appears. 2. The latter dataset is in the projected coordinate system known as UTM WGS84 zone 34N and we need to set this for the overall view by going to SettingsProject Properties. Here, in the ‘Spatial Reference System’ part of the dialog, expand the section for ‘Projected Coordinate Systems’ and then ‘Universal Transverse Mercator (UTM) and choose ‘WGS 84 / UTM zone 34N’. This is the common projection used for all ASP data, primarily because it facilitated easy integration of Quickbird imagery and handheld GPS readings in the field. Setting it as the QGIS project projection then allows the software to work out the correct scale of the view and the coordinate where the cursor is resting (shown in the bottom right corner). If you wish to view your map at a different scale, you can enter a new scale in the white box and your view will change accordingly. Likewise, the Measure Line button can be used to measure distances across the map (which are reported in small floating dialogue).

3. Although QGIS happily loads and display a range of vector formats, for some purposes it is useful to convert them into GRASS-friendly formats so that a range of extra functionality can then by used with them. First brose to your asp directory and create a new sub-directory within it called ‘grass’. We will load the GRASS plugin for QGIS – go to Plugins->Plugin Manager and, in the resulting dialog, tick the box next to GRASS and then click OK. If QGIS prompts that it cannot find the path to GRASS GIS (GISBASE) then you need to specify the directory in which grass.sh sits on your computer (do a search for this filename if you struggle to find it). 3. If you have not set one up before, you will then be prompted to specify the Database, Location

Page 4: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

4

and Mapset that, in combination, become the working environment for a specific GRASS project. The first dialog asks you to specify a ‘Database’ and explains that this is the top-level directory of the directory tree used to store GRASS datasets. Browse to the \asp\grass directory that you have just created and click ‘Choose’ and then click ‘Next’. The next dialog then asks you to choose an old or create a new GRASS ‘Location’. GRASS Locations store collections of spatial data in which the coordinate information is consistent and has been carefully defined. Type in ‘asp’ next to the ‘Create New Location’ option and then click Next. The next dialog offers you the option of specifying the coordinate system for use in this mapset, but also offers you the option of applying the one you already have in your QGIS project. Therefore just click Next again. The next dialog offers you the option of defining a GRASS ‘region’, in other words, the spatial limits in map coordinates of your project and the cell size for any raster data operations. Again it offers you a default based on the existing data in QGIS so please just click Next again. A final dialog asks you to specify a mapset name. GRASS mapsets include both a PERMANENT mapset, typically for read-only use by all project users and also a user-specific mapset. For now just specify your last name in the space next to ‘New Mapset:” (e.g. ‘bevan’ or ‘conolly’ in the authors’ case). Now click Next and then Finish. If you have set this up before, you may need to re-confirm these settings each time you open your QGIS project, but this is easily done using the ‘Open Mapset’ button.

5. Adding the GRASS plugin will then provide you with a new GRASS plugin toolbar. Click on the button ‘Open GRASS Tools’

After a moment you will see a list of common GRASS tools appear. 6. First we will make a small change to the default database settings in GRASS to ensure that we can manipulate the ASP aspatial data in a convenient way. Make sure the Modules tab is selected at the top of the dialog and then scroll down to the bottom of the list of GRASS tools until you see DatabaseDatabase Managementdb.connect. Select this and you will be presented with a new dialog: please set the driver to ‘sqlite’. Then set the Database name to the following: ‘$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db’. Then click Run. You should then get a message stating that this task was successfully finished – you have changed the default database format in which GRASS stores its attribute (aspatial) data from dbase to sqlite which will make life easier later on in the tutorial. Click Close. 7. Now lease click on the Add a Vector Layer button in the main button bar and browse to the shapefile \survey\coast.shp and add it to your QGIS map window. Rather than simply working with this shapefile, as is, for the rest of the tutorial, we will now convert it into a native GRASS vector format (again, so that we can apply of a wider array of functions to it). Make sure, first of all, that you have the Modules tab chosen at the top of the GRASS Tools dialog and then, from the list of tools, choose FileImportImport vectorv.in.ogr. Choose tracts.shp as the input ‘OGR vector layer’ and call the output ‘tracts’. Then click ‘Run’. The program will run for a while and eventually will say ‘Successfully finished’. Click Close and then also close the original GRASS Tools dialog. 8. Now first remove the existing shapefile called tracts, by right-clicking on it and then choosing ‘Remove’. Instead, now click on the button in the GRASS Plugin Toolbar called ‘Add GRASS vector layer’

Make sure the map name is set to your newly imported dataset ‘tracts’ and click OK. Your new GRASS version of tracts will be added as ‘tracts1’.

Page 5: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

5

9. Now, double-click on the name of the tracts shapefile in the Map Legend to bring up the Layer Properties dialog – this provides you with a wide variety of information pertaining to this individual layer in your QGIS project. Now choose the Symbology tab at the top of the dialog window and you will be able to see that the default display mode is to show this layer as a single symbol (though the default colour is chosen randomly and thus varies). The shape, size and colour of vector datasets can be modified in a wide range of ways using these options. First, left-click on the colour button opposite ‘Outline Color’ – in the resulting dialog, choose the second button along (Color Sliders) and switch the drop down option to ‘RGB Sliders’, then stipulate an RGB value of 230,152,0 (orange), then click OK. Now, in the original dialog, change the Outline Width to 1. Now left-click on the bottom right button (above where it says ‘Browse’) in the bottom section of the dialog to set the polygon symbology to ‘No Fill’. Then click OK. The set of polygons that you now see outlined in orange maps out ASP’s stage-one survey method which is a slight variation on a well-established Mediterranean survey technique which divides the landscape into sub-hectare collection units (that are sometimes arbitrary in shape and sometimes follow real-world zones such as patches of similar vegetation or walled agricultural fields). ASP and several other Aegean surveys refer to these polygonal units as ‘tracts’ and each tract delimits a zone that was walked across in straight lines by surveyors spaced a certain distance apart (in our case every 15m). Overall, we have walked over 95% of the island in this manner, with the only unwalked areas being some exceptionally steep scarps and coastal cliffs. Each surveyor recorded separate counts per tract of the total pottery and lithics they observed and also made a permanent collection of any pottery sherds that were bases, rims, handles or decorated pieces (what ASP for convenience has termed ‘feature sherds’) as well as any worked lithics that they encountered. 10. Now click on the Add Vector Layer button again and add \topo\grids.shp (we will not need to convert this file to a GRASS format for the purposes of this tutorial so we can leave it as the original shapefile). This is the set of 10x10m grid squares mapping out ASP’s stage-two survey method. Right click on the name of the tracts shapefile in the Table of Contents, left-click on the Properties option and then choose Symbology again. Go to the main icon showing the appearance of the grid dataset and, in the resulting dialog, set the Fill Color to ‘No Color’, the Outline Color to red (RGB: 255,0,0) and the Outline Width to 1. Then click OK. Double-click on the name of the tracts shapefile in the Map Legend to bring up the Layer Properties dialog and then choose the Symbology tab at the top of the dialog window. Now left-click on the colour button opposite ‘Outline Color’ – in the resulting dialog, choose the second button along (Color Sliders) and switch the drop down option to ‘RGB Sliders’, then stipulate an RGB value of 255,0,0 (red), then click OK. Now, in the original dialog, change the Outline Width to 1. Now left-click on the bottom right button (above where it says ‘Browse’) in the bottom section of the dialog to set the polygon symbology to ‘No Fill’. Then click OK. The sets of squares now outlined in red reflect the second stage of our intensive surface survey which has involved the collection of a systematic sample of artifacts from 57 different locations across the island. A particular emphasis was placed on exploring prehistoric scatters in an attempt to mitigate the lower diagnostic visibility of these earlier periods in the tractwalking record. Such stage-two collections were organised on a 10x10m grid, with the centre of each grid square defined by a four-digit UTM coordinate pair (in a multiple of five, e.g. 3456, 0125). Not only did this simplify recording, but because it located artefacts to within ca. 10m of their actual position, it also integrates easily with our stage-one tractwalking collection (as above). Within each section of the grid, a circular area of 5 sq.m was completely vacuumed of cultural material over a timed 5-minute observation period, and then, in the rest of the square, grabbed all worked lithics, metals etc, and any pottery sherds that were bases, rims, handles or decorated pieces (what ASP for convenience has termed ‘feature sherds’). Overall, some 1,700 squares were collected (just less than a 1% sample of the island's entire extent), providing a more detailed impression of the size and function of the numerous prehistoric activity areas observed across the island.

Page 6: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

6

11. Now turn off your coast.shp layer by unticking the box next to it in the Table of Contents. This should leave just the tracts and grids visible. 12. Now click on the ‘Add a Raster Layer’ button in the main toolbar.

Browse to the \qb10 directory, choose qb10tc.tif and then click ‘Open’ to add it to the Map View. So far we have been dealing exclusively in vector datasets whose geospatial character is defined using coordinate geometry. In contrast, this is a raster dataset, which is a different type of geospatial data model made of pixels or cells of a certain size arranged in a grid. This is pan-sharpened image from the Quickbird satellite, made available by kind permission of Digital Globe and Eurimage. It has been downsampled (i.e. degraded in quality) to a 10m pixel or cell resolution to conform to their copyright restrictions, but remains useful for general orientation of landscape features on Antikythera. 13. Click on qb10_tc in the Map Legend and drag it below the vector datasets so that it displays below the in the map view. Your QGIS project should now look something like the one below:

14. Now use the Add a Raster Layer button again and browse to \qb\qbtc.tif. Select this dataset and then click ‘Open’ to add it to the Map View. It is a sample 2x2km portion of a pan-sharpened Quickbird image provided at full resolution (again, with the kind permission of Digital Globe and Eurimage). 15. Make sure the resulting qbtc dataset is list above, and hence displayed on top of, the lower resolution qb10tc in the Map Legend but below all other files (if it is not, you can grab its name and drag-and-drop it above). Now right-click on the name of this image in the Map Legend and choose the option ‘Zoom to layer extent’. You should allow you to see the detail of the image, along with the tracts and grids – untick the box next to qb10tc.tif in the Table of Contents and your map window should now look like the one below:

Page 7: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

7

16. To save this overall set of files and the way they are displayed in the map view, go to FileSave Project and save it in your main asp directory as tut1b.qgs. Note that this is an overall QGIS project file and does not save the actual geospatial data with it. If you wishes to pass on this project to another user, you would have to give them the whole asp folder and they would need to reset several directory paths to allow the project to work on their own computer (GIS projects of this kind are therefore not as trivial to share as the ordinary single file formats with which people are very familiar).

IV. Databases: Tract-Level Records We will now have a look at how to combine ASP’s many data records with the spatial units that you have already added to your QGIS project. In \asp\db\ you will see there are a series of three .csv files containing the key aspatial data associated with ASP field and laboratory work (with individual data values delimited by comma separators). In database terms, they have a series of simple field types and relationships to one another that are described in the accompanying text document (readme.txt). To begin with, we will focus on the tract-level records kept as part of our stage-one survey method. 1. Now we will make use of GRASS for some database manipulation. To avoid problems, we will run our functions from the GRASS command line which can be accessed either through the Grass tools plugin within QGIS (‘GRASS shell’) or by launching GRASS independently (try the letter if you encounter any glitches in the former). At the command line type (all on one line): db.in.ogr dsn=[LOCALPATH]t_tractrecord.csv output=t_tractrecord Please make sure to replace [LOCALPATH] in the above statement with the path on your local system’s directory structure that leads to the asp directory (excluding the square brackets), then press Enter/Return. Running this module (db.in.ogr) imports your csv file into the GRASS database management system (set earlier on in this tutorial to use SQLite). When the process is

Page 8: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

8

finished the command line prompt will re-appear (if there is an error, you will be notified, but otherwise nothing else will happen). Now type (all on one line): v.db.join map=tracts layer=1 column=TRACT_ID otable=t_tractrecord ocolumn=tract Running this module (v.db.join) then makes the join between the tracts polygons and ‘t_potdens’ based on their shared id field (labeled ‘TRACT_ID’ and ‘tract’ respectively). When the process is finished the command line prompt will re-appear (if there is an error, you will be notified, but otherwise nothing else will happen). 3. This will have joined the attribute table of the tract polygons to the data table with the tract-level information, via the tract ids that both tables share. As a result, we are now in a position to plot this data on a map. We will have a look at ground surface visibility as an example. Returning to the QGIS main interface, double-click on the tracts polygon layer and make sure you have chosen the Symbology tab in the resulting dialog. Set the Legend Type as ‘Continuous Color’ and the Classification field as ‘visibility’. Now set the Minimum Value to begin with the colour RGB 107,0,0 and the Maximum Value to end the colour ramp with the colour RGB 255,255,128. If you have done this correctly your screen should now look like the one below:

On this map, areas of good surface visibility (i.e. those not obscured by vegetation cover etc.) are shaded yellow while poor visibility areas are shown in red. More precisely, the method of estimation used here expresses the percentage of ground surface visible to the whole survey team as they walked across the tract (i.e. it is an average estimate usually decided upon by the team leader in consultation with the other surveyors in the team), and is by now a relatively well-established indicator adopted by many surface surveys in the Mediterranean. In fact, ASP is not entirely comfortable with the reliability of this measure, not least because it can be shown to exhibit quite a lot of inter- and intra-observer variation depending on who is recording it and at what time of the day, In fact, for much of our analysis, we prefer measures based on reclassification of high-resolution remote sensing imagery to suggest levels of visibility as affected by ground cover.

Page 9: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

9

Take a minute to use the zoom tools to explore visibility across the whole island (you may also want to turn off some of you other layers to speed up the process). When you are finished, proceed with the next part below.

V. Databases: Walker-Level Records During stage-one tractwalking, individual walkers also recorded their own smaller forms for each tract, noting an estimate of the distance they covered as part of that tract (a rough conversion to metres based on a count of their paces which was then converted to metres using an averaged estimate of their own individual stride length), a count of the pottery and other finds they observed. ASP has developed an automated method of plotting individual walker lines within each tract polygon (based on tract shape as well as database information about walking direction and walker order from left to right) which allows us to make use of these walker records and plot artefact densities per walker rather than per tract – an example of this is shown in the figure below.

An example of walker lines plotted within tract polygons. Each line has a unique id and can be further sub-divided by walked 10m segment for the purpose of plotting collected artefacts (see section VI below).

However, for our purposes here we will aggregate this data and display it as artefact densities per tract. 1. Bring up a GRASS command line and type the following (all on one line): db.in.ogr dsn=[LOCALPATH]/asp/db/t_walkerrecord.csv output=t_walkerrecord Please make sure to replace [LOCALPATH] in the above statement with the path on your local system’s directory structure that leads to the asp directory (excluding the square brackets), then press Enter/Return. Running this module (db.in.ogr) imports your csv file into the GRASS database management system (set earlier on in this tutorial to use SQLite). When the process is finished the command line prompt will re-appear (if there is an error, you will be notified, but otherwise nothing else will happen). 2. However, for each survey unit (i.e. each tract polygon) we have more than one surveyor recording information in t_walkerrecord and hence, for our purposes here, we need to aggregate

Page 10: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

10

this data into a summary per tract (which will then allow us to join it to the polygons in a one-to-one relationship). So at the command line please now type (all on one line): db.select fs=, sql="SELECT tract, SUM(sherds) sum_sherds, SUM(distance) sum_dist, CAST(SUM(sherds) AS FLOAT)/CAST(SUM(distance) AS FLOAT)*5000 potdens FROM t_walkerrecord GROUP BY tract" >& t_potdens.csv Running this module (db.select) with this complicated set of inputs, asks GRASS to perform a query on the ‘t_walkerrecord’ table, in which it will output a new csv table (‘t_potdens’) to the home directory on your computer which has a record for each unique tract id, along with an aggregated count of sherds per tract (i.e. the sum of all individual walker counts for that tract), the total distance walker by all surveyors in that tract (in metres), and a very rough measure of surface pottery density measure of ‘sherds per hectare’ (i.e. where total sherds is divided by total distance, and then multiplied by 5000 for reasons that are not so important for our purposes here). When the process is finished the command line prompt will re-appear (if there is an error, you will be notified, but otherwise nothing else will happen). 3. Now open up an ordinary text editor and in a blank document, type the following: "Integer","Integer","Integer",Real" Save this file as t_potdens.csvt to the same location as t_potdens.csv (your home directory). This is a simple fiel that accompanies the actual data but specifies the basic field typesw for each of the fields in t_potdens.csv 4. Now type the following (all on one line): db.in.ogr dsn=$HOME/t_potdens.csv output=t_potdens In this case, the above syntac is correct, without you needing to modifying it further so just press Enter/Return. Running this module (db.in.ogr) imports your csv file into the GRASS database management system (set earlier on in this tutorial to use SQLite). When the process is finished the command line prompt will re-appear (if there is an error, you will be notified, but otherwise nothing else will happen). 4.Now we will join the aspatial data to the tract polygons. At the GRASS command line, type (all on one line): v.db.dropcol tracts column=tract Running this module (v.db.dropcol) with these input parameters will get rid of the ‘tract’ column that we added when we joined the ‘tracts’ polygons and ‘t_tractrecord’. It will therefore allow us to then make a similar join using t_potdens (NB. It will leave all of the other data we added from t_tractrecord intact. When the process is finished the command line prompt will re-appear (if there is an error, you will be notified, but otherwise nothing else will happen). Now type (all on one line): v.db.join map=tracts layer=1 column=TRACT_ID otable=t_potdens ocolumn=tract Running this module (v.db.join) then makes the join between the tracts polygons and ‘t_potdens’ based on their shared id field (labeled ‘TRACT_ID’ and ‘tract’ respectively). When the process is finished the command line prompt will re-appear (if there is an error, you will be notified, but otherwise nothing else will happen).

Page 11: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

11

3. We are now in a position to plot this data on a map. Returning to the QGIS main interface, double-click on the tracts polygon layer and make sure you have chosen the Symbology tab in the resulting dialog. Set the Legend Type as ‘Graduated Symbol’ and the Classification field as ‘potdens’. Now set the Mode to Equal Interval’ and the Number of Classes to 6 and click on the Classify button. This will populate the right-hand part of the dialog. Now please adjust the number ranges in this window and their accompanying Fill Colours to the right so that they match the following: 0 – 10 sherds per hectare; Fill Colour RGB=0,0,255 10 – 50 sherds per hectare; Fill Colour RGB=0,150,255 50 – 100 sherds per hectare; Fill Colour RGB=255,200,255 100 – 1000 sherds per hectare; Fill Colour RGB=255,200,0 1000 – 5000 sherds per hectare; Fill Colour RGB=255,50,0 5000 – 50000 sherds per hectare; Fill Colour RGB=130,0,0 The click OK and if you have done this correctly your screen should now look like the one below:

This shows different amounts of surface per hectare for each survey tract with colours ranging from blue (low density) to yellow to red (high density). Take a minute to use the zoom tools to explore ceramic density across the whole island (you may also want to turn off some of you other layers to speed up the process). When you are finished, proceed with the next part below.

VI. Databases: Artefact-Level Records So far we have explored datasets without regard to individual artifacts or their chronological date. However, ASP places great emphasis on permanent artefact collection that can facilitate laboratory analysis and allows us slowly to improve our chronological understanding over the course of further study. We feel that this is a critical feature of survey analysis that could not by achieved by trying to date these in the field alone (and makes sure that surveyors are free to

Page 12: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

12

concentrate on quality of recovery rather than on analysis). Our artefact database is broken down by material category and is still being updated (at the time of writing). As a preliminary example however, we can consider the prehistoric pottery recovered from around two Bronze Age scatters in the western central part of the island. 1. First go to the PluginsPlugin Manager and put a tick next to the plugin ‘Add Delimited Text Layer’ to enable it. This adds an extra button to your toolbar, usually on the right-hand side.

2. Now click on this button and in the resulting dialog, browse for /db/ t_pottery.csv to specify it as the delimited text file that you want to import. Specify the delimiter as a comma sign ‘,’ (as plain characters), the X field as ‘suggX’ and the Y field as ‘suggY’. Then click OK. 3. This will add the comma-separated values file to your map view as a vector point layer. Now right-click on the layer in the Map legend and choose the option ‘Open attribute table’. This data is part of a record made in the finds laboratory for each potsherd that ASP collected, but note again that here you have only a tiny preliminary sample of 531 sherds (a full dataset will be available by the end of 2008). Similar tables have also been made for other find categories (e.g. worked stone) but are not yet available online. You can see that each sherd has a rather complicated unique id (‘uid’) which is an amalgam of a range of records relating to the survey unit it comes from. For various reasons (see above), and regardless of whether the finds involved are from tractwalking, grid collection or GPS grabs, we can suggest a UTM location (suggX, suggY) for each find that should have a relative accuracy of ca.±10m. Thereafter, for each artefact we have recorded a range of other information on the recovery type (tract, grid or grab), vessel shape, fabric, dimension etc. (each of the fields is described in the readme.txt accompanying the \db folder). Perhaps the most unusual aspect of this recording however is the way in which finds are dated. A series of fields beginning with fn_eb1, eb2… and going though to ‘other’ represent commonly identifiable chronological periods in the south-west Aegean. For each artefact, one or more specialists have suggested the probability that it belongs to a particular period (hence for each row the overall probability sums to 100). This allows us to analyse and map out the uncertainty that is always present in artefact dating, especially in the context of often undecorated, abraded or coarse survey finds. 2. First close the attribute table and then double-click on the t_pottery layer in the map legend to get the Symbology tab. Here, set the Legend Type to Unique Values, set the classification field to ‘Type’ and then click on the Classify button. In the resulting list in the right hand box, first click once on ‘grid’ – now set the symbol for this collection type to be the default circular dot, but with a size of 4, the Outline Style to no outline (far right option) and a Fill Colour to RGB 115,76,0. Then click on ‘tract’ in the left hand window and then choose the symbol one resembling a plus sign (+), specifying a size of 7, an outline width of 2 and an outline colour of RGB 230,152,0. Click OK. 4. This is best seen if you turn off the tract polygons with the original density information, so please untick the box next to tracts in the map legend. Then right click on the t_pottery layer in the map legend and choose ‘Zoom to layer extent’. If you have done this correctly your view should look like the one below:

Page 13: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

13

Note that this shows the prehistoric pottery from both stage-one tractwalking (shown as orange crosses) and stage-two gridded collection (shown as brown dots) around two small scatters. These are located at either end of a thin patch of alluvium and preliminary study suggests that they are of Cretan First- to Second Palace date (ca. 1950-1450 BC). 5. We can also explore the degree of certainty associated with the dating of these finds. As an example of how this works in the attribute table, first right-click on t_pottery layer and choose ‘Open attribute table’. Now click once on the top of the field called ‘uid’ to sort the records by this field. Find the five sherds beginning with the id 12042-57-25 (these were found in tract 12042, by walker 57, 20-30m into her/his tract). You can select these by click and dragging on the grey squares on the left-hand side of the table. If you do this correctly you table should look like the one below:

Page 14: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

14

6. Scroll across to the right hand side and note that none of these selected sherds have a definite fpal (First Palace or Cretan Protopalatial) or spal date (Second Palace or Cretan Neopalatial) but can be attributed to these or other prehistoric phases with varying certainty (with the latter certainty depending on diagnostic features associated with the sherd’s shape, fabric, decoration etc, and hopefully improving over time as we study the material further). Note that, for this sample dataset, we have removed the date fields used for later periods, but do apply the same principle when dating sherds from any period. 7. Now click on the top left button in this attribute table dialog to ‘Remove Selection’ and then close this table. Now double-click on the t_pottery layer in the map legend to go to the Symbology tab. Set the Legend Type to ‘Continuous Colour’ at the top of the dialog and the Classification field as ‘spal’. Now set the Minimum Value to begin with the colour RGB 255,204,204 and the Maximum Value to end the colour ramp with the colour RGB 219,0,0. If you have done this correctly your screen should now look like the one below:

Page 15: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

15

Take some time to zoom in on one of the scatters and note that most of the sherds have a relatively low probability of being assigned to any particularly period. This is because many are heavily abraded surface finds and not very diagnostic (particularly in the vacuum circles of the stage-two grid squares where all material is collected, including small, shapeless coarseware fragments). In fact, this, rather than easily dated finds, is usually the reality of surface material, though the degree of ‘diagnosticity’ does of course vary by context, period, observer, etc. and hopefully improves with further study. Despite this uncertainty, we suspect that these two particular scatters represent small, mid-second millennium BC farmsteads (perhaps for one or two families?) and the lower level material residue of the agricultural activities that went on around them.

VII. Databases – Archived Artefact Photos ASP has made an archive photograph of every finds bag brought in by surveyors and makes these publicly available by anonymous ftp. Here we will have a look at the tractwalking finds we selected earlier in section VI.5 and that were collected by walker 57 about 20-30m into tract 12042. 1. Click on the following link: ftp://www.tuarc.trentu.ca (if you have problems then try copying and pasting this link into the address line of your usual web browser). You should then see a directory called /asp. Open this directory and then the sub-directory called pottery, and finally the sub-directory within that called /tracts. At present only the tractwalking archive is available here. 2. Now click on the 12000s folder and then find and click on 12042-57-1-25.jpg. If done correctly you should be viewing the following picture:

Page 16: ANTIKYTHERA SURVEY PROJECT - UCL

ANTIKYTHERA SURVEY PROJECT

16

These photos are labeled by concatenating the collection unit components that describe where they were found (i.e. combining tract-walker-pass-segment for tractwalking finds and square-segment for finds from gridded collection). This particular bag includes some Late Roman material and also the five sherds (shown on the left-hand side in this case) of prehistoric pottery we considered earlier. Such an archive allows ASP pottery specialists to make quick checks on their records even when they are not in the lab and also allows us to ground the otherwise rather bland and dis-associated GIS data with the actual recovered material. You have come to the end of ASP tutorial 1b – many thanks. We hope to post further tutorials on the ASP website from time to time, and in multiple languages if possible. We also use ASP data in out internal teaching and tutorial programmes at the UCL Institute of Archaeology (for further details see the webpage of the MSc in GIS and Spatial Analysis in Archaeology) and Trent University, Canada (for further details, please contact James Conolly at [email protected]).