Updated splitter (r87) - tile trimming

As a result of some suggestions from Steve, I've checked in some changes to the splitter (r87) that mean tiles are now trimmed of any extraneous empty space around their borders. Empty tiles are now thrown away completely. Also, no tiles extend past about +/-85 degrees latitude to prevent some erratic behaviour outside this range (so if you intend on heading to the north or south poles then this update is not for you!). Here's an example of the planet (date 090902) when split using the updated splitter: http://maps.google.co.uk/maps?q=http:%2F%2Fredyeti.net%2Fosm%2Fplanet-trim.k... As you can see the tiles are now quite a bit more compact, especially around densely mapped coastlines, and unmapped ocean areas are often not tiled at all. The only unusual thing I can see is tile 63240007 off the west coast of Mexico which contains just a single node. The node is part of this way: http://www.openstreetmap.org/browse/way/31775837 Looks like bad osm data that needs cleaning up/deleting? Chris

CM> As you can see the tiles are now quite a bit more compact, CM> especially around densely mapped coastlines, and unmapped ocean CM> areas are often not tiled at all. The only unusual thing I can see CM> is tile 63240007 off the west coast of Mexico which contains just a CM> single node. The node is part of this way: CM> CM> http://www.openstreetmap.org/browse/way/31775837 CM> CM> Looks like bad osm data that needs cleaning up/deleting? This way has now been deleted.

Is there any simple way to add some logic to make sure a tile doesn't span two continents (e.g. Brazil and Namibia, in the KML example you sent, or Nicaragua and the Antarctic)? I hope I'm not unique in wanting my tiles to be associated with geographical regions, at least vaguely! Charlie Chris Miller wrote:
CM> As you can see the tiles are now quite a bit more compact, CM> especially around densely mapped coastlines, and unmapped ocean CM> areas are often not tiled at all. The only unusual thing I can see CM> is tile 63240007 off the west coast of Mexico which contains just a CM> single node. The node is part of this way: CM> CM> http://www.openstreetmap.org/browse/way/31775837 CM> CM> Looks like bad osm data that needs cleaning up/deleting?
This way has now been deleted.

On Tue, Sep 15, 2009 at 07:15:04PM +0100, Charlie Ferrero wrote:
Is there any simple way to add some logic to make sure a tile doesn't span two continents (e.g. Brazil and Namibia, in the KML example you sent, or Nicaragua and the Antarctic)? I hope I'm not unique in wanting my tiles to be associated with geographical regions, at least vaguely!
And is there a way to extend that logic to take smaller seas in account? For example, it would not be practical to have southern Finland in the same tile with Sweden or Estonia, because there only are ferry or flight connections between the regions. (OK, you could drive as well, but it would be an impractically long trip.) Could this perhaps be achieved with some splitting constraints? For example, input a set of tiles from the user, and split them further as needed? Best regards, Marko

One thing that might work is if the trimming code I recently added was enhanced to look for 'large' gaps in the middle of a tile. If such a gap was found, it could split the tile in two and throw away the centre sea area. I'm not sure how well it would work in practice, the ferry routes you mention could be enough to prevent anything from being thrown away. MM> On Tue, Sep 15, 2009 at 07:15:04PM +0100, Charlie Ferrero wrote: MM>
Is there any simple way to add some logic to make sure a tile doesn't span two continents (e.g. Brazil and Namibia, in the KML example you sent, or Nicaragua and the Antarctic)? I hope I'm not unique in wanting my tiles to be associated with geographical regions, at least vaguely!
MM> And is there a way to extend that logic to take smaller seas in MM> account? MM> For example, it would not be practical to have southern Finland in MM> the MM> same tile with Sweden or Estonia, because there only are ferry or MM> flight connections between the regions. (OK, you could drive as MM> well, MM> but it would be an impractically long trip.) MM> Could this perhaps be achieved with some splitting constraints? For MM> example, input a set of tiles from the user, and split them further MM> as needed? MM> MM> Best regards, MM> MM> Marko MM>

It's quite a difficult problem to solve in general, though it is probably possible to 'cheat' by eg refusing to cross certain boundaries. Tackling this is something I'd like to get on to eventually but I don't have any specific plans on how best to deal with this just yet. There are still quite a few other things I want to implement/fix first, and some of those will probably make splitting by regions easier anyway (eg giving consideration to way and relation distributions rather than just node counts). Having said that, if someone can think of a workable solution for dealing with regions they're more than welcome to have a go at implementing it. Chris CF> Is there any simple way to add some logic to make sure a tile CF> doesn't span two continents (e.g. Brazil and Namibia, in the KML CF> example you sent, or Nicaragua and the Antarctic)? I hope I'm not CF> unique in wanting my tiles to be associated with geographical CF> regions, at least vaguely! CF> CF> Charlie CF> CF> Chris Miller wrote: CF>
CM> As you can see the tiles are now quite a bit more compact, CM> especially around densely mapped coastlines, and unmapped ocean CM> areas are often not tiled at all. The only unusual thing I can see CM> is tile 63240007 off the west coast of Mexico which contains just a CM> single node. The node is part of this way: CM> CM> http://www.openstreetmap.org/browse/way/31775837 CM> CM> Looks like bad osm data that needs cleaning up/deleting? This way has now been deleted.
participants (3)
-
Charlie Ferrero
-
Chris Miller
-
Marko Mäkelä