<br><br><div class="gmail_quote">On Tue, Nov 17, 2009 at 12:37 PM, Emilie Laffray <span dir="ltr"><<a href="mailto:emilie.laffray@gmail.com">emilie.laffray@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Sam Vekemans wrote:<br><br>
</div><div><div class="h5"><br>
><br>
> Has anyone figured out how to slice that .osm file into a grid? So<br>
> that each grid piece can be made available (for people to manually<br>
> copy in what they like) (so that full.osm file is ALSO available)<br>
><br>
> The only way that i know of is gpsbabel (might be able todo that). So<br>
> i think it would be a matter of having a script measure the size of<br>
> the area, and find the mid-point, and draw a line through the area.<br>
> (just like how in JOSM you can copy the top half and make a new layer<br>
> and past it, then delete) (in other words 'cut' and 'paste') but<br>
> doing this as part of a script instead of this manual way.<br>
</div></div>If you are interested in a grid, I can whip up a quick SQL script within<br>
Postgres. It is very simple. I suspect I could do the same in C++ with<br>
more time with libgeos (which is powering Postgis). Since Ian is working<br>
in Java, I would suggest that he has a look at JTS in order to perform<br>
gis functions. He may be already doing it ( I haven't looked at the code<br>
of shp-to-osm in a long time now).<br>
<font color="#888888"><br>
Emilie Laffray<br>
<br>
</font></blockquote></div><br>If your interested in making it more difficult, we calculated that a 5x5 grid would be most ideal to handle the tile size were working with. :-)<br><br>... then the next part of the script is to calculate the density of the features in the tile i would guess (if it's of low density, less than 10% overall coverage).. guessing (less than 20? 'things') then there is no need to divide the grid. (what i found is that a grid which is 1/25th of the standard NTS tile) then the average OSM mapper would be able to handle all the features in that area. That grid could be divided into 2, 4, 16. But 25 works out to exactly .1 degree (if i remember right.<br>
<br>Cheers,<br>Sam<br><input id="gwProxy" type="hidden"><input onclick="jsCall();" id="jsProxy" type="hidden"><div id="refHTML"></div>