Log on:
  • Recent Activity

  • Blog categories

  • Owned communities

  • Community memberships

Martin Dove :: Friends blog

May 23, 2008

From http://news.zdnet.co.uk/software/0,1000000121,39420717,00.htm:

"A collaboration between the UK government and Google has produced a new online tool for learning about climate change.

Named "Climate Change in Our World", the tool uses information from the Met Office's Hadley Centre and the British Antarctic Survey to provide two new layers, or animations, to all users of Google Earth.

...

One animation uses world-leading climate-science capabilities from the Hadley Centre to show global temperatures throughout the next 100 years under medium projections of greenhouse-gas emissions, along with reports of how people in the UK and in some of the world's poorest countries are already being affected by changing weather patterns.

... 

Another animation, developed by the British Antarctic Survey, shows the retreat of Antarctic ice caps since the 1950s, and features facts about the science and impact of climate change in the Antarctic."

 

Keywords: climate change, google earth, sea ice, temperature

Posted by Jon Blower @ Geobrowsers | 0 comment(s)

May 16, 2008

Here's a useful-looking piece of software for creating Google Maps more easily.  In fact there's lots of interesting geospatial stuff at the CASA website. 

http://www.casa.ucl.ac.uk/software/googlemapcreator.asp

Posted by Jon Blower @ Geobrowsers | 0 comment(s)

MapTube allows you to quickly visualize multiple maps together in a Google Maps interface. 

From the MapTube website:

"MapTube is a free resource for viewing, sharing, mixing and mashing maps online. Created by UCL's Centre for Advanced Spatial Analysis, users can select any number of maps to overlay and view"

http://www.maptube.org

MapTube screenshot - credit crunch 

Keywords: Google Maps, mashups

Posted by Jon Blower @ Geobrowsers | 0 comment(s)

May 06, 2008

This blog entry describes a really nice KML dataset from Columbia University that shows temperature trends at thousands of stations around the world.  Pins are sized and coloured according to the degree of warming and cooling and can be clicked to show detailed data from each station.

http://www.gearthblog.com/blog/archives/2008/03/global_temperatur 

Posted by Jon Blower @ Geobrowsers | 0 comment(s)

Kings College, London have a page of a variety of environmental datasets available for visualization in Google Earth and Google Maps:

http://www.kcl.ac.uk/schools/sspp/geography/research/emm/geo

Screenshot of site

Posted by Jon Blower @ Geobrowsers | 0 comment(s)

May 01, 2008

This article looks exciting although note that there is no official comment from Google so there's a fair bit of speculation.  I'm not sure whether we can expect a full 3-D bathymetry or simply a higher-resolution version of the current "flat image" bathymetry in Google Earth.

http://www.news.com/8301-10784_3-9931412-7.html

Keywords: article, bathymetry, google earth, oceanography

Posted by Jon Blower @ Geobrowsers | 0 comment(s)

April 23, 2008

http://feeds.feedburner.com/~r/Uszla/blog/~3/276408652/23

As any fule no, QNames are how XML does namespaces.
Where a namespace has been declared:



and the "c" prefix on the element name is associated, via
the xmlns attribute, with the namespace URI. This is
trivially manipulable with any namespace-aware tool.


So far so good. However, when QNames are used in content (typically, as
an attribute value) then the situation is more complex. The two nodes
below are equivalent under QName-in-content processing.





<c:cml xmlns:c="http://www.xml-cml.org/schema"
att="c:comp"/>
<d:cml xmlns:d="http://www.xml-cml.org/schema"
att="d:comp"/>

This usage is blessed by the W3C, http://www.w3.org/2001/tag/doc/qnameids.html, and XSLT depends on it working.


But it's significantly harder to work with using most XML toolkits.





node()[@att='string']

The above XPath returns all nodes which have att="string".
However, it turns out that matching on a namespace-resolved QName needs the following:





node()[substring-after(@att, ':')='comp'
and @att[../namespace::*
[name()=substring-before(../@att,':')]
='http://www.xml-cml.org/schema']
]

if you only allow for prefixed QNames (eg c:comp above). If you want to be able to match unprefixed QNames as well, that is, QNames in the default namespace:





<cml xmlns="http://www.xml-cml.org/schema"
att="comp"/>

then you need to extend the expression to the following:





node()[(substring-after(@att, ':')='comp'
and @att[../namespace::*
[name()=substring-before(../@att,':')]
='http://www.xml-cml.org/schema'])
or (@att='comp' and
and namespace::*[name()='']
='http://www.xml-cml.org/schema')
]

which is hardly transparent!


Much as I think XPath 2 is a bad idea in general, this is one area where it is
a significant step forward; it offers node functions:



which will do what they suggest. Of course XPath 2 then buggers things up again by saying:




In XPath Version 2.0, the namespace axis is deprecated and need not be supported by a host language



W3C Recommendation 23 January 2007

— XML Path Language (XPath) 2.0

Who needs backwards compatibility anyway?


But since libxml2 doesn't support XPath2, I don't propose to worry very much about it.


In any case, unwieldy though the above solutions are, they work correctly.


@

Posted by Toby White | 0 comment(s)

April 22, 2008

http://feeds.feedburner.com/~r/Uszla/blog/~3/275386225/22

Just to get the goods up front:





define(`m4Y', `dnl
pushdef(`m4Y_recur',dnl
`pushdef(`m4Y_LL',dnl
`$1''changequote([,])(['changequote([,])`changequote`]`$[]1'(``$[]1'')dnl
['changequote([,])'changequote`])changequote`dnl
(changequote([,])`$[]1'changequote)dnl
`popdef(`m4Y_LL')')'dnl
`m4Y_LL')dnl
pushdef(`m4Y_LL',`dnl
m4Y_recur(`m4Y_recur')'changequote([,])(`$[]1')changequote`dnl
popdef(`m4Y_recur')`'popdef(`m4Y_LL')')`'dnl
'`m4Y_LL')`'dnl

So as seems to be popular, I've been working
my way through The Little Schemer over the last few weeks.


And, as is equally common, I ground to a halt at the derivation
at the end of Chapter IX, where they spring the
Y Combinator
on the unsuspecting audience. The best way to understand it is to work through it by
yourself
, so I thought I would see if you could do one in
m4.
And it turns out you can, though it's not very pretty!


Clearly what the world needs is to know about it, so I wrote it
up, and you can follow the derivation in two essays:





  1. Higher-Order Programming in m4, which shows you
    how to do proper quoting to get macro Currying
    to work.





  2. The Y Combinator in m4, which uses those quoting
    techniques to do the full derivation of m4Y above.






Beware that m4 may be dangerous for the health of compulsive programmers.



— The GNU m4 manual

Technorati Tags: essays, m4, m4hop, m4y, programming, space
@

Posted by Toby White | 0 comment(s)

April 21, 2008

http://feeds.feedburner.com/~r/Uszla/blog/~3/274963001/21

As I've mentioned before, all the entries in this blog are written
in asciidoc, which is very nice
for a lightweight markup language, particularly in terms of
embedding code fragments and having them marked up nicely.


Asciidoc uses
GNU Source-highlight as
its backend for generating pretty code fragments, which does a
reasonable job, and its author is very
responsive to feedback - he's fixed a couple of bugs in the Fortran
and XML modules for me.


However, I've been growing dissatisfied with its use, for two reasons.





  1. it has a very heavyweight dependency on boost, for its regex library.
    Compiling boost takes several hours, and this seems to me like massive overkill for a bit of code highlighting.





  2. It is purely regex-driven. Furthermore, all language front-ends are defined in terms of a mini-regex language. This means that its markup
    capabilities are fundamentally limited to a very simple regex subset.




In any case, it can't approach the expressiveness of Emacs font-lock
highlighting, which is what I'm used to.


So, I thought it ought to be possible to abuse one of several available emacs-lisp packages to do the job, and indeed it was. The script available here is a wrapper around a modified
version of htmlfontify, and works like so:





htmlfontify -mode $MODENAME $FILENAME

or if $FILENAME is -, it takes input on stdin. It will print out
a properly marked-up fragment of HTML on stdout, marked up according
to emacs, in $MODENAME-mode fontification.







Note

Importantly, it is entirely standalone, with no dependencies beyond Emacs 21 or better, which is installed everywhere these days.


This was easy to write an asciidoc filter for, so code in this blog will henceforth be marked up by emacs.


@

Posted by Toby White | 0 comment(s)

April 16, 2008

http://feeds.feedburner.com/~r/Uszla/blog/~3/271602055/16

As a follow-up to my last post on this, some good news
and some bad.


Good news: Apple Engineering got back rapidly, with a good understanding
of the authentication issue, and a good suggestion for how they might fix it. Of course
the fix won't emerge until at least 10.5.3.


Bad news: there is another bug lurking in Finder's webdav implementation
that I keep coming across. I haven't characterized it well enough to
report, but I'm noting it down here so Google has some record of it at
least.


The symptom is that after the state of the webdav server changes in
some way (Certainly not every time it changes; I think this occurs
when a directory that was previously readable
has become unreadable because permissions have changed) then when
you try and eject the mounted disk, Finder refuses with one of two
error messages.





  1. It complains that the disk is in use, even when it's not - and this
    can be confirmed by




    sh-3.2# lsof /Volumes/webdav_mount
    lsof: WARNING: can't stat() webdav file system /Volumes/webdav_mount
    Output information may be incomplete.
    assuming "dev=2d000009" from mount table

    The fix for this is a simple




    umount -f /Volumes/webdav_mount




  2. It gives the unhelpful message: "error code -8072"


    In this case, the fix is first to unmount the disk with umount as above, and then
    to restart Finder.







    Note

    Make sure to unmount the disk first!!! If you try and restart Finder (or logout, or
    reboot) without doing so, then the OS is liable to hang in an unretrieveable state,
    so that only pulling the power cable fixes it - which has happened to me more than
    once.




@

Posted by Toby White | 0 comment(s)

<< Back