[Talk-ca] [Imports] Shp2OSM : various questions
Sam Vekemans
acrosscanadatrails at gmail.com
Tue Nov 17 20:53:21 GMT 2009
On Tue, Nov 17, 2009 at 12:37 PM, Emilie Laffray
<emilie.laffray at gmail.com>wrote:
> Sam Vekemans wrote:
>
>
> >
> > Has anyone figured out how to slice that .osm file into a grid? So
> > that each grid piece can be made available (for people to manually
> > copy in what they like) (so that full.osm file is ALSO available)
> >
> > The only way that i know of is gpsbabel (might be able todo that). So
> > i think it would be a matter of having a script measure the size of
> > the area, and find the mid-point, and draw a line through the area.
> > (just like how in JOSM you can copy the top half and make a new layer
> > and past it, then delete) (in other words 'cut' and 'paste') but
> > doing this as part of a script instead of this manual way.
> If you are interested in a grid, I can whip up a quick SQL script within
> Postgres. It is very simple. I suspect I could do the same in C++ with
> more time with libgeos (which is powering Postgis). Since Ian is working
> in Java, I would suggest that he has a look at JTS in order to perform
> gis functions. He may be already doing it ( I haven't looked at the code
> of shp-to-osm in a long time now).
>
> Emilie Laffray
>
>
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. :-)
... 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.
Cheers,
Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-ca/attachments/20091117/4b0dfb2b/attachment.html>
More information about the Talk-ca
mailing list