[OSM-dev] Import error using osm2pgsql in slim mode
Brett Henderson
brett at bretth.com
Thu Jan 21 23:45:01 GMT 2010
On Fri, Jan 22, 2010 at 8:54 AM, Frederik Ramm <frederik at remote.org> wrote:
> Hi,
>
>
> Brett Henderson wrote:
>
>> If you use the latest SVN version it will detect if multiple versions of
>> an entity exist and throw an error in the --apply-change task. I'll try to
>> do another official release of Osmosis over the next day or two with this
>> change included.
>>
>
> Just for laughs - and wonder if you can come up with something better? -
> this is what I did to remove the duplicate objects from an existing OSM file
> named "faulty.osm":
>
> echo "<osm></osm>" > empty.osm
>
> osmosis --rx faulty.osm --rx empty.osm --dc --sort-change-0.6 --simc --wxc
> good.osc
>
> osmosis --rxc good.osc --rx empty.osm --ac --wx good.osm
>
> (The two osmosis steps could be written as one but that would probably make
> it more confusing.)
I was wondering how you fixed it. That's neat. Do you need the
--sort-change-0.6? You probably do, but I don't know what order you end up
with using --apply-change with full history diffs.
Perhaps I should create a --read-zero task. An empty osm file is often
handy. It would avoid having to create empty.osm files like that.
Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100122/9d0f4031/attachment.html>
More information about the dev
mailing list