[Openstreetmap] openstreetmap.org updates, ontology stuff
Nick Whitelegg
nick at hogweed.org
Sat Mar 19 10:18:25 GMT 2005
On Saturday 19 Mar 2005 00:34, Matt Amos wrote:
> On Friday 18 March 2005 15:48, SteveC wrote:
> > So I'm implementing an open classification scheme where you can add
> > properties of roads (cycle path, road type, 2 lane...) and types of
> > Point of Interest (burger king, tube station...) as you like.
>
> by "road" i assume you mean "line segment", so that we use the same
> types for roads, train tracks, waterways, footpaths, coastlines,
> region/park/field boundaries, etc...
That's what I do with my Freemap data ATM and I think it's what Steve is
intending to do.
What I had in mind was a bitwise scheme something like this, to easily
generate maps from the data by bitwise operations:
Bit 1 Accessible to foot?
Bit 2 Accessible to bikes?
Bit 3 Accessible to horses?
This would allow bitwise operations to easily generate a map appropriate for
particular users.
e.g. a public footpath = 00000001 = 1
A cycle path with official pedestrian rights = 00000011 = 3
Bits 4 to 6 could then be used for different types of road:
000 = no vehicular access (e.g. footpath)
001 = "byway" (countryside track open to off-road vehicles)
010 = residential road
011 = minor road used by through traffic (e.g. country lane)
100 = B road
101 = A road
110 = spare
111 = motorway
e.g A road would be 00 101 111 (as A roads are accessible to pedestrians,
bikes, horses)
but motorway would be 00 111 000 (as they are not)
I have some ideas for higher bits too, mostly to do with the "officialness" of
certain rights of way, plus railways, rivers etc, but that will do to start.
> > Of course all this is wiki'd so if someone deletes the key '13
> > means motorway' then you can undo it.
>
> why have numeric id's at all?
Numeric IDs would be the most efficient way (I'd have thought) to keep each
individual segment unique.
> why not just have arbitrary free-text UTF-8 strings for (key, value)
> pairs? so instead of a table of numeric ID's we just have a table of
> "int id, string key, string value". for example, where line segment
> 12345 is part of oxford street:
>
> ID key value
> 12345 name Oxford Street
> 12345 type main road
> 12345 one-way false
> 12346 name Tottenham Court Road
> 12346 pc_hardware_prices very high
The way I do it in my existing Freemap database is to have a number of tables:
"routes" to store information about each path/road and its type, containing
two fields: route ID and numeric route type;
"routetypes" containing two fields: numeric route type and route type
description e.g.
1 footpath
3 cycle path
"fullroutes" to describe complete tracks, containing fields for route ID,
point ID and coordinates;
"namedroutes" containing information about a named road and which segments it
follows, i.e.
1 45 3 7
1 46 1 5
1 47 7 11
This would mean that "named route" 1 would follow track 45 from points 3 to 7,
track 46 from points 1 to 5, track 47 from point 7 to 11.
then in the table "namedroutedetails":
1 Paulsborough Lane
would indicate that named route 1 has the name Paulsborough Lane.
Anyway, hope this wasn't too long but it's my thoughts.
Nick
More information about the talk
mailing list