[OSM-newbies] Definition of ways, dupes, etc.

Sascha Silbe sascha-ml-gis-osm-newbies at silbe.org
Fri Aug 10 18:35:01 BST 2007


On Fri, Aug 10, 2007 at 02:22:28PM +0100, Andy Allan wrote:

[Dupes]
> Generally those are unintended.
OK. Are there plans to eliminate them? My converter spends quite a large 
amount of time removing those dupes (cannot be done in memory for recent 
dumps because they're too large).

[negative IDs]
> They are for objects in editors that haven't been uploaded yet, and
> hence don't have a global reference. I'm not sure if you mean there
> are negative IDs in the main database?
The latter one. Take way #2132496 from planet.osm.20060703.bz2 (I'm 
taking that for testing purposes since it's rather small) for an 
example:

<way id='2132496'>
<tag k='created_by' v='JOSM' />
<seg id='-10146' />
<seg id='-10146' />
<seg id='-14768' />
<seg id='-7600' />
<seg id='-7600' />
<seg id='7062584' />
<seg id='-230' />
<seg id='-230' />
</way>

>> 3. How are tags set that apply to the full way (e.g. 
>> highway=motorway)?
> They are assigned to the way - I think you need to look at either the
> API or the source of a planet file.
That's exactly what I'm looking at (apart from the Wiki pages). :)

>> 5. How is an area (e.g. a park) represented in OSM?
> Same as a circular way. It is up to the processor to work out which is
> supposed to be an area and what is a linear way with start=end.
OK, that probably answers question #2: Circular ways have a last segment 
that joins last and first node?

>> 6. How do I determine all the segments (and only those) of a given
>> motorway?
> You need to first work out all the ways belonging to a motorway, since
> there would be many and they aren't referenced together. You need to
> interpret the data to work out which ways reference a complete
> motorway. This is non-trivial.
In short: There (currently) is no way (no pun intended) to do it?

>> 8. When rendering, how do I determine if a way represents a "real" 
>> way
>> (see circular way example above) or an area?
> Usually by examining tags. Circular ways that have e.g. landuse tags
> are areas, linear ways that are e.g motorways are not.
So there is no (simple) algorithm to decide whether it's a polygon or an 
area? Unless I know exactly what the data represents (e.g. known 
highway=xy tag), I cannot decide how to display it?

CU Sascha

-- 
http://sascha.silbe.org/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.openstreetmap.org/pipermail/newbies/attachments/20070810/863907f6/attachment.pgp>


More information about the newbies mailing list