Monday, February 24, 2020

Thoughts about intervisibility, Part 2

In my last post I tried to suggest that intervisibility was a human idea and not one strictly mathematical.  Sure, if the math shows a big obstacle between sites A and B then they are not intervisible.  There are gradations however.  Suppose a town is just barely behind an obstacle (like a ridge).  Mathematically speaking your town and that town are not intervisible.  But you can see the smoke from their fires during the day and a glow in the sky at night.  If, imagining the worst, an enemy destroys that town you will surely see the smoke from the fires and know that something is wrong.

I've tried to make allowances for such situations in the intervisibility software on the Mycenaean Atlas.  Of course I add 1.8 m to the elevation of the source site (site A) in order to mimic the height of an observer.  And now I've also added 3 meters to the elevation of the target site (site B) in order to get rid of some edge cases where site B sits juuuussst below the horizon but really should be counted as intervisible.

The point is that this intervisibility page is a tool for exploring intervisibility.  The mathematics cannot definitively make a decision about a fundamentally human idea.  If you see a result that you don't agree with then you should pursue it further and make up your own mind.

It's easier to do that now because my friend Xavier Fischer, of, has provided an additional tool.  Now you can generate an intervisibility graph that addresses the sites pairwise.  Here's an example:

This shows the intervisibility sightline from, on the left, Kastro (C714) in the neighborhood of Gla to Magoula   Kavkala (C984) about 2.25 km. distant.  Because no obstacles intrude on the red line then the sites are intervisible.  The bottom scale is distance in km.  The left side scale is elevation in meters.  Notice that I add 1.8 m. to the starting elevation (on the left) and a few meters to the right.  That helps to tip the two sites into intervisibility.

So how do you exercise this fine new tool?

On the new intervisibility page you simply click on the 'true' or 'false' values in column 3 of the intervisibility list.  When you do that the graph will display. 

Here is an example of the I. graph between Kastro (C714) and one of the cemeteries at Hagia Marina (C728) directly to its east.  These two sites are intervisible; the resulting graph is:

You should keep in mind that this graph's x-axis (distance) is compressed in comparison to the y-axis (elevation).  In this particular graph one major division in the vertical (5 m) has the same size as 250 m. in the horizontal - a ratio of 1:50.  So all these graphs are what statisticians call 'Oh boy!' graphs.  Always be sure that you understand the relative scales on these graphs before trying to interpret them.

News of the Mycenaean Atlas Project

On February 12 I delivered version 131a of the database.  It contains many additions and minor changes.  At that time a new version of the software was delivered in order to support intervisibility.


And, by the way, friends don't let friends use Facebook.

Saturday, February 8, 2020

Thoughts about Intervisibility

‘ … and now I watch for the light, the signal-fire
breaking out of Troy, … [1]

Before the systematization of linear perspective in the 1400’s painters still needed a way to show that certain things in their paintings were further away. How did they do this?

They used a set of techniques that are collectively known as ‘aerial (or atmospheric) perspective’. These techniques consist of using certain observations about distance with which we are all familiar but which we rarely consider. Its principles are:

a. Things further away are smaller than the same things up close
b. Things further away are bluer than the same things up close.
c. Things further away are of lower contrast (grayer) than the same things up close.

There’s a nice example of this in a painting from 1520 by Patinir:

J. Patinir, Landscape with the Flight into Egypt, ca. 1516.

Here we can clearly see aerial perspective at several removes. There is a slight graying of the fields in the center. This fades into the grayer and bluer mountains at the upper right. 
These in turn transition to the entirely gray and nearly detail-free mountains on the horizon.

Time of day might be a factor in intervisibility. A town to the west that’s visible in the morning might be lost in the sun’s glare in late afternoon and evening. The reverse for towns to your east.

There’s also the curvature of the earth to consider. Consider that towns A and B are sitting on a perfectly smooth earth. At some distance town B will be below the horizon relative to an observer at A. What distance? Well, an object 10 m. in height (32.81 ft.) will be below the horizon at about 16 km (9.9 mi.). [2] This might be a factor in coastal town intervisibility. Otherwise the main factor in intervisibility is height above the horizon of the object to be observed. That’s why signal fires are placed on towers or heights.[3]

Sometimes intervisibility is achieved by indirect means. Crowe details how Polynesian navigators relied on the color of the underside of clouds to pinpoint islands still well beyond the horizon[4]

Kure Atoll, Northwestern Hawaiian Islands.
Image courtesy of NOAA/LT Elizabeth Crapo

These are just some of the circumstances that might prevail such that lines of sight between A and B may be entirely unobstructed and yet B not really visible from A (or vice-versa).

I go into all this in order to make plain that intervisibility consists of more than just unobstructed lines of sight.  

But the Mycenaean Atlas cannot take any of these factors into account. Here the analysis is strictly mathematical – it seeks only to determine whether there is an unobstructed sight-line between location A and location B. This is achieved in the following way.

1. construct a linear function (y = f(x) = Ax + B) that joins the two sites. Here the coefficient A is the tangent line that connects the two sites (Δ elevation (A,B) / Δ distance (A,B)). The coefficient B is merely the elevation of site A.

2. Now the function can be evaluated for any position on a line between A and B.  This is to determine whether any features between sites A and B are higher than the function value at that point.

If no elevations between the sites have an elevation greater than the function evaluation at that point then the two sites are intervisible. If there is some real elevation higher than the function would predict then the two sites are not intervisible. This algorithm is a modification of an intervisibility algorithm described by Blelloch[5]. 

I have had the great good fortune to work with Xavier Fischer of who, at my request, created a single call that returns the intervisibility status for any two lat/lon pairs. In my original design I needed an internet call for each point evaluated between A and B (at least 16). Such an algorithm runs on Oinp (order of time of average internet fetch * the number of pairs(A’,B’) * the number of partitions between A and B). With the new internet call of Mr. Fischer’s the new algorithm runs on Oip (order of average internet time * number of pairs(A’,B’).

When using this new algorithm I add 1.8 m to the start point to mimic an average observer’s height. This helps, I think, to make some sights intervisible which would not be so if the elevation of the observer was taken as ground level.  This would not be very realistic.

In the Mycenaean Atlas I have created an intervisibility page. It is reached from the Place Key Report by clicking on the new ‘Intervis’ button.

Clicking on that button brings you to this new  page.

The main feature on this page is a map which shows the starting point (A) in blue.  Sites that are intervisible with A are shown with green push-pins.  Sites that are NOT intervisible with A are shown with red push-pins.  Each of the pins on the map has tool-tips which provide the name and place key of the sight.  If you click on a pushpin you will get an info box that contains more information along with a link.  Clicking on the link takes you to the Place Key Report page for that specific site.

The other main feature on this new page is the intervisibility list on the left.  This list shows all the sites that are within 6.5 m. from the center site (A).  Each line has a link.  If you click on that link you will be taken to the intervisibility page with your clicked-on site as the new center (A) site.  That way you can remain in the intervisibility domain while you check sight lines from various origins.  The list's intervisibility column simply gives the values 'true' or 'false' for each of the set of sites.  Each column in this list is sortable.

Here's one more view of our new page.  It shows the intervisibility from a  peak sanctuary C6228,  Petsofas Peak Sanctuary in Siteia.   Its elevation is 251 m.

We can check the accuracy of this very easily in Google Earth.  I drew a straight line from the peak sanctuary at C6228 to C5107 which is one of the sites that is supposed to be intervisible with C6228.  I then did a 'Show Elevation Profile' on that straight line and this is the result:

You can clearly see from the Elevation  Profile that there are no obstacles intervening between the two sites.

I hope that you will enjoy using this new tool and that you'll find it useful.

Some Bibliographical Remarks

A general survey of the history of intervisibility in archaeological practice may, perhaps, be had here:

Wheatley, David   'Making Space for an archaeology of place' (especially part 4. Visibility Studies), [2004]  Internet Archaeology, (15) Online here.

Two  nice case studies of the use of intervisibility as part of landscape analysis are:

1. Sylviane Déderix, 'Patterns of Visibility, Intervisibility and Invisibility at Bronze Age Apesokari (Crete)' Open Archaeology (5), 187-203.  Online here.

I particularly recommend this article.  She proposes a number of hypotheses about the position of this tholos and supports or refutes them using intervisibility and viewshed ideas.  This is a good example of how it should be done.

2. Criado Boado, Felipe, and Victoria Villoch Vázquez. 'Monumentalizing Landscape: From Present Perception to Past Meaning of Galician Megalithism (Northwest Iberian Peninsula).' European Journal of Archaeology (3:2) (2000): 188–216.  Online here.


[1] Aeschylus. Agamemnon, ll. 4-11.

[2] For a calculator see this.  

[3] For an amusing discussion of signal fire parameters in The Lords of the Rings see this.

[4] Often attested. Crowe [2018] 91. Worth quoting in full:

In the case of a particularly shallow lagoon, the navigator even may be guided to it by the turquoise tint of the water reflected up onto the underside of a cloud. Striking examples of this include the unusually shallow lagoons of Aitutake (S. Cook Is) and ‘Ana ‘a (Tuamotus), where the presence of these low-lying atolls can be discerned in fine weather from up to 70 km away. This kind of phenomenon can show up in other cases, too, where the destination island can even be distinguished by the colour of the cloud hanging over it – a green tinge in the case (of) a forested island; an unusually bright cloud over white sand or surf, or a pink tinge warning of a reef.” And see notes 37-43 for this chapter.

At 70 km from the observer the curvature of the earth will completely occlude an object up to 334 m (1095.8 feet) in height.

[5] See De Floriani and Magillo [1999] 549. Also Blelloch [1990] 40.


Aeschylus: The Oresteia, Translated by Robert Fagles. Penguin, 1975

Blelloch [1990]: Blelloch, Guy E. Vector Models for Data-Parallel Computing. MIT Press, Cambridge, Massachusetts. 1990.

Crowe [2018]: Crowe, Andrew. Pathway of the Birds; The voyaging achievements of Maori and their Polynesian ancestors. University of Hawaii Press, Honolulu, Hawaii. 2018. ISBN: 978-0824878658

De Floriani and Magillo [1999]: De Floriani, Leila and Paola Magillo, ‘Intervisibility on Terrains’, 543-556. 1999. It is online here.

Sunday, January 26, 2020

What does 'site aspect' mean? Reviewing a paper by Malaperdas and Zacharias

I’ve been looking at Malaperdas and Zacharias’ paper from 2018 and using the Site Aspect pages to check some of their figures.[1]  This very interesting paper examines 18 Mycenaean sites in Messenia from the geophysiological viewpoint. The authors examine site aspect, slopes, water resources, and site geology in an attempt to derive clues to explain why the Mycenaeans established settlements where they did.

The concept of site aspect is a complex one. First there’s the problem of determining what aspect actually is. I take this word to mean the direction of the largest slope. Aspect can change radically as one gets further away from the site. I’m not aware that there is an agreed distance at which the slopes for determining aspect should be calculated.

In the Mycenaean Atlas Project each site elevation is matched to eight other elevations. These ‘sample’ elevations are taken at 150 m and 300 m in each cardinal direction (N, S, E, and W). That means there are two slopes calculable for each site in each of the four directions, one at 150 m and one at 300 m.   For each site the direction with largest slope at 150 m and direction with the largest slope at 300 m are used to determine ‘Site Aspect’. There are ten possible results: N, E, S, W, NW, NE, SW, SE, NS, and EW. For each site the aspects at 150 m and at 300 m may very well differ.

Site Aspect Map for Messenia. Blue arrows indicate aspect.  Clicking on
an arrow brings up an info-box for that site.  Mousing over the arrow
gives you the name of that site.

More than the problem of determining aspect mathematically there is the consideration that many sites are large and complex. It is quite reasonable to associate different parts of a site with different aspects. I do not generally take this factor into account in the Mycenaean Atlas.

Sites with very low slopes (< 3º) in every direction have no meaningful aspect in my opinion.

Malaperdas and Zacharias [2018] are not explicit about how site aspect was determined. I compared my site aspect results to theirs. (All numbers in the form Cnnn or Cnnnn are references to the Mycenaean Atlas Project at

1. Ano Englianos (C219). This large and complex site lies on both sides of a ridge that runs approximately NE-SW. Nestor’s Palace itself actually sits on a part of that ridge that runs more directly EW. Malaperdas and Zacharias [2018] give its aspect as ‘South’. In fact, its real aspect is North-West-South, that is, orthogonally away from its ridge in both directions (NS) and with a clear view of the ocean (W).

2. Koryfasio-Beylerbey (C238). This little site sits on top of a tiny plateau (elev. 31 m. a.s.l.) and has very little slope in any direction. Only to the N and W at 150 m. does its slope amount to ‘slight’. Malaperdas and Zacharias have its aspect as ‘Southeast’. A better value would be NW but, in fact, aspect has little meaning for this site.

3. Iklaina (C223). I have taken our authors to mean ‘Ikaina-Traganes’ which is the major site on the Iklaina plateau. Iklaina is located near the S edge of a large plateau which falls away precipitously to the S and W but that’s not enough to give the site a south-westerly aspect. In fact C223 has no more or less aspect than any other site on that plateau which is essentially flat.

4. Koukounara (C421). Koukounara is part of an enormous complex of BA sites (mostly tombs) each of which differs from the others. It has never, to my knowledge, been adequately mapped.[2] The first task is to try and figure out what Malaperdas and Zacharias mean when they say ‘Koukounara’. The Potamou tou Arapi is a rema or gully (as we say in America) that runs roughly N-S. At one point two separate remas come together and create a southwest-facing promontory and the little settlement (C421) sits on that promontory facing S. I have its aspect as West at 150 m and South at 300 m. so I make its aspect to be predominantly S and W. Malaperdas et al. make this aspect to be S and E.

5. Yialova: Palaiochori (C249). For the exact location of this settlement see McDonald and Simpson [1961].[3] It sits on the west end of a ridge running EW. We are explicitly told that the site sits on the summit of the westernmost bump on that ridge.[4] As a result it has aspect to the N, W, and S. Malaperdas’ suggested value of ‘Southeast’ is not adequate.

6. Metaxada-Kalopsana (C203). This little site lies at the bottom of a valley which runs N-S. We would expect, by inspection, that its aspects would be N-S. But it also lies on a small ridge running E-W in that valley and so it has a non-negligible westerly slope. Nevertheless, I make its aspect to be South at both distances. Malaperdas et al. make the aspect here to be Southeast. I do not see how that is possible.

7. Rizomylos-Nichoria (C159). Nichoria is situated on a ridge that runs nearly perfectly E-W. (260º). A road ran through the settlement and parallel to the ridge. It is completely open on all sides and, while a little valley does open to the south, the idea of aspect is nearly meaningless with respect to this site. Its site would not, for example, shelter it from the north wind.

8. Thouria-Ellinika (C403). I take Malaperdas et al. to be referring to a site which, in the Mycenaean Atlas, I call C403. This is the same as the ‘Myc. Site’ on Richard Hope Simpson’s map in his article from 1966 [5] This little settlement sits directly on top of the Thouria ridge and just to the south of the chamber tomb complex dug into that ridge. Mathematically its aspect is East and West and inspection confirms this. Its slope to the south is slight (4.29 and 4.76 at 150m and 300m respectively).

9. Pidma – Agios Ioannis (C113). This site is open to the N, W, and S. It backs against those cliffs which bound the Pamisos valley on the east. We would expect its dominant aspect to be away from the cliffs and to the W. This is so but the slopes to the three cardinal directions are so slight that it can hardly be said to have aspect at all.

10. Kalamata Kastro (C111). The Kastro sits on top of a small plateau and is open to the sky in all directions. Even though there is strong slope in all directions at 150m this is purely an artifact of the plateau edge and cannot figure into any calculation of aspect. The concept of aspect at this site does not apply.

11. Kardamyli Kastro (C103). The location of the Kastro of Kardamyle is given in Simpson [1957] 234-6. It is the high plateau (+110 m) that stretches out about 800 m to the NW of the modern town. Simpson provides an excellent map.[6] Malaverdas et al. seem to have picked a different place. To judge by their reported elevation they apparently chose the little height about 400 m to the southwest. But this is not the Kastro of Kardamyle. Simpson reports activities on both sides of this high acropolis. Indeed, activities on the south side have southern aspect and activities on the north side have northern aspect. The acropolis itself, however, is flat and has both N, W, and S aspect. It has, for example, shelter only from the east. Otherwise none.

12. Leuktra: Stoupa (C447) Southeast of the little town of Stoupa a volcanic plug rises suddenly out of the plain to a height of about 50 m. (72 m a.s.l.) above the surrounding level. The top of this plug is relatively flat and it measures ca. 118 m. northeast to southwest, and as much as 35 m. northwest-southeast at its widest point. In the LH a Mycenaean site of little consequence was placed here – sherds have been found. Again, as in previous examples, this site has no aspect. It is completely open in every direction. The Mycenaean Atlas reports strong slope in every direction but that is not enough to establish any directional aspect.

13. Kato Melpia: Krebeni (C121). You can see Kato Melpia in Google Street View at the location 37.328513°, 21.933230° and looking directly N. Kato Melpia is not the high peaks but the shelf lying about half-way down. It has some shelter from the N and I make its aspect to be south and west. In this I agree with Malaperdas et al.

14. Malthi-Gouves (C149) The site selected by Malaperdas et al. Is not Malthi-Gouves. Judging by their reported elevation they seem to have selected the primary tholos at the bottom of the Malthi hill (C1207), and not the actual settlement which is at the top of the hill about 125 m. above it. The settlement itself covers the top of the hill and is unsheltered in every direction. The concept of aspect really does not apply to it although inspection of the photographs here() show a slight incline towards the south. The site seems, however, to have been chosen purely for the sake of the visibility it affords over the central Soulima valley. The site selected by Malaperdas as ‘Malthi’ is a large tholos tomb, not badly preserved, but which is tucked into the Malthi ridge at its base on the West side. They give it an aspect of southeast but I do not see what relevance aspect has in this context.[7]

15. Dorio-Kontra (C126). The little settlement of Dorio sits on the top of a conical hill more than 100 m above the surrounding valley of Stenyklaros. As such it has no aspect. The nearest hills to the N are about 3 km distant. It seems clear that this site was chosen for the visibility it has over its surrounds.

16. Filiatra – Ayios Christoforos (C188). This site is located on a plateau. Ayios Christoforos is where it is probably because it affords a view of the entire coast to the west. Immediately to its N is a large hill which shelters it from the N. Its aspect is S and W.

17. Myron-Peristeria (C183). This is a complex site with multiple aspects. Aside from the several tholoi (placed, I am convinced, for maximum visibility), C183 is a building occupying a position which Simpson and Dickinson [1979] 167 call an ‘acropolis’. Like Malthi (C149), it overlooks the Soulima valley to the north and its measurable aspect is N and W.

18. Mouriatadha-Elliniko (C180). This site occupies a northwest-southeast ridge in the center of a valley running EW. It sits on the top and south of this little ridge but immediately to its south is another and larger ridge running east-west. To the extent that this settlement has any aspect at all it is east-west.


If there are any lessons to be learned from looking at settlement site aspect they are these:

1. Sites near the sea usually face the sea.

2. Whichever way the slope faces the site faces the same direction. That is if a ridge slopes down to the N then sites on that slope face N, etc. There are about as many sites on N-facing slopes as S-facing.

3. Sites on top of a ridge or on saddles have aspect in opposite directions orthogonally away from the direction in which the ridge runs.

4. Aspect is much less meaningful for sites on peaks or in valleys (or located on plateaus) and for sites on ground where the slope is less than 0.05 (2.86°) in any direction.

These are general ideas only and can be heavily affected by local conditions: access to water, tillable fields, etc.


[1] Malaperdas and Zacharias [2018].

[2] See Zavadil, Monumenta [2012] 454-455 for remarks about this.   Also definitely this.

[3] McDonald and Simpson [1961] 242, '58. Palaiochori (Gialova)'. And for more see Mycenaean Atlas Project website at for C249.

[4] Idem.

[5] Simpson [1966] 122, fig. 6 ‘Ancient Thouria’. And see this.

[6] Simpson [1957] 234-6. Simpson gives a textual description on p. 234 and an unmistakable map on 235.

[7] Photos and discussion of this tholos (C1207) are here.  There are photos of the actual settlement (C149) here.


Malaperdas and Zacharias [2018]: Malaperdas, George and Nikolaos Zacharias. “A Geospatial Analysis of Mycenaean Habitation Sites Using a Geocumulative versus Habitation Approach”, Journal of Geoscience and Environment Protection (6) 111-131. 2018. Online here.

McDonald and Simpson [1961]: McDonald, William A. and Richard Hope Simpson. ‘Prehistoric Habitation in Southwestern Peloponnese’, American Journal of Archaeology. (65:3) 221-260.  Online here.

Simpson [1957] : Simpson, Richard Hope. ‘Identifying a Mycenaean State’, The Annual of the British School at Athens (52) 231-259. Online here.

Simpson [1966]: Simpson, Richard Hope. ‘The Seven Cities Offered by Agamemnon to Achilles’, The Annual of the British School at Athens (61) 113-131. Online here.

Simpson and Dickinson [1979]: Simpson, Richard Hope and O.T.P.K. Dickinson. A Gazetteer of Aegean Civilization in the Bronze Age, Vol. I: The Mainland and the Islands. Paul Åströms Förlag, Goteborg. 1979., 'D 200 Mirou: Peristeria', pg. 167.  Online here.

Zavadil [2012]: Zavadil, Michaela, Monumenta: Studien zu mittel- und späthelladischen Gräbern in Messenien, Wien:Osterreichische Akademie der Wissenschaften Philosophisch-Historische Klasse Denkschriften. 2012. Online here

Thursday, November 28, 2019

A convenient API for retrieving accurate elevation values

The elevation values for the sites in this atlas were recently updated from Google Earth values to values from the Digital Elevation Model (DEM) called ASTER_DGEMV3 which samples 1 arc second squares (30 m).

I've been wanting to do this for a long time but wasn't able to understand all the gyrations involved.  Happily I stumbled across the site called which was created by Xavier Fischer.

This site is an interface to any one of several DEMs including my ASTER_DGEMV3.  It eliminates an enormous amount of work for those of us who aren't quite up to speed on Digital Elevation Models or map projections but really need a source of accurate elevation data.

I began by using this interface in a very simple and naive way.  This page  provides a simple web call that returns the elevation of the Eiffel Tower in Paris (you should experiment with this.  Copy and paste it into your browser URL window and hit 'return'.): 


As you see it requires three arguments, lat, lon, and DEM name.  For DEM name I used: ASTER_GDEMV3 instead of SRTM_GL3/

This call returns a JSON string with the elevation embedded (it's in the first line):

{"message":"OK","geoPoints"[{"latitude":48.854624,"longitude":2.3436793,"elevation":28.353599548339844}],"resultCount":1,"dataSet":{"name":"ASTER_GDEMV3","description":"ASTER Global Digital Elevation Model 1 arc second (30m)","publicUrl":"",
"resolutionMeters":30,"noDataValue":-9999,"fileFormat":{"name":"GeoTiff file","fileExtension":".tif","type":1,"registration":0},"attribution":
{"text":"NASA/METI/AIST/Japan Spacesystems, and U.S./Japan ASTER Science Team. ASTER Global Digital Elevation Model V003. 2018,
distributed by NASA EOSDIS Land Processes DAAC,"},"dataSource":{"indexFilePath":"ASTGTM.003.json",

So ASTER_GDEMV3 returns an elevation of 28.35 m. where Google Earth returns either 33 or 34 m. depending on exactly where you put the cursor.

How do we handle the JSON?  All you really want is the elevation value.  But since we've been given a URL we're home free.  We can capture the return string using cURL and then use json_decode on the string.  I quickly wrote a program in PHP using cURL that incorporated the URL from    Here's the nucleus of it:

$URL = "$lat&lon=$lon&dataSet=ASTER_GDEMV3";       

// This ^ is the URL I want to send.  You will have had to have already filled in $lat and $lon with the desired values.

$ch1= curl_init();                                        // All of this is just  cURL stuff.  I changed nothing.
curl_setopt ($ch1, CURLOPT_URL, $URL );
curl_setopt($ch1, CURLOPT_HEADER, 0);
curl_setopt($ch1, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)');
curl_setopt ($ch1, CURLOPT_REFERER,'');  //just a fake referer
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, 20);

$htmlContent= curl_exec($ch1);        // this puts the entire returned string into a variable named $htmlContent

$ar = json_decode($htmlContent);                           // JSON decode

$newElev = $ar->geoPoints[0]->elevation;   // Fetch the elevation field

$newElev = round($newElev);                // Round the value (if you like)


That's all you need to do.  You can put this section in a loop which retrieves the lat/lon pairs from each DB.  You can follow it up with an insert back into the DB of the new elevation value.
I simply generate a sql statement and write it to a .sql file for execution later.  That code looks like this:


$diff = $newElev - $oelev;     // I subtracted the old elevation from the newly returned one.  This is the 'error'.

if ($diff != 0)
echo "update site set ALT = $newElev where pk = '".$pk."' limit 1;";          // this generates a SQL update statement that I pipe to an external .sql file.    $pk ('place key') identifies the specific site


In this section $oelev is the old elevation value from the DB which I'm now going to replace with $newElev.

It looked to me as though the average error was on the order of 10 m.  And by looking at my own old data for elevation I discovered a few gross errors caused by me and not Google Earth.  Those are now corrected.

It always helps to review your data.

I'm very grateful to Mr. Fischer for building this site and then promptly and helpfully following up my questions on Twitter (@ElevationApi).  There is much more on this site including the ability to create 3D models of various terrains.

I know that I'm going to learn a great deal by scrutinizing this site carefully along with Mr. Fischer's helpful links.

Thursday, May 30, 2019

Monday, May 6, 2019

The Archaeological Atlas of Mycenae (Iakovidis [2003]) and how to overcome its limitations

I've received the Archaeological Atlas of Mycenae (Iakovidis et al. [2003]) and there's much to say about it.[1]

One of the first things I've done is to plot the chamber tombs and I wanted to describe how that was done on the chance that it might help others.  Conceptually this work is divided into two parts; one part deals just with the Citadel and the other part describes the surrounding countryside.  When I talk about the chamber tombs here I mean those outside the Citadel and in the country.  The maps for the outside regions are very good (1:2500).  There are 14 of these maps and each is divided into lettered squares that are 500 m. in length and width.  Individual sites are identified by their grid square designator plus a unique sequence number for each site in that square.  Their zero point is at UTM 673439.00 m E, 4179619.00 m N, 3  (37.747448 N, 22.968617 E)

The authors felt that their job was done at this point and they failed to supply a lat/lon pair for each feature and site.   Paradoxically they decided to show us where things are on a map.  But it's much more useful to be unambiguously told.  This is something which is crucial for any kind of Atlas and which they could easily have done.[2]

I wanted a precise lat/long pair for every site of significance before I added it to the Mycenaean Atlas Project.  I began this process by deriving lat/lon pairs for the upper left-hand corner for each indexed square.    I made this easier by setting Google Earth to UTM and worked entirely in meters (Tools>Options>Show lat/long and checking 'Universal Transverse Mercator').   I will supply the easting and northing for each index point later on in this post.  Once I had the index markers set up I needed a way to measure accurately from the edges of the squares to each site in turn. 

1. The vertices from the Archaeological Atlas of Mycenae. 
I have darkened the map to make the vertices more visible.
Ancient Mycenae is the blob outlined in orange in the center.

It was done like this:

a. Notice that the vertical distance between grid lines is ~ 103.3 mm.  The horizontal distance is 101 mm.   In order to convert vertical distances into meters requires multiplying the measured vertical distance in mm. by 4.84.  To convert measured horizontal distances in meters requires multiplying the measured horizontal distance in mm. by 4.95.

b. Measure the vertical and horizontal distances to your site

c. Enter these distances into a text file,  mysite.txt,  with this format:

pk, Upper Corner Vertex label, Item no, Name, VDist (mm), HDist (mm)
C8000, A3, 1, Vythisma S, 82, 74

Here the  pk can be anything - the program will ignore it.  In this example the Vythisma Chamber Tomb Complex is at square A3:1.  The explains the next two items.  They are not modified during execution but are used to label the output.  As is the next item which is the text string for the name - 'Vythisma S'.  The final two arguments are the offset in mm measured vertically from the horizontal square border and horizontally from the vertical square border.

You can add as many of these lines as you like to the input file.

d.  Run the program MSites.php (Listing 1).  This program opens mysite.txt,  reads it in, and converts each line to an easting/northing pair.  The output for 'Vythisma S' looks like this:

C8000, A3,  1,  Vythisma S, 654305.3, 4178721.3

This indicates that 'Vythisma S' (which I arbitrarily called 'C8000') which is item A3:1 in the Archaeological Atlas of Mycenae (Iakovidis et al. [2003]) is located at easting: 654305.3 and northing: 4178721.3.  The UTM zone for all of Greece is '34 S'.   

e. Now you can plot this point in Google Earth by creating a new point and entering the northing/easting/zone triple (set GE to UTM first).  Or you can go on to convert this triple into a regular (WGS84) lat/lon pair using one of the many UTM/WGS84 converters that you  can find on the web and then plotting your new point with this lat/lon  pair.   The lat/lon pair for Vythisma S (after conversion) is this: 37.74278838 N, 22.75134851 E

That's the sequence.  The text for the PHP program Msites.php is in Listing One.  It takes an input file of the measured distances to your sites of interest and returns a UTM easting/northing pair for each line in the input.

Also included in Listing 1 are all the UTM coordinates for the vertices in Iakovidis et al. [2003] that I've found necessary so far.

Listing 2  provides the file mysite.txt for the chamber tombs in the Mycenae region.

When you run this program against mysite.txt  you get the output in Listing 3  the lat/lon pairs (WGS84) for all the converted chamber tomb complexes

The result of plotting all the chamber tombs was, I thought, startling.  Here they are in Google Earth:

2. Chamber tomb complexes plotted.  Mycenae is the blue blob in the center.

3. The chamber tombs plotted in a low-angle which emphasizes how they surround the town of ancient Mycenae (M).

I plotted them in Topoguide also:

4. The Chamber Tombs show up as blue push-pins.  Ancient Mycenae is in the center.

Status: I am about to deliver version 1.015 of the database.  This will include some of the sites around Mycenae although there will be more to do after that.

When the Mycenae work is done the Mycenaean Atlas Project will go into maintenance mode.  I will always accept additions, corrections, and updates but the aggressive phase of coverage expansion has pretty much run its course.  I will respond immediately to anyone who suggests corrections and/or additions and I will be very grateful to receive them.

Remember: Friends don't let friends use Facebook.


[1] Younger [2010].

[2] The authors make a  point of telling us that all the data for the maps was digitized. From the Preface, ix.: "Some 703 various remains of all periods of antiquity (tombs, buildings, roads, quarries) were located and plotted.  Their particulars (kind of monument, form, dimensions, construction, orientation, preservation, excavation data, bibliography etc.) were recorded and entered in an electronic data bank."


Iakovidis et al. [2003]:  Spyros Iakovidis, Elizabeth B. French, Kim Shelton, Charalambos Ioannides, Anton Jansen, John Lavery, Archaeological Atlas of Mycenae.   The Archaeological Society at Athens Library, no. 229.  2003, ISBN: 960-8145-40-6.

Younger [2010]:  Younger, John, 'Archaeological Atlas of Mycenae; A Review', GNOMON, Vol. 82, 623-633.  2010.    Online here.

LISTING 1: MSites.php


// Each small array ($A3 etc.) holds the easting and northing for one vertex point in the Atlas.

$A3 = array("easting"=> 653939, "northing"=> 4179119);
$A4 = array("easting"=> 654439, "northing"=> 4179119);
$B2 = array("easting"=> 653439, "northing"=> 4178619);
$B3 = array("easting"=> 653939, "northing"=> 4178619);
$B4 = array("easting"=> 654439, "northing"=> 4178619);
$B5 = array("easting"=> 654939, "northing"=> 4178619);
$C2 = array("easting"=> 653439, "northing"=> 4178119);
$C3 = array("easting"=> 653939, "northing"=> 4178119);
$C4 = array("easting"=> 654439, "northing"=> 4178119);
$C5 = array("easting"=> 654939, "northing"=> 4178119);
$C7 = array("easting"=> 655939, "northing"=> 4178119);
$D2 = array("easting"=> 653439, "northing"=> 4177619);
$D3 = array("easting"=> 653939, "northing"=> 4177619);
$D4 = array("easting"=> 654439, "northing"=> 4177619);
$D5 = array("easting"=> 654939, "northing"=> 4177619);
$D6 = array("easting"=> 655439, "northing"=> 4177619);
$E2 = array("easting"=> 653439, "northing"=> 4177119);
$E3 = array("easting"=> 653939, "northing"=> 4177119);
$E4 = array("easting"=> 654439, "northing"=> 4177119);
$E5 = array("easting"=> 654939, "northing"=> 4177119);
$E6 = array("easting"=> 655439, "northing"=> 4177119);
$F2 = array("easting"=> 653439, "northing"=> 4176619);
$F3 = array("easting"=> 653939, "northing"=> 4176619);
$F4 = array("easting"=> 654439, "northing"=> 4176619);
$F5 = array("easting"=> 654939, "northing"=> 4176619);
$F6 = array("easting"=> 655439, "northing"=> 4176619);
$G4 = array("easting"=> 654439, "northing"=> 4176119);
$G5 = array("easting"=> 654939, "northing"=> 4176119);
$H3 = array("easting"=> 653939, "northing"=> 4175619);
$H5 = array("easting"=> 654939, "northing"=> 4175619);
$H6 = array("easting"=> 655439, "northing"=> 4175619);
$J1 = array("easting"=> 652939, "northing"=> 4175119);
$J5 = array("easting"=> 654939, "northing"=> 4175119);

// This array ($idx) hold the coordinates for each labelled corner in the maps of Archaeological Atlas of Mycenae, Iakovidis et al. [2003].

$idx = array("A3"=>$A3, "A4"=>$A4,
"B2"=>$B2, "B3"=>$B3, "B4"=>$B4, "B5"=>$B5,
"C2"=>$C2, "C3"=>$C3, "C4"=>$C4, "C5"=>$C5, "C7"=>$C7,
"D2"=>$D2, "D3"=>$D3, "D4"=>$D4, "D5"=>$D5, "D6"=>$D6,
"E2"=>$E2, "E3"=>$E3, "E4"=>$E4, "E5"=>$E5, "E6"=>$E6,
"F2"=>$F2, "F3"=>$F3, "F4"=>$F4, "F5"=>$F5, "F6"=>$F6,
"G4"=>$G4, "G5"=>$G5,
"H3"=>$H3, "H5"=>$H5, "H6"=>$H6,
"J1"=>$J1, "J5"=>$J5

// Input file line looks like PK, DQID, iten number in quadrant, name, Vdist, Hdist.  Input file will be called 'mysite.txt'

// open the input file and read it in
$myfile = file('...\mysite.txt');   // open input file.  File is called mysite.txt.  Supply your own path to it.

// for each line in the input file do this ...

foreach ($myfile as $line_num => $line)

$larr = explode(',',$line);  // break up input line on commas

$pk = $larr[0];            // Place key.  Only used on output line as a convenience?
$DQID = $larr[1];          // Quadrant identifier, A4, C5, J1, etc.
$ItemInQuad = $larr[2];    // sequence number of this item in the quadrant
$pname = $larr[3];         // text string = name label
$Vdist = $larr[4];        // vertical distance in mm.
$Hdist = $larr[5];        // horizontal distance in mm.

// Convert vertical and horizontal distance in mm. to meters

$VdistC = 4.84 * $Vdist;  //  $Vdist is mm.  Convert to meters by multiplying by 4.84
$HdistC = 4.9505 * $Hdist;  // $Hdist is mm.  Convert to meters by multiplying by 4.9505

// Get the name of the quadrant and trim it

$DQID = substr($DQID, 1);    // There's a leading space in $DQID before the trim here.

// compute new easting and northing

$newEast  =    $idx[$DQID]["easting"] + $HdistC;
$newNorth =    $idx[$DQID]["northing"] - $VdistC;

// output the result

echo PHP_EOL."$pk, $DQID, $ItemInQuad, $pname, $newEast, $newNorth";

}        // loop over whole file


LISTING  2: The input file, mysite.txt, which lists the distances (in mm.) from nearest grid lines to all the chamber tombs in the Mycenae region.

C8000, A3, 1, Vythisma S, 82, 74
C8001, A4, 1, Vythisma N, 29, 1.5
C8002, B2, 1, Batsourorachi, 80, 96.5
C8003, B3, 1, Loupouno, 51.5, 77.75
C8004, B3, 3, Asprokhoma W, 93.25, 78
C8005, B4, 2, Asprokhoma E (A/A), 87, 10
C8006, B4, 3, Asprokhoma E, 95.5, 19
C8007, B4, 14, Souleimani, 45, 76
C8008, B4, 18, Kapsala S, 93, 90
C8009, B5, 1, Kapsala N/Vlakhostrata, 48.5, 10
C8010, C2, 2, Batsourorachi SW, 72.5, 58
C8011, C3, 4, Koutsoumbela, 41.1, 49.5
C8012, C3, 8, Asprokhoma SW, 51, 89
C8013, C4, 1, Asprokhoma/Agriosykia, 8.25, 6
C8014, C4, 16, Paleogalaro, Lower, 92.5, 97
C8015, C5, 4, Paleogalaro E/Kapsala, 36.5, 47
C8016, C5, 8, Paleogalaro W, 29.8, 3
C8017, C7, 1, Gortsoula, 96, 4
C8018, D3, 5, Kato Fournos, 27, 32.5
C8019, D3, 9, Pezoulia, 33, 89
C8020, D3, 17, Ep. Pigadi/Fournodiaselo, 80.25, 56
C8022, E2, 1, Sfalakhtra, 61.5, 89.8
C8023, E3, 1, Ep. Pigadi/Fournodiaselo, 14, 58.5
C8024, E3, 3, Bouziati (Kalkani N Bank), 26.5, 34
C8025, E3, 4, Kalkani S Bank, 38, 24
C8026, E3, 7, Kalkani SW, 89, 20
C8027, E3, 13, Panagia, 30, 94.5
C8028, E3, 14, Ag. Georgios, 99, 91
C8029, E4, 4, Panagia, 11.5, 1
C8030, E4, 14, Third Km, 72.5, 25.7
C8031, F3, 1, Alepotrypa, 23.5, 32
C8032, F3, 1, Alepotrypa-Aspria, 23.5, 32
C8033, F3, 5, Ag. Georgios, 18, 99.5
C8034, F4, 1, Third Km, 2, 22.5
C8035, F4, 20, Sarra, 59, 40
C8036, G4, 7, Sarra, 87, 92
C8037, G4, 11, Tserania, 19.5, 47
C8038, G5, 2, Sarra, 24.5, 16
C8039, G5, 9, Gouves Cem?, 100, 42
C8040, H3, 2a, Priftiani, 61, 89.5
C8041, H5, 9, Plesia, 97.5, 83
C8042, H6, 4, Koufourachi, 60.5, 43
C8044, J5, 3, Plesia Rema, 20, 26.5
C8045, J5, 7, Plesia, 11, 88.5

LISTING 3: The result of running MSites.php. The outputs are UTM  pairs.

C8000, A3,  1,  Vythisma S, 654305.337, 4178721.3
C8001, A4,  1,  Vythisma N, 654446.42575, 4178978.35
C8002, B2,  1,  Batsourorachi, 653916.72325, 4178231
C8003, B3,  1,  Loupouno, 654323.901375, 4178369.225
C8004, B3,  3,  Asprokhoma W, 654325.139, 4178166.7375
C8005, B4,  2,  Asprokhoma E (A/A), 654488.505, 4178197.05
C8006, B4,  3,  Asprokhoma E, 654533.0595, 4178155.825
C8007, B4,  14,  Souleimani, 654815.238, 4178400.75
C8008, B4,  18,  Kapsala S, 654884.545, 4178167.95
C8009, B5,  1,  Kapsala N/Vlakhostrata, 654988.505, 4178383.775
C8010, C2,  2,  Batsourorachi SW, 653726.129, 4177767.375
C8011, C3,  4,  Koutsoumbela, 654184.04975, 4177919.665
C8012, C3,  8,  Asprokhoma SW, 654379.5945, 4177871.65
C8013, C4,  1,  Asprokhoma/Agriosykia, 654468.703, 4178078.9875
C8014, C4,  16,  Paleogalaro, 654896.92125, 4178119
C8015, C5,  4,  Paleogalaro E/Kapsala, 655171.6735, 4177941.975
C8016, C5,  8,  Paleogalaro W, 654953.8515, 4177974.47
C8017, C7,  1,  Gortsoula, 655958.802, 4177653.4
C8018, D3,  5,  Kato Fournos, 654099.89125, 4177488.05
C8019, D3,  9,  Pezoulia, 654379.5945, 4177458.95
C8020, D3,  17,  Ep. Pigadi/Fournodiaselo, 654216.228, 4177229.7875
C8022, E2,  1,  Sfalakhtra, 653883.5549, 4176820.725
C8023, E3,  1,  Ep. Pigadi/Fournodiaselo, 654228.60425, 4177051.1
C8024, E3,  3,  Bouziati (Kalkani N Bank), 654107.317, 4176990.475
C8025, E3,  4,  Kalkani S Bank, 654057.812, 4176934.7
C8026, E3,  7,  Kalkani SW, 654038.01, 4176687.35
C8027, E3,  13,  Panagia, 654406.82225, 4176973.5
C8028, E3,  14,  Ag. Georgios, 654389.4955, 4176638.85
C8029, E4,  4,  Panagia, 654443.9505, 4177063.225
C8030, E4,  14,  Third Km, 654566.22785, 4176767.375
C8031, F3,  1,  Alepotrypa, 654097.416, 4176505.025
C8032, F3,  1,  Alepotrypa-Aspria, 654097.416, 4176505.025
C8033, F3,  5,  Ag. Georgios, 654431.57475, 4176531.7
C8034, F4,  1,  Third Km, 654550.38625, 4176609.3
C8035, F4,  20,  Sarra, 654637.02, 4176332.85
C8036, G4,  7,  Sarra, 654894.446, 4175697.05
C8037, G4,  11,  Tserania, 654671.6735, 4176024.425
C8038, G5,  2,  Sarra, 655018.208, 4176000.175
C8039, G5,  9,  Gouves Cem?, 655146.921, 4175634
C8040, H3,  2a,  Priftiani, 654382.06975, 4175323.15
C8041, H5,  9,  Plesia, 655349.8915, 4175146.125
C8042, H6,  4,  Koufourachi, 655651.8715, 4175325.575
C8044, J5,  3,  Plesia Rema, 655070.18825, 4175022
C8045, J5,  7,  Plesia, 655377.11925, 4175065.65

LISTING 4: The Chamber Tomb Complexes around Mycenae with lat/lon pairs in WGS84 after conversion from UTM.

Name, ID,  latitude,  longitude
Vythisma S, A3:1, 37.74278838, 22.75134851
Vythisma N, A4:1, 37.74508036, 22.75300421
Batsourorachi, B2:1, 37.73843667, 22.74683571
Loupouno, B3:1, 37.73961338, 22.75148434
Asprokhoma W, B3:3, 37.73778895, 22.75145539
Asprokhoma E (A/A), B4:2, 37.73803447, 22.75331548
Asprokhoma E, B4:3, 37.73765555, 22.7538121
Souleimani, B4:14, 37.73981441, 22.75706504
Kapsala S, B4:18, 37.73770538, 22.75780161
Kapsala N/Vlakhostrata, B5:1, 37.73963215, 22.75902743
Batsourorachi SW, C2:2, 37.73429185, 22.7445757
Koutsoumbela, C3:4, 37.73558683, 22.74980259
Asprokhoma SW, C3:8, 37.7351213, 22.75201041
Asprokhoma/Agriosykia, C4:1, 37.73697418, 22.75306577
Paleogalaro - Lower, C4:16, 37.7372623, 22.75793156
Paleogalaro E/Kapsala, C5:4, 37.73562093, 22.76101086
Paleogalaro W, C5:8, 37.73595057, 22.75854709
Gortsoula, C7:1, 37.73288738, 22.76987825
Kato Fournos, D3:5, 37.73171253, 22.74875651
Pezoulia, D3:9, 37.73140325, 22.75192278
Ep. Pigadi/Fournodiaselo, D3:17, 37.72936624, 22.75002125
Sfalakhtra, E2:1, 37.72573692, 22.74616099
Ep. Pigadi/Fournodiaselo, E3:1, 37.72775434, 22.75012372
Bouziati (Kalkani N Bank), E3:3, 37.72722858, 22.74873529
Kalkani S Bank, E3:4, 37.72673442, 22.74816201
Kalkani SW, E3:7, 37.72450935, 22.74788504
Panagia, E3:13, 37.7270252, 22.75212852
Ag. Georgios, E3:14, 37.72401322, 22.75186098
Panagia, E4:4, 37.72782727, 22.75256924
Third Km, E4:14, 37.7251413, 22.75389318
Alepotrypa, F3:1, 37.72285677, 22.74852014
Alepotrypa-Aspria, F3:1, 37.72285677, 22.74852014
Ag. Georgios, F3:5, 37.7230408, 22.75231545
Third Km, F4:1, 37.72371986, 22.75367993
Sarra, F4:20, 37.72121467, 22.75460367
Sarra, G4:7, 37.7154432, 22.75738767
Tserania, G4:11, 37.71843019, 22.75493109
Sarra, G5:2, 37.71815314, 22.75885624
Gouves Cem?, G5:9, 37.71483245, 22.76023778
Priftiani, H3:2a, 37.71216119, 22.75149759
Plesia, H5:9, 37.71040275, 22.76243524

Monday, November 19, 2018

Subregion support for Helladic.Info

Until now the Mycenaean Atlas has not consistently supported the idea of subregions.  This situation arose from not thinking clearly about the problem from the beginning.  The general concept of regions (e.g. Crete, Dodecanese, Messenia, Argolid, etc.) has always been a part of the database.  Smaller divisions, however, have been mostly skipped.  

It would, for example, be desirable to be able to look at individual islands in the several groups on an island by island basis.  Up until now one could look at ‘Cyclades’ but not ‘Naxos’ or any other of the individual islands in that chain.  With the 1.002 DB release, however, this has changed.  Several of the major regions have been divided into fully supported subregions.  You can now look not just at ‘Crete’ but at its individual subregions such as ‘Kissamos’, ‘Ierapetra’, ‘Khydonia’, etc.

You can choose these subregions on the ‘Region’ drop-down.  Here is a picture of what the region choice drop down for Crete looks like now:

The new Controls Page with subregions listed.  Here for Crete.

As you can see the term ‘Crete’ (which functions as it always did by encompassing the whole) is followed by combined  choices for the individual subregions of the island: ‘Crete: Amari’, ‘Crete: Apokoronas’, etc.

Island chains are now handled in a similar manner.  You can now isolate the main islands in the following island chains:

Ionian Islands
North-east Aegean (Lemnos, etc.)
Saronic Gulf (Aigina, Salamis, etc.)
Sporades (Skyros, etc.)

Aigina treated as a subregion and mapped by itself and (below)
in its own Chrono Report.

 The concept of named regions is somewhat problematic.  We really don't know the region names for the Greek mainland as they were known in the Bronze Age and their use (we start knowing actual region names from the time of Homer) fluctuates even in historical times.  Of the mainland regions only Anatolia has been divided into subregions on this website.

The benefit of this subregion support is that you can now prepare reports (elevation, chrono, etc.) for more tightly focused regions and I sincerely hope that this will be a benefit.

If you like these posts then please follow me on Twitter (Squinchpix) or Google Plus (Robert Consoli).  Please do this.

You can e-mail me (and I hope you will) at  bobconsoli   at   gmail dot com

And please remember - Friends don't let friends use Facebook.

Some remarks on the Mycenaean Atlas Project database:

Many researchers in the social sciences use some product like Microsoft's Excel to create a 'DB'.  This is fine; it's what is generally referred to as a 'flat file'.  That is, a single table representation of your data of interest.

The Mycenaean Atlas database, on the other hand, is a relational database with several tables that was built using MySQL.  Dumps of this DB are available but you need MySQL (or similar) and a knowledge of Structured Query Language (SQL) to run it.  Otherwise it doesn't make much sense to ask for it.  But If you'd like to have a copy of the Mycenaean Atlas database anyway then e-mail me and tell me about your project.  

And remember that useful .kml and/or .csv files can be generated directly from all the windows (including the new reports pages) of the website   Try it out!   I'm also willing to generate custom .csv or .kml files from the atlas if you need something specific.