[OSM-dev] Memory error while converting osm to gml
Matt Amos
zerebubuth at gmail.com
Thu Apr 2 22:13:27 BST 2009
2009/4/2 Stefan de Konink <stefan at konink.de>:
> Iván Sánchez Ortega wrote:
>> El Jueves, 2 de Abril de 2009, Will Nordin escribió:
>>> I am trying to convert the planet-090319.osm (approx 107GB) to gml. I've
>>> tried the Java and Python solutions, but both end up thorwing OutOfMemory
>>> exceptions.
>>
>> Man, it's one-frakking-hundred gigabytes, how would it *not* cause OOM
>> errors?!
>
> We call it memory mapping or a streaming operation :) Especially with
> sax like events perfectly doable :)
except that GML describes linestrings. so you'd need to either store
all the node locations in ram or some external indexed format... which
is exactly what osm2pgsql does :-)
i second frederik's recommendation - import into postgres using
osm2pgsql then export the GML from that. its a little convoluted, but
the toolchain is well tested.
cheers,
matt
More information about the dev
mailing list