[OSM-dev] Suggestion about design of OSM data structure
Shaun McDonald
shaunmcdonald131 at gmail.com
Thu Jul 26 15:35:55 BST 2007
On 26 Jul 2007, at 09:57, Steve Coast wrote:
>> [...]
>> My program need to do the following tasks:
>>
>> 1. Open and read planet.osm xml file
>> 2. Trim all the nodes that are outside London's bounds -->
>> write result to file
>> 3. Trim all segments that are outside London's bounds -->
>> write result to file
>> 4. Trim all ways that are outside London's bounds --> write
>> result to file
>>
>>
>> Task 2 is very simple, just check the node's lat and lon within
>> the bounds --> after task 2 finish we have a set of nodes within
>> bounds
>> Task 3 is a little bit complicated, we need to check segment's
>> fromnodeid and tonodeid against the set of nodes within bounds --
>> > after task 3 finish we have a set of segments within bounds
>> Task 4 is extremely complicated, we need to check way's segment
>> against the set of segments within bounds.
You should swap the order of 3 and 4 as you could end up with
incomplete ways.
I could be wrong that this causes problems.
Shaun
>> [..]
More information about the dev
mailing list