使用渗透将POSTGIS表转换为.OSM [英] Using osmosis to convert POSTGIS Table to .OSM
本文介绍了使用渗透将POSTGIS表转换为.OSM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用渗透0.42和PostGIS 2.0.1,并且正在尝试将一些postGIS表导出到.OSM xml文件.
I am using osmosis 0.42 and PostGIS 2.0.1 and I'm trying to export some postGIS tables to .OSM xml files.
我正在使用--read-pgsql命令从postgis中读取(而不是--read-apidb,因为它在连接到DB时会引发错误)..
I am using the --read-pgsql command to read from postgis (instead of --read-apidb as it throws an error while connecting to the DB )..
不幸的是运行:
osmosis --read-pgsql host="x" database="x" user="x" password="x" --write-xml file="myfile.osm"
产生以下错误:
Task 2-write-xml does not support data provided by default pipe stored at level 1 in the default pipe stack
有什么想法吗?
非常感谢!
Feed
推荐答案
问题是--read-pgsql
生成了数据集,但是--write-xml
期望了实体流 .
The problem is that --read-pgsql
produces a dataset, but --write-xml
expects an entity stream.
在这两个步骤之间使用--dataset-dump
将数据集转换为实体流:
Use --dataset-dump
between these two steps to convert the dataset to an entity stream:
osmosis --read-pgsql host="x" database="x" user="x" password="x" --dataset-dump --write-xml file="myfile.osm"
这篇关于使用渗透将POSTGIS表转换为.OSM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文