Some time ago, vdepizzol got hold of a AutoCAD .dwg file with PD data of high quality for the entire municipo/city of Vitória, the state capital of Espírito Santo state of Brazil and asked me for help. None of us have access to CAD software, and we where a little stuck.
After pondering on this for too long time I got the idea to contact h4ck3rm1k3, who didn't have access to AutoCAD either, but via his contact net managed to convert it to .dxf, and from there passed it through a program he is making, managed to convert the poligons of the CAD files into poligons on an OSM-xml file. The output archive was HUGE, bzip compressed to 27MB, so uncompressed is probably around 2-300MB, chunked it up into 3 smaller chunks, and I dived in to start working with it.
After drawing close to all the roads in the first chunk, I got stuck, the next chunks didn't load in JOSM, so I opened the xml files in Xcode, and started to clear out the errors. At the same time I asked vdepizzol for assistance in rechunking the larger file. I would like to have it in uncompressed osm-xml chunks of less than 5MB each (yeah, will be a hell of a lot of files), so that I can load areas around where I am working to get a flawless background image to trace upon.
I figured out that making automated import scripts of this would be difficult as the data shows poligons of what is outside the roads. (A future house import from this data should be easy, but the roads are tough).
Anyway, when the roads are in the database we need to do an on the ground verification of the data, to find out what is accessable by cars, what is to be defined as footways and cycleways, any oneways, access restrictions, etc. I think we should be able to import the street names from the data.
Discussion
Kommentar frå h4ck3rm1k3, 7 januar 2010 kl. 17:29
I have made a splitter routine for you to split up the huge osm file into chunks
The splitter is here :
http://github.com/h4ck3rm1k3/TwoNickels/blob/master/split.pl
you can change the constant 1000000 to something else.
Also you can increase the memory of java
-Xms400m -Xmx1800m for mimimum 400 and max 1800 mb.
Here are the chunks :
http://bitbucket.org/h4ck3rm1k3/openstreetmap-data-brasil/src/b285f6f88846/
code
Kommentar frå h4ck3rm1k3, 7 januar 2010 kl. 20:44
One more thing,
you should check out the layer attribute that I added. You can see if the name of the layer is asphalt or somthing. Also one more thing to do is replace the U+1234 names in the text. I did not do that, but you can do that with a simple search and replace in the osm files.
We can extend the program and make it better; it was just a quick hack for you over new years.
mike
Kommentar frå Skippern, 7 januar 2010 kl. 21:48
I saw the layer information, I think I can make a script to do a building import, and some other features, but the roads I need to separate into a sort of data-layer and trace by hand in JOSM, working on various solutions. Did you see my mail regarding the split.pl?
Kommentar frå h4ck3rm1k3, 8 januar 2010 kl. 09:33
I have created a new version of the split that emits only one layer
from the ways at a time. It stored the nodes and emits them just before the way.
this produces much smaller files and you can
tweak the constants(not parameters)
my $chunksize=100;
my $searchkey="VIA_PAV_ASFALTO";
that means, the asfalt layer will be chucked into 100 polygon files.
http://github.com/h4ck3rm1k3/TwoNickels/commit/f27405ee63a0d87ae12dc402307f3588ac52a217