DH Map Course
What is a map?
- The work 'map' is used in different ways in different disciplines and contexts. We will be talking about geographical maps, but it is worth understanding this in the context of other related uses of the word 'map'.
- Typically we are talking about a picture of relationships among geographical places, usually providing some kind of information about it, such as how to navigate it or what sort of things exist in it.
- Geographical maps are not necessarily pictorial - they may be verbal, as in songlines or directions, or occur in other media. The also do not necessarily aim to match spatial proportions in exact rations. Some may map by time or political relationships (eg: 3 days journey from here to there).
- More generally, including in digital humanities, we are sometimes also talking about non-geographical visualisations of relationships, where those relationships are signified in some sort of spatial relationship. For example, lines connecting points in a network diagram of twitter hash tags, or of who collaborated with who on what topic in 17th century letters, etc. See D3 examples.
In mathematics a 'map' is a relationship between two sets of numbers. One number in one set 'maps' to another number in the other set. The 'map' is typically expressed by a 'function' which is a procedure for finding the number in one set given the number in the first set, or to put it another, to transform one number into another. For example, the 'function' of 'plus 1' maps 1 to 2. Ie: 1+1=2. It maps 2 to 3 and maps 156 to 157. The function 'squared' maps 1 to 1, 2 to 4, 3 to 9, 4 to 16, etc.
- This mathematical meaning is crucial to software development. Most of what we do in software development is writing functions, transforming one thing into another according to some procedure. Usually it is about IPO - input, process, output. This is generalisable to mapping a mouse click as input, to some process such as looking up something in a database, and showing the results on the screen as an output. We can loosely speaking understand this as 'mapping' because there is a formalised, procedural process 'mapping' input to output.
Extending this general sense of mapping, we could see 'representation' as a mapping of sign to referent, or our brains mapping sensory signals to meanings. There is perhaps some interpretative context that enables the mapping of sign to meaning. In any case, the purpose of a map is to signify relationships. Maps have assumptions built in, are a tool for exercising power, they are cybernetic in extending our power and capacity to see and control what is beyond our immediate body, they provide 'information' to disambiguate and make 'present' what is not present, and are embroiled in all the concerns we have in humanities about the construction of meaning.
- Maps provide non-linear information. They tell stories as a picture does, immediately but also provide opportunities for linear, temporal narratives as their purpose, as often as not, is journeying. So we have the well known mythic weave, or rhizomatic network of possible journeys. (Possible journeys between nodes in a network is part of a branch of maths called Graph Theory, btw. It was begun by Euler in 1736, trying to solve the problem of find ways to cross all 7 bridges of Konigsberg, modern Kalingrad, once and only once.)
Here's my own work in progress that combines all these concepts, one way or another (built on the subject-predicate-object architecture of linked data, applies map zooming technology to images, uses pictorial non GIS map images, enables linking from many points within and across nodes in multimedia, to build meaning by layering of association etc): Tree Glyph
Mapping software is in flux. Any time you wish to commence a mapping project it's worth checking what the state of play is. Look for something that:
- does what you need (warning: may not do what it says on the box)
- is a de facto standard (not the newest framework that solves all problems and makes everything 'easier')
- is free (to avoid lock in and proprietary 'extortion')
- enables you to export data in a standard format (to avoid lock in and maximise value of your work)
Different map tech for different needs
Here are some examples but there are many tools and technology changes quickly, so it's worth Googling around.
|Quickly and easily create a map with points and pop-ups.||Google MyMaps|
|Desktop GIS for research||QGIS|
|Create map data and browse the world, import/export KML files.||Google Earth|
|Advanced and varied mapping features.||ArcGIS|
|National digital map research infrastructure, mapping toolbox, urban focus||AURIN|
|Deposit research geo data in a national repository.||National Map (Australian research data repository)|
|Relate maps to and visualise statistical information.||Maps and stats: R and D3|
|Build websites integrated maps with multimedia, database, text, community, etc.||Web Archive/Publishing systems with WebMap software Eg: Recollect, HistoryPin, Heurist.|
|Image overlay 3D on your desktop, or take a screenshot to get a re-usable picture.||Google Earth, see tute|
|Easy image overlay to embed in website||Knight Labs Juxtapose|
|Build network visualisations||Gephi|
|Build network visualisations on the web||D3|
|Animating maps. This is not easy and requires a fair bit of work and expertise.||D3 on the web, and possibly QGIS on the desktop, but depends on needs.|
PRAC: Google MyMaps
- Go to Google MyMaps
- If you don't have a Google account and don't want one, follow somebody else in this class.
- Add, edit, delete a marker.
- Open Data Table
- Import a CSV file.
- Embed in a webpage.
- Export as KML.
- Open the KML in Google Earth if you have it installed.
- Time sensitive columns.
Some lessons from this about digital mapping:
- It's very easy to get started and to produce a simple map.
- You can import from CSV, and you can export data, but not to CSV. How are we going to manage the data?
- Although our data is often fuzzy we need to settle on an exact figure to enter for the system to work and add a disclaimer or qualification elsewhere.
- We quickly find problems with data structure, but we quickly learn what we want to do by doing. What if there is more than one person or school per place? Are we mapping places or people? If places, how do we handle dates? If people, what if someone traveled around a lot? What about works, anonymous works? It would be much better if there were a timeline.
- Every system has limitations. You need to be able to export your work in a standard format. Even having a standard format involves assumptions that you need to work around when working across systems.
- Dates must be in a consistent format and in correctly named columns to be interpreted by systems as time enabled data.
That's a pretty map, so what?
- The mountain passes between Jalalabad and Peshawar (Khyber pass) are crucial to the transmission ideas between South, East and West.
- Written Indian philosopher begins in the Vedas with the invasion from people beyond the Jalalabad-Peshawar passes.
- Many ideas in Pre-Socratic philosopher are similar to ideas in Indian philosophy.
- Darius' empire established soon after the earliest Pre-Socratics, bordered Greece and India. Prior to this there would have been significant political barriers. Could traders none the less have crossed the area?
- Democritus is known to have traveled widely in search of wisdom, including to Babylon, half way to India.
- Pyrrho, in Alexander the greats train learned skepticism from Indian 'gymnosophists'.
- Hypotheses about the transmission of ideas between East and South, and whether they might have overcome geographical, political and language barriers could be tested by archaeological and other evidence, particularly focused on transmission across the Jalalabad - Peshawar passes.
- A nice interface for pedagogy and dissemination.
- Adjusts the meaning of the word 'Greek'.
- Situates ideas in a geo-socio-political context.
- Appreciate diversity of thought and continuity of debate beyond a few canonical big names.
- Casual user is not overwhelmed by dense text, and can enter into the world of philosophy at any point.
Common glitches include error messages, points not showing up on the map at all, or appearing off the West Coast of Africa in the Atlantic Ocean (ie: lat, long has defaulted to 0,0 in the event of a problem)
Some common causes of glitches:
- The coordinates might need to be in a separate column for Lat Long, or a single column separated by a comma
- Comma separated coordinates may either need or not need a quantity for 'elevation' which can just be another value (0 by default) on the end of the coordinates. Eg: 79.5938731,28.7722918,0
- The coordinates may be the wrong way round. Unfortunately, some systems export in as lat,long while others expect input as long,lat.
- There's a typo in one coordinate throwing out the whole thing. eg: 79.593E731,28.7722918
- You are using the wrong, or a mixed coordinate system, such as the system expects decimal "44.4604788, -110.8281375" but you have degrees minutes seconds "44°27'37.7237", -110°49'41.2950"
- For some disciplines maps have always been a crucial part of understanding the subject area, in history for example, maps of battles, political, cultural and socio economic boundaries and spread across time, are crucial. In linguistics, maps of language distribution are common. In Archaeology maps of sites are at the core of practice. In 21st century literary criticism, within 'distant reading' and 'ecocriticism' there has been a surge in interest in maps.
- Maps provide a visualisation that enables us to see patterns we would not have otherwise seen, and so to make research discoveries.
- The act of making a map, as with digital humanities can have the side effect of adding methodological rigour to research.
- A map produced by your research is not only a research outcome but becomes a research tool for someone else.
- Maps are good for disemminating research, as they can convey information at a glance, in a way that a long text cannot. Web maps are often interactive. The visual and interactive aspects of web maps and the personal relation people have to places make them interesting and engaging to the public.
Considerations For A Mapping Project
Many of the considerations of a mapping project are similar to other DH projects. The following are all important considerations that you should consider before starting a project. More importantly, don't let uncertainty about these questions stop you from starting a project. The sooner you start the sooner the answers to these questions become clear. Try to build an end-to-end working draft ('proof of concept', 'prototype' or 'feasibility test') as early as possible. That way you encounter and solve problems early and avoid committing too much effort to something that turns out not to work as assumed. Bear in mind that in IT 'should' means 'probably won't' (as in "It'll be ok, it should work."). If software promises to solve all your problems, expect work in implementation and customisation. All problems can be solved, but time and effort must be allocated.
- Can we just use an existing system or do we need to build and customise our own system?
- What technology is appropriate for the project?
- What metadata is needed for each location or event?
- What consistent format is the data going to be in? (eg: coordinate system, date time as dd/mm/yyyy)?
- What is the structure of this data?
- What open standards will be used to make sure it's all interoperable and re-usable?
- How will the data be stored, maintained and accessed?
- Is this about mapping points, lines and/or areas?
- Is there a time dimension?
- Are the locations connected to text, images or multimedia that needs to be linked to somehow? Where is it stored? Are there copyright constraints on using it?
- How long will it take to collect all this data?
- Can we afford it?
We often need to deal with vague locations in source materials (eg: 3hrs north of the creek)
If you map from primary sources, such as journey narratives, do you map where they thought they were, or where your best estimate is of where they really were? Or both?
There is a difference between accuracy and precision. Eg: a coordinate may have 6 decimal places, but only be accurate to 3 decimal places.
There is a lot of material and software that we might have assumed to be available but isn't - but that is why this is an interesting research field - there are still important problems to solve, and those technical solutions will lead to discoveries that have not yet been made.
We might build a map in order to spot patterns but keep in mind all the factors that might influence patterns. For example, we might see a cluster of dots and think it significant, but if travel time is a factor, it may only be because those sites are in the mountains, and considering travel time, they are just as clustered as events spread out across a flat region.
If time is a dimension in our data, what if an event occured over an extended period? Or at multiple times? Or at the same time at several locations? (nothing is ever simple).
Exceptions to the rule. Normally in software and STEM areas we are concerned with fitting everything to a consistent structure for ceteris parabus, repeatability of experiment or to meet the 80/20 rule in profit maximisation, as part of 6 sigma quality assurance etc. In Humanities it is often the exceptions to the rule, highly contingent instances, marginal cases, resistance to structure, or the changes in structure itself over time, that we are interested in. In humanities mapping, as in DH generally, we must be prepared to put in the extra effort to handle these exceptions sometimes in conflict with usual IT or commercial practice, or at least offer an explanation about how they relate to our generalised processing. It might be a matter of applying the 80/20 rule of applying a standard approach to as much as possible, but making sure we also cater for the other 20 instead of excluding them. This may require hacking, adding on to, or sometimes just surrounding explanatory and contextualising information.
This overlaps with our C21CH activity TextMapText so we aim to collaborate in development.
- Log in to Recogito: https://recogito.pelagios.org/
- Upload this sample text Pyrrho Book IX chap11 which is from Diogenese Laertius' Lives of Eminent Philosophers, at the Perseus Project
- Mark people and places
- Edit people and places
- View Map
- Export Data
- Lacks, parallel text and map, and mapping across corpus of texts.
"What's the good of Mercator's North Poles and Equators, Tropics, Zones, and Meridian Lines?" So the Bellman would cry: and the crew would reply "They are merely conventional signs! "Other maps are such shapes, with their islands and capes! But we've got our brave Captain to thank (So the crew would protest) "that he's bought us the best— A perfect and absolute blank!" - The Hunting of the Snark, Lewis Carroll, 1874-76
The potential of imagination, the anticipation of discovery, or the violence of terra nullius? Even a blank page means different things to different people.
Some Interesting Maps
- Marshall Island Maps
- John Snow's Cholera Map
- Mapa de Cuauhtinchan 2
- Western Desert Style
- Cooks Map of Newfoundland
- Sumerian Map (oldest existing map)
- Maps of Piri Reis
Pace of Change
Mapping shipping in 2012 and 2016... and now it's almost 2019... like most things on the internet there is now too much activity to have a complete view of what everyone is doing. Nobody knows what the state of the art is anymore. Focus on the research question and what is needed for it, rather than finding a use for whatever is bleeding edge - we're doing humanities. Then we see if there is something that does that, and if not, hack, adapt, combine, customise, build it ourselves, bricolage.
Digital Humanities is a rapidly changing field. If you don't start now and finish soon, it will look old when you are done. How do you make sure the project is relevant and has lasting value? One approach is to not be too specific about what technology you say you are going to use so you can use whatever is most relevant near the launch time. The solution we use at C21CH is to adopt a Rapid development style - produce a working prototype early, and aim to continually enhance, build upon it and adapt. If there is a 3 year planning and development process with software as an outcome at the end, the software will probably be redundant when launched. Also, the launch must be considered as the beginning, not the end. The purpose of a DH development project is to reach the end of the beginning - then you move into the maintenance and upgrade cycle. This still needs resourcing, but not as much. A 'finished' development project without ongoing support is often wasted effort. Software is a living thing.
ARC GIS 3D
Examples of 3D map visualisation in general, at the 'local' scale.
Specifically designed for map focused narratives called 'Story Maps'. They are very engaging and use cutting edge web design techniques, such as the scrolling navigation, full screen images, short video loops. They are user friendly, enabling you to log in and create the map using their software. Take care to check you can export your work in standard formats before committing to any tool or system, otherwise the survival of your work may depend on the business continuing to support it, or they may start charging too much for it.
KnightLab Story Maps provide an easy to use free interface for creating story maps, but there is no 'export' function for your work, so it's great to produce something quickly but would be unwise to invest a lot of work in it.
- Colonial Frontier Massacres
- Text Map Prototype - case study on travel narratives. Maps text to map and map to text. This is feasibility test. The application is still in development.
Humanities Map Examples
- ORBIS The Stanford Geospatial Network Model Of The Roman World
- FBTEE: The French Book Trade in Enlightenment Europe
- Digital Harlem
- A map of various story map projects
- Old Maps Online
- Aboriginal Tasmania Story Map
- Napoleon's advance on and retreat from Moscow Elaborate data visualisation more than just a map, and paints a clear picture of why invading Russia is a mistake.
- Ethno-linguistic map of Africa. Comprehensive detail and rich layers.
- Atlas of Early Printing
- The Kokoda Track
- Icelandic Sagas Maps not only help us find out information about something, but change our experience of it - what we imagine and feel when reading a piece of literature for example. Icelandic sagas are about places as much as people so lend themselves to mapping. Events and time overlap across and within sagas. Piecing together oral stories and anecdotes, you can see sometimes the writer struggling to organise concurrent threads into the serial structure of the codex. These maps, the result of an eco-critical journey, offer an alternative way to explore the weave, perhaps closer to their location and kin focused existence before being written. Because places are relatively easily identified in the sagas, if you happen to be reading Eyrbyggja saga, it's easy to pick out the particular mountain pass in which Snorri the Priest's slave waited for his chance to win freedom by killing the man who was paying too many visits to his master's married sister, and why, since it's so far to walk from Helgafell he'd had to make an excuse about looking for lost sheep. It's a great enhancement to the appreciation of the literature being able to see that the mountain which Snorri would sit on because no plan made on it's summit ever failed is a solitary mountain in the middle of a treeless plain surrounded by sea. It's also extraordinary to realise how much more populous the farmland was at that time than it is now, and yet how small the population was considering the extent and quality of the literature.
Making Digital Maps
To simply find the coordinates of a point, the quickest way we have found is to go to Google Maps, right click a point and select 'What's Here?' If you are working within a system it probably has it's own user interface for placing markers, etc. There are also APIs to retrieve coordinates given addresses and so on, if you are a developer building software.
Mapping Features And Concepts
Coordinate Systems There are many different coordinate systems as scientists develop and improve on them. Some are based on spheres, some on the slightly distorted sphere shape of Earth, and some provide corrections to improve accuracy on previous systems. As digital humanists though the mathematical intricacies of their differences are usually not as important as the ability to use them to produce a map, often where high accuracy is not required, simply to indicate a town or region for example. You should know which coordinate system you are using though in case anyone wants to compare their map or data with yours. Which coordinate system you are using will be important if you do require a high degree of accuracy and precision - archaeologists may need to pin point digs, and good accuracy is needed for road navigation, for example. Latitude are parallel lines drawn around the globe, or the horizontal lines on a map. Longitude are lines drawn from each pole around the earth, somewhat like a quartered orange. Latitude and longitude provides a point. Google maps uses World Geodetic System (WGS) 1984. This is a decimal system, not one based on 'degree's, 'minutes' and 'seconds', which you may have seen.
Standard Data Format There are standard data formats for storing and/or communicating GIS data. Some common ones are KML (KMZ) and GeoJSON. Data might often also be stored in CSV files or relational databases. It's important that data can be removed from, or made available in a standard format, to ensure it's re-usable (even if it is only for yourself or to make a backup). A KML file is a kind of XML file. A KMZ file is a KML file that has been compressed. GeoJSON is a specific kind of JSON file.
Map projection The earth is curved, a map is flat. The 'projection' defines the way in which the 3D curved surface has been translated into 2D. This always involves distortion. The most familiar rectangular map of the world, the Mercator projection, for example increasingly stretches out proportions away from the equator such that the points at the poles are stretched out to be as broad as the equator. This is a popular topic in mapping which you can easily find out information about on the internet. Famously, the Mercator inflates the rich and powerful nations of the Northern Hemisphere and shrinks poorer equatorial and tropical countries, so that a more proportionate map, the Gall–Peters projection, was adopted by some. As humanists we must bear in mind that everything, even the 'objective' science of mapping technology, is political.
Layers The type of information on a map is typically called a 'layer'. We might add a layer of soil types, a layer of river systems, a layer of towns and cities, and a layer of the data we are particularly interested in. Maps are something we read. They are always something we write. The way we draw the map and what we draw on it is always chosen. These choices are influenced by cultural and personal assumptions and the particular purpose of the map. Marshall Islanders have maps of ocean currents, local councils have maps of water pipes, armies have maps of strategic positions, pirates have maps of treasure. Because maps are intended to convey knowledge, and this is typically for a purpose, they play a role in human agency and power. Some maps promise adventure and the chance to learn from the unfamiliar, other maps are more sinister when we understand what they were used for.
Basemap Usually we want to put information on a map. The map we put the information on, or the layers on, is called the 'basemap' or 'base layer'. Mapping systems typically come with a variety of options for the basemap of the world - terrain only, road maps, showing place names or not showing place names, and so on.
Points, lines, polygons When using mapping software, most information is displayed as either a point, a line, or a polygon. Lines may be irregular, such as the path a road takes, and shapes may be squares, circles or irregular drawings. Drawing polygons can be very time consuming, so normally you would not contemplate this unless there were only a few places you wished to outline, or if you can get the outlines from somewhere else. Another drawback in many systems is that lines and shapes can only be drawn without curves, making them somewhat clunky to look at.
Image overlays This enables placing an image over the top of a map, by specifying where the corners of the image should go. In this way we can display old maps, or well drawn outlines, over a contemporary map for example, with 'show/hide' toggles and transparency. Some tools allow distorting the image so that old map features match exactly the current map.
Time and Space / History and Place In humanities research and critique, even outside history, we are often concerned with the historical development of our subject area. Time is often a crucial dimension to add to Humanities maps. Many systems have time widgets that enable showing data based on time spans.
Metadata Typically we are not only mapping coordinates, but sites that have a lot of other associated information. This metadata about a place is what you would often find in a pop up when you click on a point, or it may be part of the visualisation, for example being used to determine the colours or size of dots to convey intensity.
Some of the differences in the APIs are (note the differences change as these megacompanies compete aggressively, catching up and outdoing each other):
Google: faster; easy to use; more widely familiar to everyone.
ArcGIS: a bit slower but fast enough; more advanced and richer features if needed such as 3D terrain view, statistics displays etc.
- Look at the ArcGIS tutorial.. You can also see the code here (when the page is opened, right click and 'view source').
- Copy and paste the code into a text file on your computer and save as HelloWorldMap.html (Make sure that it has not been saved as HelloWorldMap.html.txt. You may need to makes sure it is saving as a 'any' type of file, not 'text'.)
- Double click this file to open it. It should open in your default browser and show the same map. (If it doesn't open in a browser it's probably because it saved as 'HelloWorldMap.html.txt')
- Change the zoom level and refresh or close and open again to check it loads at the expected zoom level.
- Change the coordinates so that it opens focused on the University of Sydney. (tip: a quick way to get coordinates is to go to Google maps, right click and choose 'What's here' - be careful, sometimes the Google coordinates need to be switched around to work in other systems. If your map doesn't work, check this first. Ie: the coordinates -33.886056, 151.186281 may need to be 151.186281, -33.886056)
- Change the basemap - look up what basemaps can be used in the API Reference
- Look at this ArcGISMarker.html example that adds a marker, a large red dot, to the map. (TIP: right click and 'view source'. You can cut and paste this to your own files.). Save this html file on your computer and edit it to change the RGB colour and alpha transparency.
- If you click it, there is a pop up with information. Change what it says.
- Note that you can draw a variety of markers on the map. Usually the standard types are points, lines and polygons.
Working With KML Feeds
TIP: a KMZ file is just a KML file that has been compressed. If you want to see what's inside it change the file extension to .zip instead of .kmz and extract the file by right clicking and choosing 'Extract all' or using compression software like 7zip.
Working with KML also makes it possible to add lots of different data from different sources to compare and contrast, to spot patterns and learn new things. It's also a good way to make your geocoded information available to others. Because it makes it so easy to share data, there should be free KML files with all kinds of info available everywhere, but it remains difficult to find sometimes. Infrastructure such as National Map is designed to address this problem. Lets just use the URL of our own KML file: http://hri.newcastle.edu.au/courses/mapcourse/EarlyEurasianPhilosophers.kml
Because most detailed mapping is Science or Commerce focused, in Humanities we are often constrained to building on and customising systems with STEM or Commerce assumptions to our unique needs. None the less Geoscience Australia and other services provide useful data that we can compare with humanities information: http://services.ga.gov.au/
- Look at the ArcGIS KML example and, again, make a file on your own computer for it, called kmlexample.html
- Change the URL for the KML to http://hri.newcastle.edu.au/courses/mapcourse/EarlyEurasianPhilosophers.kml
- You might want to set the starting coordinates for the map to be Australia instead of Wyoming.
Unfortunately, they haven't used very clear icons for the markers, but you can see that it is simple enough, by cut and pasting and modifying code, and simply pasting in the URL to some KML formatted data, to import KML data and display it on your web map. When you make your map, use simple, clear easy to see signifiers. We are aiming at building a useful application and conveying information. The better this is achieved the more people will learn about your research.
Anatomy of a KML file
It's useful to have some understanding of the inner workings of the tools you are using, so that when there is a technical glitch you can find and fix the problem.
See also Google's KML Tutorial
The following is a very simple KML file that would put a point on the map.
It begins with an XML declaration because KML is compliant with the widely adopted mark up language, XML.
It then declares a 'placemark' element with a name, description and point coordinates.
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>Simple placemark</name> <description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description> <Point> <coordinates>-122.0822035425683,37.42228990140251,0</coordinates> </Point> </Placemark> </kml>
What does the following do?
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>The Pentagon</name> <Polygon> <extrude>1</extrude> <altitudeMode>relativeToGround</altitudeMode> <outerBoundaryIs> <LinearRing> <coordinates> -77.05788457660967,38.87253259892824,100 -77.05465973756702,38.87291016281703,100 -77.05315536854791,38.87053267794386,100 -77.05552622493516,38.868757801256,100 -77.05844056290393,38.86996206506943,100 -77.05788457660967,38.87253259892824,100 </coordinates> </LinearRing> </outerBoundaryIs> <innerBoundaryIs> <LinearRing> <coordinates> -77.05668055019126,38.87154239798456,100 -77.05542625960818,38.87167890344077,100 -77.05485125901024,38.87076535397792,100 -77.05577677433152,38.87008686581446,100 -77.05691162017543,38.87054446963351,100 -77.05668055019126,38.87154239798456,100 </coordinates> </LinearRing> </innerBoundaryIs> </Polygon> </Placemark> </kml>
As in any XML document, 'CDATA' can be used to start and end a section that has textual content that can be anything you want, not necessarily valid XML. Often we use it to put in HTML, the web markup language, so we can, for example, display paragraphs and headings in a pop up.
<kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Placemark> <name>CDATA example</name> <description> <![CDATA[ <h1>CDATA Tags are useful!</h1> <p><font color="red">Text is <i>more readable</i> and <b>easier to write</b> when you can avoid using entity references.</font></p> ]]> </description> <Point> <coordinates>102.595626,14.996729</coordinates> </Point> </Placemark> </Document> </kml> </kml>
You might want the markers you draw on the map to look a certain way, either to make sure your map looks cool, or to convey information, such as different categories. You can do this first by defining a style, then by applying that style to the Placemark. Note that the Style element has an id. To apply this style to a placemark, you set the Placemark's styleUrl to be the same as the Style's id (preceded by a hash sign). In this case the id is transBluePoly, so under Placemark we set styleUrl to be #transBluePoly.
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Style id="transBluePoly"> <LineStyle> <width>1.5</width> </LineStyle> <PolyStyle> <color>7dff0000</color> </PolyStyle> </Style> <Placemark> <name>Building 41</name> <styleUrl>#transBluePoly</styleUrl> <Polygon> <extrude>1</extrude> <altitudeMode>relativeToGround</altitudeMode> <outerBoundaryIs> <LinearRing> <coordinates> -122.0857412771483,37.42227033155257,17 -122.0858169768481,37.42231408832346,17 -122.085852582875,37.42230337469744,17 -122.0858799945639,37.42225686138789,17 -122.0858860101409,37.4222311076138,17 -122.0858069157288,37.42220250173855,17 -122.0858379542653,37.42214027058678,17 -122.0856732640519,37.42208690214408,17 -122.0856022926407,37.42214885429042,17 -122.0855902778436,37.422128290487,17 -122.0855841672237,37.42208171967246,17 -122.0854852065741,37.42210455874995,17 -122.0855067264352,37.42214267949824,17 -122.0854430712915,37.42212783846172,17 -122.0850990714904,37.42251282407603,17 -122.0856769818632,37.42281815323651,17 -122.0860162273783,37.42244918858722,17 -122.0857260327004,37.42229239604253,17 -122.0857412771483,37.42227033155257,17 </coordinates> </LinearRing> </outerBoundaryIs> </Polygon> </Placemark> </Document> </kml>
Find some useful resources in our select bibliography for Digital Mapping in Humanities