[OSM-dev] Contest for the best UI: Howto enter ways in the applet?

Lars Aronsson lars at aronsson.se
Fri Feb 24 20:20:00 GMT 2006


Andy Robinson wrote:

> Creating a Way: This is where I run into problems. I'm not even 
> sure why we need to be focusing on being able to link up a 
> number of line segments into a single way at this point in time. 
> Obviously it helps for naming but surely if we name one segment 
> (or a few if we like) then a client can collect those names, do 
> a merge (user input if required) and then name the collection as 
> one and return same to the server. Do we need this functionality 
> now. Is it a priority. I'm not so sure.

This is more than a change in the applet: it would be a 
fundamental change in the database schema.  I don't know if that 
time has come, but it will come sooner or later.  In December 
2005, Kendall Sears told us to "move to a true GIS schema", either 
the GIS capabilities in MySQL or switching to PostGIS,
http://lists.openstreetmap.org/pipermail/talk/2005-December/001836.html

I haven't studied these tools, but as far as I understand, the 
conventional GIS wisdom is to use a three level data model:

 1. nodes with a latitude and longitude
 2. lines made up of a sequence of connected nodes
 3. polygons made up of a sequence of lines

Today OSM has a two level data model that doesn't support polygons 
(3) and our lines (2) can only be single line segments made up of 
two nodes.  Today we can have attributes only for line segments, 
not for longer runs or chains of segments.

The lines can be roads, rivers, coast lines, outlines of forests, 
or administrative borders.  Country A can be a polygon surrounded 
by border lines L1, L2, L3 and country B can be a polygon 
surrounded by lines L4, L5, and L2.  Thus L2 is the border line 
between countries A and B.  Storing the line L2 once, and being 
able to reuse it for polygons A and B is a major argument for this 
data model.

A line in this model would only be the part of a street between 
two street corners.  The full street (Main Street) would still 
consist of many lines (one per city block).

Instead of today's (svn/sql/mysql-schema.sql)

  create table segments (
    id integer primary key,
    node_a integer references nodes(id),
    node_b integer references nodes(id));

we would have

  create table lines (
    id integer,
    seqno integer,
    node integer references nodes(id),
    primary key(id, seqno) );

Designing a good editor user interface for this data model is a 
challenge.  Can you cut away a line segment in the middle of a 
line?  Does that cut the line in two?  Or should you only be able 
to insert/delete knees in the middle of a line?  Would insertion 
of a knee in the middle require a renumbering of the seqno?  
Should nodes at the end of a line be marked different from nodes 
that are knees in the middle of a line?  Or should the 
line/segment differentiation be made silently without changing the 
current user interface?

I have no prior GIS experience, so I don't know how traditional 
mapping user interfaces are designed.


-- 
  Lars Aronsson (lars at aronsson.se)
  Aronsson Datateknik - http://aronsson.se




More information about the dev mailing list