Encode GIS coordinates of locations
Basics of GIS locations
Any place on the surface of the earth can be located in terms of three coordinates:
latitude, longitude and elevation (height above sea level). In most of our work, we
are only concerned with the first two, latitude and longitude, because we don’t (currently)
envisage any rendering or data processing that would make use of elevation.
Traditionally, latitude and longitude were expressed in degrees, like this:
These are the coordinates of St. Paul’s Cathedral. Notice that the longitude coordinate starts with zero; this is because it is very close to Greenwich, through which the zero line of longitude, the51°30'49.25"N
0° 5'58.42"W
prime meridian,runs.
In modern GIS systems, latitude and longitude are expressed in decimal numbers, which
look like this:
You can see that these are the same basic numbers—latitude measured as distance north or south from the equator, longitude measured as distance east or west from the prime meridian—but they’re expressed in a form which enables computers to do math with them more easily.51.513557
-0.098369
Coordinates like this are usually comma-separated, like this:
and if elevation is also included, it comes last, like this:51.513557,-0.098369
However, there is a slight wrinkle here: if you use Google systems such as Google Maps or Google Earth, the coordinates are stored in Google’s XML file format called KML, and inside that file, the order of latitude and longitude is reversed:51.513557,-0.098369,0
<coordinates xmlns="http://www.opengis.net/kml/2.2">-0.098369,51.513557,0</coordinates>
No-one seems to know why Google (or the company they purchased who invented KML) chose
to do things this way.
How to find the GIS location of a single point
In our work, we usually use Google Earth to find the geolocation of places. Here’s
a screenshot of Google Earth showing St. Paul’s Cathedral:
The first thing we want to do is to make sure that Google Earth will use decimal coordinates instead of the traditional degrees; that will make our job easier. Click on Tools / Options, and make the selection shown here.
To find the coordinates of this place, the first thing we need to do is to create a
Place the pushpin where you want it to go, and you’ll see that the lat/long coordinates appear in the dialog box, and also at the bottom of the map image. You can copy the latitude and longitude numbers (without their
The first thing we want to do is to make sure that Google Earth will use decimal coordinates instead of the traditional degrees; that will make our job easier. Click on Tools / Options, and make the selection shown here.
To find the coordinates of this place, the first thing we need to do is to create a
Placemarkfor it. Click on the Placemark button (), or on Add / Placemark, and you’ll see a pushpin appear on the map.
Place the pushpin where you want it to go, and you’ll see that the lat/long coordinates appear in the dialog box, and also at the bottom of the map image. You can copy the latitude and longitude numbers (without their
degreesymbol) out of the dialog box, and put them in the TEI file for the location.
Where do you put them in your TEI file? If you open up the file for St. Paul’s Cathedral,
STPA2.xml, you’ll see that it has a
<div>
in the body that looks like this:
<div type="placeInfo">
<head>St. Paul’s Cathedral</head>
<listPlace>
<place>
<placeName>St. Paul’s Cathedral</placeName>
<location>
<geo><!-- Geographical coordinates will go here when available. --> </geo>
</location>
</place>
</listPlace>
</div>
The comment of course tells you where the coordinates should go, like this:
<head>St. Paul’s Cathedral</head>
<listPlace>
<place>
<placeName>St. Paul’s Cathedral</placeName>
<location>
<geo><!-- Geographical coordinates will go here when available. --> </geo>
</location>
</place>
</listPlace>
</div>
<geo>51.513557,-0.098369</geo>
It is vital that you DO NOT put a space after the comma. You’ll see why this is important below.
How to find the outline of a larger place
For small locations such as individual houses, it is often sufficient to use a single
point to identify the location on the map. However, for larger buildings, streets
and other types of location, we want to provide more detail. Essentially, we want
to draw an outline around the object. We’ll do that now, for St. Paul’s.
An outline is basically just a list of point coordinates, separated by spaces. So
a triangle around the dome of St. Paul’s might be specified like this:
You can see that there are four separate lat-long coordinates, separated by spaces (showing up as linebreaks). The first one is identical to the last one. This is how we know that this is a shape or outline of a place, rather than a path or line.51.51391527182066,-0.09834042321448383
51.513532825929,-0.09863498228599121
51.51352062534084,-0.09800392197454352
51.51391527182066,-0.09834042321448383
So how do we create shapes in Google Earth, and how do we get their coordinates out?
First, we have to create a polygon, in the same sort of way that we previously created
a placemark. Click on the Add Polygon tool (), or on Add / Polygon. Now click on a point on the map; then on the next point; then the next; and finally
click back on the first point to complete the polygon:
Now, Google Earth does not helpfully provide you with the output coordinates when you create a polygon. We have to go through rather a convoluted process to get them. First, give your new polygon a name in the dialog box, and press OK to save it. You should see it appear in your places list, either under My Places or Temporary Places—it doesn’t matter which:
Now we’re going to save this place as a KML file. Right-click on the place you created, and choose Save Place As.... In the dialog box that pops up, make sure you choose
Now, Google Earth does not helpfully provide you with the output coordinates when you create a polygon. We have to go through rather a convoluted process to get them. First, give your new polygon a name in the dialog box, and press OK to save it. You should see it appear in your places list, either under My Places or Temporary Places—it doesn’t matter which:
Now we’re going to save this place as a KML file. Right-click on the place you created, and choose Save Place As.... In the dialog box that pops up, make sure you choose
"Kml (*.kml)"
as the file type, not kmz. Then give your file a name and save it. This file is an
XML file in Keyhole Markup Language format. Open this file in Oxygen.
Now if you look at the file, you’ll see its
<coordinates>
element, with the reversed longitude-then-latitude coordinates, and with the elevation
as a third item. We need to convert these coordinates into regular lat-long pairs,
with each pair separated by a comma, and the pairs separated by spaces, to put into
our <geo>
element. We could do this manually by copying and pasting, but that’s a bit tedious
and error-prone. Here’s a little trick to help us.
You may have seen, and may even have used, the XPath box at the top left of your Oxygen window. This is a box in which you can enter an
XPath expression, then press Return, and have the XPath run on your document to get
you some results. For instance, with a TEI file, if you put
//name
in the XPath box and press return, Oxygen will list all the <name>
elements in your document.
However, this text box is not very big, and we’ll need to enter a long XPath expression
to do our work, so we’re going to use the XPath Builder window to do that. In Oxygen, click on Window / Show View / XPath/XQuery Builder. This will open a new window in Oxygen, on the right:
Make sure you select
Now right-click on the result, and choose Show message. In the popup box, you can select and copy the reorganized geo coordinates, and then paste them into the
Make sure you select
"XPath 2.0"
in the top left drop-down, and make sure your KML file is the active document on
the left. Now you’ll need to copy/paste the following XPath expression into the window,
as you see it in the screenshot above:
Now press the red triangle button immediately above the expression to run the XPath against the document. You should see a result appear at the bottom of the Oxygen window:string-join(for $c in //coordinates[1]/tokenize(normalize-space(.), '\s') return concat(tokenize($c, ',')[2], ',', tokenize($c, ',')[1]), ' ')
Now right-click on the result, and choose Show message. In the popup box, you can select and copy the reorganized geo coordinates, and then paste them into the
<geo>
element in the TEI file.Easy, right? Here’s a more realistic example, representing the real outline of St.
Paul’s:
<geo>51.513412487853,-0.09956518738909835 51.51342490411496,-0.09907352353264927 51.51337515331529,-0.09854794927132422 51.51332657086279,-0.09826662956696325 51.5134050406195,-0.09797451920697323 51.51361478678208,-0.09734579556372211 51.51382896340971,-0.09725399622560914 51.51403178212471,-0.09744927183520874 51.51410842163026,-0.09813277781772305 51.51419510959087,-0.09839870581199643 51.51408838446699,-0.09868742601890415 51.51398706060057,-0.09911584437698109 51.51393048079962,-0.09963724273184871 51.513412487853,-0.09956518738909835</geo>
How to define paths
If you’re dealing with a location which is very long and thin, such as a street, you
could define it as a very long, thin polygon, but that’s a lot of unnecessary detail.
It’s probably better to define it as a path. You can do that in exactly the same way
you create a polygon, but using Add / Path or the Path button (). Paths differ from polygons only in that their final coordinate is not the same
as their initial coordinate.
Cite this page
MLA citation
Encode GIS coordinates of locations.The Map of Early Modern London, edited by , U of Victoria, 20 Jun. 2018, mapoflondon.uvic.ca/geo_deprecated.htm.
Chicago citation
Encode GIS coordinates of locations.The Map of Early Modern London. Ed. . Victoria: University of Victoria. Accessed June 20, 2018. http://mapoflondon.uvic.ca/geo_deprecated.htm.
APA citation
The Map of Early Modern London. Victoria: University of Victoria. Retrieved from http://mapoflondon.uvic.ca/geo_deprecated.htm.
. 2018. Encode GIS coordinates of locations. In (Ed), RIS file (for RefMan, EndNote etc.)
Provider: University of Victoria Database: The Map of Early Modern London Content: text/plain; charset="utf-8" TY - ELEC A1 - The University of Victoria Humanities Computing and Media Centre HCMC ED - Jenstad, Janelle T1 - Encode GIS coordinates of locations T2 - The Map of Early Modern London PY - 2018 DA - 2018/06/20 CY - Victoria PB - University of Victoria LA - English UR - http://mapoflondon.uvic.ca/geo_deprecated.htm UR - http://mapoflondon.uvic.ca/xml/standalone/geo_deprecated.xml ER -
RefWorks
RT Web Page SR Electronic(1) A1 The University of Victoria Humanities Computing and Media Centre HCMC A6 Jenstad, Janelle T1 Encode GIS coordinates of locations T2 The Map of Early Modern London WP 2018 FD 2018/06/20 RD 2018/06/20 PP Victoria PB University of Victoria LA English OL English LK http://mapoflondon.uvic.ca/geo_deprecated.htm
TEI citation
<bibl type="mla"><author><name ref="#HCMC1" type="org">The University of Victoria Humanities Computing and Media Centre <reg>HCMC</reg></name></author>. <title level="a">Encode GIS coordinates of locations</title>. <title level="m">The Map of Early Modern London</title>, edited by <editor><name ref="#JENS1"><forename>Janelle</forename> <surname>Jenstad</surname></name></editor>, <publisher>U of Victoria</publisher>, <date when="2018-06-20">20 Jun. 2018</date>, <ref target="http://mapoflondon.uvic.ca/geo_deprecated.htm">mapoflondon.uvic.ca/geo_deprecated.htm</ref>.</bibl>Personography
-
Janelle Jenstad
JJ
Janelle Jenstad, associate professor in the department of English at the University of Victoria, is the general editor and coordinator of The Map of Early Modern London. She is also the assistant coordinating editor of Internet Shakespeare Editions. She has taught at Queen’s University, the Summer Academy at the Stratford Festival, the University of Windsor, and the University of Victoria. Her articles have appeared in the Journal of Medieval and Early Modern Studies, Early Modern Literary Studies, Elizabethan Theatre, Shakespeare Bulletin: A Journal of Performance Criticism, and The Silver Society Journal. Her book chapters have appeared (or will appear) in Performing Maternity in Early Modern England (Ashgate, 2007), Approaches to Teaching Othello (Modern Language Association, 2005), Shakespeare, Language and the Stage, The Fifth Wall: Approaches to Shakespeare from Criticism, Performance and Theatre Studies (Arden/Thomson Learning, 2005), Institutional Culture in Early Modern Society (Brill, 2004), New Directions in the Geohumanities: Art, Text, and History at the Edge of Place (Routledge, 2011), and Teaching Early Modern English Literature from the Archives (MLA, forthcoming). She is currently working on an edition of The Merchant of Venice for ISE and Broadview P. She lectures regularly on London studies, digital humanities, and on Shakespeare in performance.Roles played in the project
-
Author
-
Author of Abstract
-
Author of Stub
-
Author of Term Descriptions
-
Author of Textual Introduction
-
Compiler
-
Conceptor
-
Copy Editor
-
Course Instructor
-
Course Supervisor
-
Course supervisor
-
Data Manager
-
Editor
-
Encoder
-
Encoder (Structure and Toponyms)
-
Final Markup Editor
-
GIS Specialist
-
Geographic Information Specialist
-
Geographic Information Specialist (Modern)
-
Geographical Information Specialist
-
JCURA Co-Supervisor
-
Main Transcriber
-
Markup Editor
-
Metadata Co-Architect
-
MoEML Transcriber
-
Name Encoder
-
Peer Reviewer
-
Primary Author
-
Project Director
-
Proofreader
-
Researcher
-
Reviser
-
Second Author
-
Second Encoder
-
Toponymist
-
Transcriber
-
Transcription Proofreader
-
Vetter
Contributions by this author
Janelle Jenstad is a member of the following organizations and/or groups:
Janelle Jenstad is mentioned in the following documents:
-
-
Tye Landels-Gruenewald
TLG
Research assistant, 2013-15, and data manager, 2015 to present. Tye completed his undergraduate honours degree in English at the University of Victoria in 2015.Roles played in the project
-
Author
-
Author of Term Descriptions
-
CSS Editor
-
Compiler
-
Conceptor
-
Copy Editor
-
Data Manager
-
Editor
-
Encoder
-
Geographic Information Specialist
-
Markup Editor
-
Metadata Architect
-
MoEML Researcher
-
Name Encoder
-
Proofreader
-
Researcher
-
Toponymist
-
Transcriber
Contributions by this author
Tye Landels-Gruenewald is a member of the following organizations and/or groups:
Tye Landels-Gruenewald is mentioned in the following documents:
-
-
Kim McLean-Fiander
KMF
Director of Pedagogy and Outreach, 2015–present; Associate Project Director, 2015–present; Assistant Project Director, 2013-2014; MoEML Research Fellow, 2013. Kim McLean-Fiander comes to The Map of Early Modern London from the Cultures of Knowledge digital humanities project at the University of Oxford, where she was the editor of Early Modern Letters Online, an open-access union catalogue and editorial interface for correspondence from the sixteenth to eighteenth centuries. She is currently Co-Director of a sister project to EMLO called Women’s Early Modern Letters Online (WEMLO). In the past, she held an internship with the curator of manuscripts at the Folger Shakespeare Library, completed a doctorate at Oxford on paratext and early modern women writers, and worked a number of years for the Bodleian Libraries and as a freelance editor. She has a passion for rare books and manuscripts as social and material artifacts, and is interested in the development of digital resources that will improve access to these materials while ensuring their ongoing preservation and conservation. An avid traveler, Kim has always loved both London and maps, and so is particularly delighted to be able to bring her early modern scholarly expertise to bear on the MoEML project.Roles played in the project
-
Associate Project Director
-
Author
-
Author of MoEML Introduction
-
CSS Editor
-
Compiler
-
Contributor
-
Copy Editor
-
Data Contributor
-
Data Manager
-
Director of Pedagogy and Outreach
-
Editor
-
Encoder
-
Encoder (People)
-
Geographic Information Specialist
-
JCURA Co-Supervisor
-
Managing Editor
-
Markup Editor
-
Metadata Architect
-
Metadata Co-Architect
-
MoEML Research Fellow
-
MoEML Transcriber
-
Proofreader
-
Researcher
-
Second Author
-
Secondary Author
-
Secondary Editor
-
Toponymist
-
Vetter
Contributions by this author
Kim McLean-Fiander is a member of the following organizations and/or groups:
Kim McLean-Fiander is mentioned in the following documents:
-
-
Joey Takeda
JT
Programmer, 2018-present; Junior Programmer, 2015 to 2017; Research Assistant, 2014 to 2017. Joey Takeda is an MA student at the University of British Columbia in the Department of English (Science and Technology research stream). He completed his BA honours in English (with a minor in Women’s Studies) at the University of Victoria in 2016. His primary research interests include diasporic and indigenous Canadian and American literature, critical theory, cultural studies, and the digital humanities.Roles played in the project
-
Author
-
Author of Abstract
-
Author of Stub
-
CSS Editor
-
Compiler
-
Conceptor
-
Copy Editor
-
Data Manager
-
Date Encoder
-
Editor
-
Encoder
-
Encoder (Bibliography)
-
Geographic Information Specialist
-
Geographic Information Specialist (Agas)
-
Junior Programmer
-
Markup Editor
-
Metadata Co-Architect
-
MoEML Encoder
-
MoEML Transcriber
-
Programmer
-
Proofreader
-
Researcher
-
Second Author
-
Toponymist
-
Transcriber
-
Transcription Editor
Contributions by this author
Joey Takeda is a member of the following organizations and/or groups:
Joey Takeda is mentioned in the following documents:
-
-
Martin D. Holmes
MDH
Programmer at the University of Victoria Humanities Computing and Media Centre (HCMC). Martin ported the MOL project from its original PHP incarnation to a pure eXist database implementation in the fall of 2011. Since then, he has been lead programmer on the project and has also been responsible for maintaining the project schemas. He was a co-applicant on MoEML’s 2012 SSHRC Insight Grant.Roles played in the project
-
Author
-
Author of abstract
-
Conceptor
-
Encoder
-
Name Encoder
-
Post-conversion and Markup Editor
-
Programmer
-
Proofreader
-
Researcher
Contributions by this author
Martin D. Holmes is a member of the following organizations and/or groups:
Martin D. Holmes is mentioned in the following documents:
-
Organizations
-
HCMC
The University of Victoria Humanities Computing and Media Centre
HCMC staff have collaborated in the project as programmers and graphics editors. The mandate of the HCMC is to further research, teaching and learning in the faculty of Humanities, in particular the fields of Humanities Computing and Language Learning. We host a research and development office and manage a room of bookable computer workstations for use by faculty, research assistants etc. participating in projects supported by the HCMC.Roles played in the project
-
Author
Contributions by this author