Original idea by komelsky (here).
This technology built to avoid Panoramio API issues.
First, you must select these values:
1. Region (like Europe, Russia, Moscow etc.).
2. Proccessing depth (PD). How deep will algorithm go trying to pass below maximal number of photos. This value is not limited, but when you divide to deep polygons become too small and issue #1 can occur.
3. Maximal number of photos (MNP) for polygon. This value has to be less than 20000, because of Panoramio API issue #2.
4. Density map dimensions (width, height) for region. Because at each iteration dimensions are divided by 2 the whole region density map must have dimenstions equal to power of 2.
Then if region (biggest polygon itself) has more than maximal number of photos it recursively divided into four equal polygons. And so on for each of these polygons.
Depth of this recusion is proccessing depth.
On this step of algorithm some files are generated:
1. KML containing polygonal map made of polygons that have number of photos less than MNP, or greater than MNP but at maximum proccessing depth (smallest possible).
2. KML containing overlay map. The same stuff, but instead of polygons it contains image overlays. Image overlays won't show at this moment because of no images.
3. Shell script (BASH, that works on Mac OS X & Linux very fine) #1 called "Get photos".
4. Shell script #2 called "Overlays prepare".
Polygonal map KML can be postproccessed and used as visual material itself. Examples you can see below at "Polygonal maps" section.
Postproccessing made to color polygons or to transform them. There are few types of postproccessing now, though it's number unlimited:
a) Type C — red polygons with transparency depending on denisty of maps at polygon. Ugly, mostly at close ups.
b) Type D — yellow grid with no polygons color transformed (originally it became brighter with polygon getting smaller). Grid density represent with some approximation density of photos and transformation looks fine at distance.
c) Type E — red-yellow-white (RYW) gradient with non-contrast transparency:
d) TypeF — the same gradient, but polygons transformed into histogramm bars (to be honest, somethins like bars =). Height of bars determined visually and can be set.
Using the samples this gradient can be described as R/G/B/T = 11111/0+111/00+11/+111.
Very vivid type of transformation yet comparision of almost equal polygons still not so clear.
Height of bar represent number of photos at region divided by polygon size — denisty.
Pictures (and KMLs) in "Polygonal maps" section are Type E and Type F transformations.
At this step for each polygon every photo is got and according to it's coordinates value of corresponding point on density map increased (double-dimension array).
Dimension of map calculated based of whole region map dimensions and level of depth for polygon, for example: if whole region has 1024×1024 map, at next level (first division) all polygons will have 512×512 maps, at next level 256×256 and so on.
Also at this step maximal point value for each polygon is stored in log. When all polygons proccessed maximal point value amoung all polygons is calculated. It will be used at next step for normalisation.
Using maximal point value and density maps, PNG-images are built for each polygon. Images have same dimensions as density maps.
To make density map more vivid at this step we also apply gradient map. It can be chosen from number of presets or manually specified using samples.
I like this one (black-red-yellow-white condensed, or BRYW_C, condensed means it has smaller black region):
All images are stuck together resulting whole region overlay image with dimensions of denisity map for whole region.
0. Whole region.
1. Divided into polygons.
2. All polygons proccessed separately.
3. Density maps are built.
4. Images are built.
5. Whole region density map image constructed.
Raw (step 3 polygonal map KML output) polygonal maps for Europe, Asia, Africa, Australia & Oceania:
Step 4 postproccessing demonstation:
... and Type F
and Lightspeed bars =)
This bars are wrong because you can't recognize if region have more than 2000 photos.
More detailed photo density map at Paris (final output):
Correlattion of photogenicy and wikipedia:
Photo density map of Rome:
First take —Map (pic) built with wget and Microsoft Excel®. Resolution 10×10.
← This is Central Europe =)
Project goal is to show bright spots on map at places with number of photos. Something like places popularity map at different scales — streets, town, region, country etc.
The best resource where photos are tied to geographical locations is Panoramio. It gives all that necessary for the project and has the greatest database of photos with geo-location.
Work is in progess. First aim is Europe and Russia. Then Africa, Asia and Australia.
Here some raw processing results that can't be treated as final product.
Project depends on open Panoramio API and made with other great Google products — Google Earth, Google Maps, Google SketchUp.