Geograph and ArcGIS
Published: 27 July 2008ArcGIS is a widely used Geographical Information System, particularly in schools and universities. This article assumes you have access to ArcGIS and are familiar with the basics of viewing and editing data.
Geograph is an excellent source of field images for geography and environmental science research of all kinds, and it can be useful to have a "spatial index" of relevant photographs, i.e. a clickable map of their locations, to display in relation to other datasets being used for the research.
This article details a procedure for taking the output of a Search and converting it into a piece of GIS data, allowing the point locations to be shown within ArcGIS. The points can be displayed as clickable items linking to each photograph's page on the Geograph website. There are also Layer files containing the symbology information (in this zip file).
Note that to obtain the raw data (image locations and other information within a single file) for this process, you must contact Geograph for access.
1) Identify the desired images via a Search. Remember that you can create custom sets of images using the Mark function on any individual image page, or on a search results page if you have viewed them as "full text + links" or "thumbnails + links". Once you have one or more marked images you can turn them into search results from the "view as search results" link towards the bottom of the Search or Search Results page. The important piece of information is the "i" number in the URL of your search results (e.g. Link )
2) Download your search results as a CSV (comma separated variable) file. General instructions for downloading are available - you should use the following parameters in addition to the search number and your authorisation key:
These will cause the resulting CSV to contain these columns:
- id - photo number (as per URL of individual image)
- name - photo title
- grid_ref - grid reference
- submitter - submitter's name
- class - image category
- e, n, figs - easting and northing of subject location, and precision of original reference given by submitter
- photo_es, photo_ns, photo_figs - as above, for photographer location (0 if not entered)
- date_taken - the date taken (YYYY-MM-DD)
- dir - view direction (-1 if not entered)
1) Go to Tools > Add XY Data and choose to bring in the saved CSV file.
- Set the X field to be e and the Y field to be n.
- Set the Coordinate System to be British National Grid.
- Click OK.
This creates a temporary "Event" layer, which cannot yet be edited. It shows the location of the subject of each photograph found in your Search.
2) To make the temporary data permanent and editable, right-click on it in the Table of Contents and choose Data > Export. Here you can save it as a Shapefile or within a Geodatabase, as you prefer. Add the saved data to the map and remove the Event layer.
3) Open the data's Attribute Table and choose Options > Add Field. Use the parameters:
- Name = URL
- Type = Text
- Length = 45
4) Open an Editing Session and use the Field Calculator to make the new URL field equal (including quotes and brackets):
Then close the Editing Session (saving the changes).
5) Symbolise the dataset as you wish.
6) Open the layer's Properties and on the Display tab tick the "Support Hyperlinks" box and choose to use the URL field you created. Select the URL option below to tell ArcMap that the field contains a web address.
You will now find that on the Tools toolbar the Hyperlink tool (lightning flash) can be selected. With this active, all clickable objects are shown with blue dots, and clicking on one will open a web browser at the relevant page. (You do have to be rather precise when pointing the lightning flash cursor at the dot on the map!) You can also Label the points (Properties > Labels tab), e.g. using the name field.
You may well find that your dataset does not have any images with a missing photographer location or view direction, and/or the images are all at the same level of precision, in which case the above procedure is all you need. Below are further processing and symbology instructions for dealing with these cases.
To prepare the photo locations for more sophisticated display, you can do the following:
- Add new fields called disp_es, disp_ns, disp_figs (all Type = Long) and disp_type (Type = Text, Length = 1).
- Copy photo_es, photo_ns, photo_figs into equivalent disp_es, disp_ns, disp_figs fields
- Set disp_type to be "P"
- Select records where photo_es = 0 (i.e. no photographer location is given)
- Copy subject subject easting, northing and figures value into equivalent disp_ fields
- Set disp_type to be "S"
- Clear selected features.
- Select records where dir = -1 (i.e. no photographer location is given)
- Set disp_type to be [disp_type]&"x"
This assumes that the photographer position is more desirable to show, with the subject position being used if the photographer's position is not available. Which one has been used is noted in the disp_type field. The resulting dataset can now be symbolised as follows:
1) Symbolise by Categories on the disp_type field.
- For disp_type=P: arrow symbol(*), change the Y offset so the base of the arrow is at the point location.
- For disp_type=S: arrow symbol(*), change the Y offset so the point of the arrow is at the point location.
- For disp_type=Sx: cross symbol.
From the Advanced button at bottom right, choose Rotation and use the dir field with rotation type Geographic.
You can import appropriate symbology from the ViewDirection Layer file in the zip file, although you will still have to set up the rotation yourself.
(*)Some arrows and triangles (e.g. to represent a view cone) can be found by selecting a Character Marker Symbol and then the ESRI Dimensioning font.
2) Load another copy of the dataset and symbolise by Categories on the disp_figs field. Use a simple circle symbol and change the colour to represent different degrees of precision. You can import appropriate symbology from this GridRefPrecision Layer file in the zip file.
3) Enable both these layers to see a coloured dot with an arrow showing the view direction, pointing either to or from the location depending on whether it is for photographer or subject.
Here are two images of the output; one shows the variety of symbols used, the other shows hyperlinking in action. The background map is available to all ArcGIS 9.2 users and is accessed live rather than being held locally on disk. It can be found under GIS Servers > v92 on services.arcgisonline.com > ESRI_StreetMap_World_2D.
If you encounter any problems or have other feedback, please send me a message via my profile.