World
Wide
Lighthouse
Picture
Project
WWLPP home WWLPP home

content


WWLPP data file format

A WWLPP data file has a simple format. We'll make it up as we go along. Simplicity is the first objective.

My comments are in green.


basics

character set
The file consists of printable ascii and a line-separator (LS), so the file is a list of lines. Special charcters are denoted as they are in HTML. Each TAB character is replaced by a single SPACE character.

paragraphs
A line containing only white space (SPACE, TAB) is called a white line. A paragraph is a piece of the data file between white lines.
    this is
    paragraph

    this is
    another paragraph
A data file consists of paragraphs, separated by one or more white lines.

long lines
Long lines can be broken up in two ways.

  1. If a line starts with one or more SPACE characters, then the leading space is removed and it is glued to the previous line, adding one SPACE character.
        BLOB suppose this is a very
          long line
        BLIB and this is the next line
    is the same as
        BLOB suppose this is a very long line
        BLIB and this is the next line
  2. If a line starts with a + (plus) followed by one or more SPACE characters, then + and following SPACE characters are removed and the rest is glued to the previous line.
        BLOB suppose this is a very lo
        + ng line
        BLIB and this is the next line
    is the same as
        BLOB suppose this is a very long line
        BLIB and this is the next line
Spaces and plusses at the start of a paragraph are removed.

comment
Lines starting with # are comment, and thrown out (after glueing takes place).

keys and values

Lines in a paragraph (ignoring comment) consist of key/value pairs.
    FIRST  value of first key
    SECOND value of second key
    etc
keys
The first word in a line is the key. Uppercase or lowercase doesn't matter, keys are translated to uppercase.

values
The rest of the line is the value associated with key. The key and value are separated by one or more SPACE characters. The value is not changed in any way.

REGION and LHOUSE paragraphs

There are two kinds of paragraphs: REGION paragraphs and LHOUSE paragraphs.
REGION paragraphs
A REGION paragraphs contains the keyword REGION. It describes a region. For instance, a REGION paragraph describing southern California would contain
        REGION south.ca.us
	NAME   Southern California, USA
and a paragraph decribing Spain would contain
        REGION sp
	NAME   Spain
I propose to divide the world geographically, but there may be other ways to devide up interests:
        REGION historical.iron.in
	NAME   non-active, iron lighthouses in India

LHOUSE paragraphs
A LHOUSE paragraph contains the keyword LHOUSE. It describes a lighthouse in some region. For instance, a LHOUSE paragraph describing Brandaris, Terschelling in region The Netherlands could be:
        LHOUSE terschelling.nl
        PICSRC http://www.minvenw.nl/dgsm/torens/images/12.gif
        NAME   Brandaris
        PLACE  West-Terschelling, Terschelling
or, adding more information:
        LHOUSE terschelling.nl
        PICSRC http://www.minvenw.nl/dgsm/torens/images/12.gif
        NAME   Brandaris
        PLACE  West-Terschelling, Terschelling
        MAPURL http://free.lokatienet.nl/freemap.asp
        + ?action=pan&x2=143500&y2=597000&zoom=1&postcode=8881AM
        DESCR  yellow tower with radar
        COORD  53+21.7' N 5+12.9' E
        CHAR   Fl W 5s
        SPEC   fl 0.3
        LIGHT  3500,000 cd
        REACH  29 nm
        ELEV   55 meter
        HEIGHT 52.5 meter

REGION attributes

A REGION paragraph contains the keyword REGION. It describes a particular geographic region and may contain other attributes (key/value pairs).
REGION
is an hierachical name for the region. It looks (and works) like an Internet domain name.
exampleregion
REGIONthe world
REGION usUSA
REGION ca.usCalifornia, USA
REGION south.ca.ussouthern California, USA
REGION nlthe Netherlands
The REGION hierarchy need not follow the Internet domain system. However, the resulting division in smaller and smaller geographical regions should be helpful toward the end goal: for each smallest region there must be list of all lighthouses in that region.

Because this attribute is a simple, unique description of a region, it can be used as a tag for crossreferencing in HTML files.

<A HREF="regions/world/#nl">the Netherlands</A>

NAME
gives the real, geographic name of the region.
    NAME   The Netherlands

AUTHOR (optional, multiple)
the person(s) who collect the information for the region.

If the first part of the key is an url, the rest should be used as the 'clickable' text.

    AUTHOR  Joe Average
    AUTHOR  mailto:keeper@some.do.main Charles Ives
    AUTHOR  http://people.cs.uu.nl/henkp Henk Penning

TEXT (optional)
Additional information (in html) regarding the region.

LHOUSE attributes

A LHOUSE paragraph contains the keyword LHOUSE. It describes a particular lighthouse and may contain other attributes (key/value pairs).

To decide what is and what is not a lighthouse, please refer to the projects definition.

LHOUSE
is an hierachical name for the lighthouse. It looks like 'lighthouse.region'.
example lighthouse
LHOUSE terschelling.nl Brandaris, Terschelling
LHOUSE foo.south.ca.us Foo lighthouse in southern California

Because this attribute is a simple, unique description of a lighthouse, it can be used as a tag for crossreferencing HTML files.

<A HREF="regions/nl/#terschelling.nl">
Brandaris, Terschelling</A>

PICSRC
Url to a picture of the lighthouse, optionally followed by another url. The first url should point to a (smallish, thumbnail) picture. The optional, second url should be used to make the picture clickable.
    PICSRC
      http://www.minvenw.nl/dgsm/torens/thumbs/14.gif
      http://www.minvenw.nl/dgsm/torens/images/14.gif
    

NAME (optional)
The name of the lighthouse.

PLACE (optional)
The geographic name of the place where the lighthouse is locatated, for instance the name of the municipality.

MAPURL (optional)
The url of a picture showing the location of the lighthouse.

DESCR (optional)
A description of the lighthouse (eq yellow brick tower on a cliff).

COORD (optional)
The coordinates of the location of the lighthouse, given in degrees plus minutes north, south, east and west.
    COORD  53+21.7' N 5+12.9' E
There are many other coordinate systems. Others could prove more usable later on.

CHAR (optional)
The standard (international) description of the light character.
    CHAR   Fl W 5s
    CHAR   Fl(2) W 10s
    CHAR   Iso W 4s
  1. It would be nice to have a graphical represention of the character; maybe a (animated) gif. Take a look at Fyrkaraktärer by Tobias Holgers of the Swedish Lighthouse Society.
  2. I am looking for an online document with a description of this standard.

SPEC (optional)
Any additional information on the character of the light.
    SPEC   fl 0.3

LIGHT (optional)
Strength of the light in candela, or any other unit.
    LIGHT  3500,000 cd

REACH (optional)
Reach of the light in nautical miles.
    REACH  29 nm

ELEV (optional)
Height of the light; above Mean Sea Level (MSL, average local sea level, as used in local depth charts); in any unit. Dutch middenstandsvlak.
    ELEV   53 meter

HEIGHT (optional)
Height of the structure.
    HEIGHT 52.5 meter

TEXT (optional)
Additional information (in html) regarding the lighthouse.

Henk Penning, Tue Sep 14 00:49:28 MET DST 1999