How to use / customize the GIS data offered on Ménestrel?
For readers who would not be familiar with the GIS world, here follows a short tutorial explaining the main steps for easily making background maps and importing there the data provided by Ménestrel. This tutorial is limited to this one target, and therefore does not claim to explain all the possibilities offered by GIS softwares (for more advanced functions, refer to the "Introduction to GIS" and "Archaeology and GIS" Ménestrel pages). With this caveat, the operations will be very simple: if you are familiar with Microsoft Office or LibreOffice, you will easily take the following steps.
GIS processing softwares are numerous; for this tutorial, we chose QuantumGIS (sometimes shortened as QGis), because it is free and constantly evolving but already very powerful, and already used by many in the academic community.
This software can be downloaded here. To install it, double-click the downloaded file and follow the instructions. When the installation is completed, double-click the icon to open the software.
Vectorial data proposed in this section are useful only if you already have a base map in which you can import them, and this base map must be georeferenced. Where can you find such data?
Resources available on the Internet are numerous, so we will refer only to the most relevant projects. As much as we know, there are no online vectorial data concerning the topography or the hydrography of the Middle Ages yet. It means that we will only indicate modern physical data, which will be useful at least as a first step.
The Consultative Group on International Agricultural Research (CGIAR) recently posted digital Shuttle Radar Topography Mission, i.e. background maps including topography. These files, which cover almost the entire planet, are of an unprecedented accuracy. Therefore, they are relatively heavy and should only be used on powerful enough computers. But their accuracy can work at very different scales, from the continent to the city. These data can be found here. The interface is not very friendly, and requires to download patiently forty large files for the whole of Western Europe, but the result is worth it.
Once downloaded, all files, which are in zip format, must be unzipped. In the created folder, locate the file with the extension *.Tiff. Then open QuantumGIS, check if the left side panel is open (the one which is called "layers", otherwise open the menu "View/ panels/ layers"), and drag the tiff file there.
The space will then appear in the QGis main window, but with very unexpressive gray colours. To show the topography, you still must specify a colormap matching the data on altitudes.
This can be done manually: Right-click on the layer name in the left panel, select "Properties" and then the "Style" tab. In the menu "Colormap", select "color map." Then, still in the layer properties, go to the "Colormap" tab, add as many entries as desired (one for the sea level, one for the 1000 m contour line, etc.).. These inputs can be modified to customize the colours, levels of heights, etc.: Double-click on the corresponding item in this window of the colormaps. Do not forget to confirm with "OK" before closing the window.
Another solution is faster: if you like the colours of the maps offered in this section of Ménestrel, you can import our colormap into your software (do not forget to unzip the downloaded file). To import it, when you open the "Properties" of the concerned layer (see above), just click on "Load Style ..." at the bottom of the window, enter the path to our colormap which you downloaded and it will install automatically. Nothing prevents you to customize this colormap thereafter.
Then you only have to follow the same procedure with other files downloaded from CGIAR in order to view all the area you are interested in.
Compared to the previous site, DIVA-GIS offers two advantages: first, the search interface, which ranks files by current countries, makes it easier to find the data you are looking for; also, the files available for downloading are lighter than those from CGIAR. A logical inconvenient is that the accuracy is lower (the difference is significant especially on a regional or local scale, whereas views at national or international levels will be very satisfactory).
You will find here the major rivers of the world (many other sites offer similar resources: enter the keywords "rivers shapefile" on a search engine). To import into QGIS: Once you have downloaded the file, unzip it. In the new generated folder, locate the file with the extension *.shp: drag it to the left panel of QGIS, and you will see rivers (display properties, colours, etc., are customizable by right-clicking on the name of the layer in your sidebar).
Once the base map has been produced, you will be able to supplement it by importing the data found on Ménestrel or elsewhere. Two ways are possible.
When these data are in shapefile format (this is the case of those available on Ménestrel), the procedure is extremely simple. Just unzip the file, and in the created folder, locate the file with the *.shp extension (for example, for bishoprics in 800, take the file "évêchés.shp"), and then drag it to the left side of QGIS called "layers". The data are then added to the main window; their display (colour, display names of the bishoprics, symbol for bishoprics, etc.) can be changed by right-clicking on the name of the new layer, then by selecting "Properties".
Rather than downloading the data and importing them in QGis, you may prefer to synchronize with online servers of maps, if they are designed for it (they are then called mapservers): in this case, maps provided by servers overlap with those that have been already imported or developed in QGIS. This system offers the advantage of providing fast access to data that are sometimes very rich, but it has the inconvenient of making it difficult to export and customize those data. In addition, such use involves being connected to the Internet. In the section "useful links" you will find a tentative list of mapservers which are most useful for medievalists. Here is the way to import their data into QGIS.
Add a "WMS layer" either by selecting the corresponding option in the "Layers" menu or by clicking on the corresponding button in the toolbar, namely this:
. This opens a new window. There, under the "Layers" tabs, click "New". A second window opens asking for a name (write any one, as long as it helps you later to remember the nature of the distant data) and for the Internet address of the concerned mapserver. Once finished, return to the previous window, take the opportunity to give a name to the layer that is being created (that is, the name that will appear in the left column of QGis). Then, in this same window, click on "connect": Qgis connects you with the server. You may find multiple maps on the same server (e.g. borders of the Roman Empire in 117, 325 ...): choose those you need (notice you can import several at once). . After selecting the right map(s), you just have to click on "add" and the new layers appear on your mapping project. Then click on "Close" to return to the main window. In some cases, an error message appears, indicating that the mapserver restricts objects to a display under a number of pixels: then reduce the size of the window of the map that you are trying to create, and all layers will appear correctly.
The method described here for the WMS format can also be applied to all other formats supported by QGis mapservers. Notice that the major projects developed by OpenStreetMap, Google, Bing and others global mapping can be easily integrated into a QGIS project: you can superimpose very accurate current data and historical data, which has in particular the advantage of easy location in a given urban area. To exploit these resources, rather than patiently searching the address of the corresponding mapserver, it is easier to install in QGIS the OpenLayers plugin that manages all data at the same time. To do this:
Choose ’Plugins’ menu -> ’Fetch Python Plugins...’
Select the ’Repositories’ tab at the top
Add a new repository with this URL: http://build.sourcepole.ch/qgis/plugins.xml
In the same window, go back to the "Plugins" tab, look for "Openlayers plugin" and click "Install plugin". Done.
To use the plugin, when you are in the main window of your project, just use the Menu "Plugins/ Openlayers plugin".
Once the map is completed, how can you export or print it? You will need to use the "Print Composer" function. This can be triggered either by the menu "File/ New Print Composer", or by the keyboard shortcut Ctrl + P, or even by clicking in the toolbar on this icon:
.
A new window opens, initially white. To view a map, use the menu "Layout/ add Map" or click on this icon:
. Then you can draw a frame with the cursor on the white page, where you will see the map which has to be printed. Do not be surprised by the poor quality of the image which appears on your screen : it is only a preview. By default, the zoom level of this composer is the one of the QGIS main window, but this setting can be changed in the right panel of this composer: tab "Item properties" line "extents." The same tab is useful to customize other view options (resolution, colour of the oceans, etc.).
When your map is entirely satisfactory, how can you print or export it? To print it, select "File/ Print" or click the icon and let it guide you. To export your map, for example to attach it to an email to your editor, you can choose between a raw image or a pdf by clicking on "File/ Export as Image" or "File/ export as pdf" (or the corresponding icons).
So far we have seen how to assemble existing data on a map. But if you want to customize some data, for example to enhance the presentation of a particular diocese, or to supplement ready-made resources found on the Internet, what is the procedure?
If you want to change the appearance of a wide range of data in QGiq, for example the symbol representing all the bishoprics, just play with the properties of the layer. However, if you want to change only a part of the data (e.g., to increase the size of the name of one particular river or diocese), you must temporarily get out of QGis: this software, which is ideal for dealing serial data is not suitable for editing graphics (note, however, that the print composer allows you to add simple shapes to the map: frames, triangles, etc.). Here’s how to make more general modifications:
To add simple graphics or to change colours, you need to export the map as an image, then to edit it with an image processing software. The best free software is undoubtedly Gimp, for which there is a good tutorial.
To change items which are to be recognized as specific objects within the map (for example, the symbol of one particular diocese, or the size of its name), it is better to export the map as an SVG file (in the print composer, click on "File/ export as SVG...", or on the corresponding icon), and then to work on it with a vector drawing software like Inkscape, for which we have both of a good basic tutorial and an advanced tutorial.
If you want to customize the content of scientific data available on the Internet (especially in this section of Ménestrel), for example by correcting the map coordinates of a bishopric which is wrongly located, or by adding a bishopric that you might have discovered, how do you proceed?
First, one has to understand how QGIS layers are designed, especially the shapefiles (shp) which were discussed above. These are nothing else than the graphic transposition of tablesheets that collect names, map coordinates and possibly other information. You must learn to discover and manipulate the entrails of these layers.
To access these data easily, it is necessary to add a little ingredient to QGis, namely the extension Shapefile Viewer. Here’s how to install it:
1. Close QGIS if it was open.
2. Unzip the downloaded zip file.
3. Drag the unzipped folder in the Extensions folder QGIS. Depending on your version of QGIS or Windows, this folder is located at C:\ Documents and Settings\Application Data\Quantum GIS Lisboa\.Qgis\ python\plugins or C:\Program Files\Quantum GIS Lisboa\apps\qgis\python\plugins or C:\Users\AppData\Quantum GIS Lisboa\apps\qgis\python\ plugins. You will already find some other extensions files in this directory.
4. restart QGis. The extension should then be available in the extension toolbar, which looks like this:
(if the bar does not appear in your window, select "View/ Toolbars/ Plugins"). In this bar, the extension you just installed is defined by the icon
. If it does not, go to "Plugins/ Manage plugins" and then select "Shapefile Viewer".
When this extension is installed, you can manipulate the data in each layer developed in shapefile format. In the following example, we will use the layer "bishoprics 800" available on Ménestrel, considering that you already imported it into your QGis project. Select this layer with a click in your left-side panel. Then click on the icon of the Shapefile Viewer plugin. You will see the data source of the concerned layer. To modify them, first click on the button "Toggle editing":
. Then you can edit the contents of each cell by a double-click. You can also delete entire lines (i.e. entities, namely bishoprics), by clicking the button
after having selected the relevant line, or add full lines (bishoprics) with the button
. To import data globally, for example from an Excel spreadsheet, you can do a simple copy-paste: after copying your data in Excel, make sure that the number of blank lines is sufficient in Shapefile Viewer, navigate to the cell at the left top of the area to be filled, and click the icon
to paste the contents of your clipboard.
Caution: whether while correcting coordinates or importing new data, be sure to follow the structure of the Shapefile layer you want to edit. In particular, the order of the columns is imperative and must be present in the case of bishoprics in 800, as follows:
1. (X) (longitude)
2. (Y) (latitude)
3 and 4. (Id) and id: this is the identifier of each entity within the layer. You can enter the number you want, provided it is not already used in the same column.
5. NAME: The (modern) name of the bishopric.
Note that as a separator between the units and decimals, Shapefile Viewer tables only bear dots, not commas.
6 and 7: it is not necessary to fill in these columns.
Finally, after the changes, exit the edit mode by clicking again on the icon
; then you can save the result with the button
, and corrections will be applied automatically on the map.
So far we have seen how to make corrections on existing shapefile layers. But how can you add a new map layer, e.g. for mapping gold mines and monasteries of the Middle Ages?
In the QGIS main window, select Layer/New /New Shapefile layer ... (Shortcut: Ctrl + Shit + N), or click the icon
. You will be asked the following questions:
Is it about dots (e.g. monasteries), lines (e.g. rivers, territories, etc.) or polygons?
Lower in the same window is the list of attributes, which may be supplemented by a "new attribute". This is the list of columns in your source table. It is recommended, in any case, to add an attribute NAME to name the dots you will enter (for example, to give their names to the various monasteries that you will map). You can optionally add more columns for additional information, but this is not essential.
Then click "OK": you will be asked the name of the new layer, which will appear in the left side panel of QGis. Do it. When you confirm by clicking "Save", the new data are saved in the folder you specified. Be careful: several files are created at once. For a subsequent export (e.g. to make these data available to your colleagues), be sure to save all of them!
Once this new layer is created, you only have to fill the columns as described above.