[OSM-dev] order of segment list in ways significant?
Michael Strecke
MStrecke at gmx.de
Fri Aug 11 10:04:31 BST 2006
After reading various documents, how-tos, and comments I'm still
wondering if the order in which the segment IDs appear in a way is
significant or not.
For a programmer this point is important for all operations which add
segments to a way (e.g. split segment, extend way with segments). Do I
simply add the ID to the list, or do I have to guess where I have to
insert it into the list.
Before you say yes, keep in mind:
- that E- and Y-shaped ways exist, in which case no "natural" order
scheme exists.
- that the "oneway" attribute is assigned to segments (and is not
dependent on the order of the way segment list).
On the other hand, the SQL definition of the OSM database (from SVN)
suggests some kind of order:
--
-- Table structure for table `way_segments`
--
DROP TABLE IF EXISTS `way_segments`;
CREATE TABLE `way_segments` (
`id` bigint(64) NOT NULL default '0',
`segment_id` int(11) default NULL,
`version` bigint(20) NOT NULL default '0',
`sequence_id` bigint(11) NOT NULL auto_increment,
PRIMARY KEY (`id`,`version`,`sequence_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Any insights?
More information about the dev
mailing list