[Imports] [Talk-ca] Shp2OSM : various questions

Emilie Laffray emilie.laffray at gmail.com
Tue Nov 17 20:37:46 GMT 2009


Sam Vekemans wrote:
>
>
> On Tue, Nov 17, 2009 at 12:10 PM, Ian Dees <ian.dees at gmail.com
> <mailto:ian.dees at gmail.com>> wrote:
>
>     On Tue, Nov 17, 2009 at 2:02 PM, Pieren <pieren3 at gmail.com
>     <mailto:pieren3 at gmail.com>> wrote:
>
>         On Tue, Nov 17, 2009 at 8:20 PM, Emilie Laffray
>         <emilie.laffray at gmail.com <mailto:emilie.laffray at gmail.com>>
>         wrote:
>         > Ian Dees wrote:
>         >> Who wrote the Java program? I'd love to integrate that in
>         to shp-to-osm.
>         > Pieren did.
>         >
>
>         I'm sure it can be coded in a better way, especially with a
>         real xml
>         parsing but it's fast and worked well:
>         http://wiki.openstreetmap.org/wiki/WikiProject_Corine_Land_Cover/Corine_Data_Import#Removing_duplicate_nodes
>
>     Ah, so this is only removing duplicate nodes and not creating
>     boundary relations out of exactly-overlapping ways.
>
>
> I think thats 3 separate bugs.  Where this this one handles nodes of a
> way.  and the next challenge is to handle polygons.  and the next,
> multi-polygon.
>
> It sound like thats the solution which would solve the
> 'railways/rivers/powerlines/roads' map features of canvec.   Sweet!
>
> It appears that scripts are around for each of them, it would be wild
> if the script could 'detect; in the shp file as to if it's a polygon
> or a multi-polygon.
>
> ... tipping beyond my comprehension, but its wild to see it all fall
> together. :)
>
> and on another (similar note)
>
> Cool, so to answer my own question.  Yes, it can be included as part
> of the python script routeen, as another step, making a new .osm file.
>   :)
>
> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/imports/attachments/20091117/5a1eacd7/attachment.pgp>


More information about the Imports mailing list