[HOT] Status of Somalia roads import
schuyler at nocat.net
Sun Aug 21 10:12:39 BST 2011
Oh and another thing.
1.5) RUN V.GENERALIZE BEFORE RUNNING V.CLEAN. Because JOSM needs too much RAM to simplify that many objects, and the aforementioned v.out.ogr bug will make you weep otherwise. Actually PostGIS's awkwardly named st_simplifypreservetopology() does apparently work in a pinch. Is 1m a good simplification threshold for this use case?
On Aug 21, 2011, at 2:07 AM, Schuyler Erle wrote:
> TL;DR: I spent too much time today trying to make the MapMappers road data clean enough to import into OSM and I haven't succeeded yet. I am afraid that I am running out of time to spend on this project. #osm rules.
> I spent about 12 hours on this today. No luck yet, although I did learn an awful lot about cleaning up geometries so that JOSM won't complain about them.
> 1) You can fix the topology of a shapefile by importing it into GRASS and using v.clean. Unfortunately, there is a stupid bug in GRASS and v.out.ogr takes way way longer than it should.
> 2) You can de-dupe overlapping ways in PostGIS with variations on "select distinct geometry_field from roads" and then adding back the attributes later. You lose some data this way, but if you had overlapping roads in your source data to begin with... Who cares. Also, this doesn't seem to handle geometries that are reversed.
> 3) It's actually really tricky to identify line segments that are the same but reversed. I wound up hacking ogr2osm.py to detect and throw away the subsequent instances. There are probably better ways to do this.
> 4) I still don't have a good solution for this "double roads" problem:
> Basically, the MadMappers roads data, on closer inspection, are a *bunch* of different road layers smooshed together into a single file. Someone has to sit down and figure out which values of the "layer" attribute actually mean anything. I'm wiped out and running out of available time to work on this -- if anyone else here has the time and energy to take over, let me know offlist; I'll be up in six hours or so. Otherwise I'll do the best I can to get it done when free time permits.
> I will say this though: The denizens of the #osm IRC channel are awesome. Thank you to everyone on IRC who helped out with advice or code today.
> HOT mailing list
> HOT at openstreetmap.org
More information about the HOT