[Talk-ee] Administrative division
Jaak Laineste
jaak at nutiteq.com
Tue Sep 8 06:10:06 BST 2009
I thought I had sent the scripts already :) The zip files are for
postgis-based queries for classification (Emilie described these also in
wiki, but here is more); I did these steps differently, using MapInfo. And I
did not do any overlapping analysis for existing forests, like they did I in
France.
> Anyway, one of the issues (even looking at them takes a while) in the
> area errors file seems to stem from incorrect node selection for
> merging
> -- I've got no clue how this can happen. Seems like a spike between two
> nodes close to each other. This might even be detectable in a script.
> For each way check the sequence of nodes. If node n is much closer to
> node n+2 than to node n+1, then delete node n+1 from the sequence.
>
> Okay ... as usual I gave it a try and hacked some proof of concept ...
> http://andre.grueneberg.de/osm/remove_spikes.pl ... at least it's
> removing 3543 "suspicious nodes" ...
> But maybe I'm totally off the track ...
It might help, but roughly half of the cases there was need to do 2 steps:
remove bad node, and then merge 2 nodes in different spot to put two areas
next to each other.
> BTW: I'm usually not using a fully fledged GIS ... I once tries QGIS
> and didn't feel to comfortable with it ... I'm just wondering when
> we're getting ESRI shape support in JOSM. :)
There are some opensourced java shapefile reader libraries, just a plugin
would be possible. We are reading shapefile for some commercial product. The
largest issue is that native indexfile for shapefiles is not documented, so
you should generate own one (like MapServer does) or generate one on the fly
during reading (probably qgis does this, but it takes time, as files tend to
be large).
There are also standalone tools like http://www.zonums.com/shp2gpx.html , I
have not tried it myself.
/jaak
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bulk_upload.py
URL: <http://lists.openstreetmap.org/pipermail/talk-ee/attachments/20090908/a0d45440/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Merge.java
Type: application/octet-stream
Size: 4903 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/talk-ee/attachments/20090908/a0d45440/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqlqueries.sql.zip
Type: application/octet-stream
Size: 8734 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/talk-ee/attachments/20090908/a0d45440/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: polyshp2osm.py
URL: <http://lists.openstreetmap.org/pipermail/talk-ee/attachments/20090908/a0d45440/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osmpy.zip
Type: application/octet-stream
Size: 9116 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/talk-ee/attachments/20090908/a0d45440/attachment-0002.obj>
More information about the Talk-ee
mailing list