Archive of articles classified as' "geocoded"

Back home

Around Japan


I will keep updating this post with the itinerary.

Monday 17: trip from Christchurch to Auckland, seek then from Auckland to Narita International Airporthemorrhoids 140.366993&sspn=0.08176,0.151062&ie=UTF8&ll=35.7727,140.388279&spn=0.681899,1.208496&z=10″>§. Nice 767 plane. This was followed by a car ride from Narita to Hitachi§.

Tuesday 18: visiting progeny trials around Hitachi, quick tour at Tree Breeding Center and first presentation on GxE interaction. Banquet as the guest of honor.

Wednesday 19: visiting another progeny trial and seed orchard for ‘low pollen’ Sugi varieties. Drive to Tsukuba§ and presentation on breeding objectives broadcasted by internet. Drive to Narita, plane from Narita to New Chitose Airport§ (Hokkaido), train to Sapporo§.

Thursday 20: progeny trials, clonal trials and seed orchards around Sapporo, Hokkaido.


Sapporo’s restaurant district.

Friday 21: visit silvicultural trials. Presentation about very early screening for wood quality in Sapporo. Banquet with people attending the presentation.

Saturday 22: train from Sapporo to Chitose, flight from Chitose to Kansai airport§ (Osaka), train from Kansai to Kyoto§, subway to hotel. Visit to market, some shopping and washing my clothes.


Yoko, our friendly waitress/theology student starts bringing the food. Nice restaurant in Kyoto.

Sunday 23: Free day. Temples galore in Kyoto: Higashi Honganji, Nishi Honganji, Sanjūsangen-dō.

Tuesday 25: Presentation in Kyoto on very early screening for wood quality. Flight from Kyoto to Kumamoto (Kyūshū)§.



Wednesday 26: last presentation in Kumamoto on very early screening for wood quality (free at last!). Banquet with 15 people.

Thursday 27: Drive from Kumamoto to Miyazaki§. Visited CP progeny trial and several silvicultural experiments on the way. Flight from Miyazaki to Haneda Airport, Tokyo.


Another 22,000 kilometers in two weeks. This does not consider cars, trains and buses.

Friday 28: Going around Tokyo looking for presents and suffering the heat. It is a big, large, enormous city. Train to Narita airport and 7 pm Air New Zealand flight to Auckland, where I arrived the next day.

Filed in geocoded, travel No Comments




It is a long way down the slide. Auckland Zooapoplectic 174.72049&spn=0.002635,0.003782&t=h&z=18″>§.

Filed in geocoded, photos No Comments

Generating dynamic Google maps with Python


As I have mentioned before, I have been putting together some dynamically generated maps for environmental information. A barebones version of my Python code to generate the KML file is:

#!/usr/bin/env python
# encoding: utf-8
import urllib, random
# Charting function
def lineChart(data, size = '250x100'):
    baseURL = ''
    baseData = '&chd=t:'
    newData = ','.join(data)
    baseData = baseData + newData
    URL = baseURL + size + baseData    
    return URL
# Reading test data: connecting to server and extracting lines
f = urllib.urlopen('')
stations = f.readlines()
kmlBody = ('')
for s in stations:
    data = s.split(',')
    # Generate random data
    a = []
    for r in range(60):
        a.append(str(round(random.gauss(50,10), 1)))
    chart = lineChart(a)
    # data is csv as station name (0), long (1), lat (2), y (3)
    kml = (
        '<p>Value: %s</p>\n'
        '<p><img src="%s" width="250" height="100" /></p>\n'
        ) %(data[0], data[3], chart, float(data[1]), float(data[2]))
    kmlBody = kmlBody + kml
# Bits and pieces of the KML file
contentType = ('Content-Type: application/\n')
kmlHeader = ('<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n'
             '<kml xmlns=\"\">\n'
kmlFooter = ('</Document>\n'
print contentType
print kmlHeader
print kmlBody
print kmlFooter

Well, this is not exactly barebones, because we also wanted to generate dynamic graphs for each placemark, in the easiest possible way. My first idea was to use one of the multiple javascript libraries available in the net However, a quick search revealed that KML files do not support javascript in the description tag. That was the time when I remembered playing with Google Charts a while ago. The lineChart function above is simply a call to create a line chart using the charts API. Because this is a test, I used 60 randomly generated data points, which explains the presence of random as an imported library.

Originally, I did not want to use javascript at all, so inserted the code as a search in maps, generating a link like Just copy the address, send it to some one and, presto, they have access to my map. However, I wanted to embed it in a blog post§ and I was struggling to do it. The solution was to click on the ‘Link’ link in the generated map to copy the ‘Paste HTML to embed in website’ link. This gives an iframe block that can be copied in any page or blog post.

While helping a friend to create another map, we faced the problem that the data set was being updated every five minutes. What is the problem? The map was not being refreshed often enough. The I am not sure if the problem was a browser cache or Google Maps, but it could be solved by calling the KML file with a random extra argument (the script does not need take any arguments, so anything after the question mark is ignored). In my case I needed a frequent random argument, so I use the current time (using the date would work for once a day updates). This meant inserting the map using javascript (and using a Google Maps key). The code for a simple page–from the header onwards–would look like:

<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>A simple dynamic python generated map</title>
<script src=";v=2&amp;key=my_key"
<script type="text/javascript">
    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(-33.458943, -70.658569), 11);
        var pollution = new GGeoXml(""+
                        (new Date()).getTime());
<body onload="load()" onunload="GUnload()">
<div id="map" style="width:750px;height:600px"></div>

It was not too bad for mucking around on Friday in between doing house chores.

Filed in geocoded, programming, web No Comments

Seal in Kaikoura


Last week we did a short trip to the Northern part of the South Island. We spent the first day mostly in Kaikoura, nurse where the best part was visiting the Seal Colony. The best part was jumping between rocks with my sun, more about trying to get closer to the seals.

Seal resting in Kaikoura

Seal on holidays, esophagitis Kaikoura, New Zealand.

Seal colony [maptype=G_HYBRID_MAP]

Filed in geocoded, photos 3 Comments

A quiet moment


A quiet moment in Santiago’s cathedral. Almost five hundred years in the same spot, ask although it is like ‘my granfather’s axe’: it has been destroyed and rebuilt a few times.

Catedral de Santiago

Santiago’s cathedral.


Filed in chile, geocoded, photos No Comments

Memories of Coffs Harbour


Fishing boats in Coffs Harbour

Coffs Harbour Jetty, discount October 2008, disorder 7 am.

Coffs Harbour Jetty

Filed in geocoded, photos No Comments

Wood variability


Trees are amongst the most variable living organisms in the planet. How variable is wood colour for a given species?

Colour variation
Eucalyptus urophylla x Eucalyptus grandis hybrid’s sawn timber. Notice the range of available colours. Maybe the use of clones is exacerbating colour differences. Photo taken in Bahia State, buy information pills Brazil.

Rough location for the picture

Rough location for the picture.

Filed in forestry, geocoded, photos, research No Comments

Rocking trees


I recently started reading Haruki Murakami’s Blind Willow, treat Sleeping Woman collection of short stories(*). I often skip prefaces and introductions but, approved for an unknown reason, I began skimming the pages and read:

Since the beginning of my career as a fiction writer in 1979 I have fairly consistently alternated between writing novels and short stories. My pattern has been this: once I finish a novel, I find I want to write some short stories; once a group of stories is done, then I feel like focusing on a novel. I never write any short stories while I’m writing a novel, and never write a novel while I’m working on short stories. The two types of writing may very well engage different parts of the brain, and it takes some time to get off one track and switch to the other.

In my case it is the same with other types of writing (no comparison with Murakami intended): scientific papers are my novels and blog posts are my short stories. I have spent the last month working(**) in three papers, which involves a large amount of time thinking, tinkering and putting the words together.

During this time I have not posted one item in Quantum Forest. I did post seven short items in Spanish (in Tren de Carga), but nothing that required much thinking, really, I know that. However, it was good from the microblogging point of view: dozens of updates in Twitter and Amarillo. Microblogging is almost automatic.

There are some times for updating the ‘public face’ (this site) but there are others when much more interesting things take precedence.

(*)Incidentally, last year I did enjoy Murakami’s The wind-up bird chronicle. You may find many people commenting on the many loose ends left in the novel. There are many, but are not a deal breaker.

(**)When I say working, this covers not only writing, but putting together datasets and doing statistical analyses.

Rocking trees from zentree on Vimeo.

This is one of the things that I am writing about: rocking trees, web
which are located around 100 m from my office.

Glasshouse experiment location.

Filed in geocoded, research No Comments

Displaying air pollution data


Last week I was contacted by my friend Marcelo about increasing awareness of air pollution problems in Santiago, this web Chile. He was becoming involved in the problem from a technical point of view (GIS and urban forestry). One of the main problems was the lack of proper information for decision making, look so we decided to quickly put together a prototype. Today the page on particulate material pollution went online.


The general process was relatively simple. CONAMA provides data on pollution in graphical form (see, for sale for example, here). I had a quick look at the pages using Firebug, which showed that all the data used for the graphs was contained in one of the javascript files called by the page (variable.js). Then I could obtain up to date pollution data by reading that file, which seems to be updated hourly.

The other component was the location of the air quality stations together with the coordinates of the polygon that marks the city boundary. Marcelo provided me with a KML file containing all the coordinates.

The really fun part was to write a script using Python glueing all these components. The advantages of working with such a great high level language is the default library, which makes chores like reading a file located in another web site very simple, like:

import urllib
f = urllib.urlopen('')
lines = f.readlines()

Probably the most challenging part has been to quickly learn the basics of KML (without having much free time to do so). The documentation for KML is OK, but the tutorial was not exactly what I was trying to do, so there was a fair amount of trial and error to get things working properly.

Overall, coming back to Python (which I started using in version 1.5) has been a lot of fun, particularly when one has a project of ’social value’.

Filed in chile, environment, geocoded, programming No Comments

Intersection of poetry and marketing


Walking in Salvador, human enhancement Bahia I came across this street sign, pregnancy showing the (imperfect) intersection of poetry and marketing. The sign points to Vinícius de Moraes Square, and someone put a sign for a music shop.

poetry and marketing

Approximate location of Vinícius de Moraes square

Filed in geocoded, photos No Comments