我尝试将需要使用私有数据开发的OSM文件转换为使用osmosis
mapforge-map-writer
的格式.map,但调查点的数据正在.map
代完全忽略了。我已经调查了代码,但我无法理解正在发生的事情。
我使用了以下命令:
./osmosis --rx file = lotes.osm --mapfile-writing file = lotes.map
我设置了边界条目,但生成的.map中没有放置任何内容。
下面是构建边界参考的地图:
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' upload='true' generator='JOSM'>
<bounds minlat="-8.156" minlon="-35.008" maxlat="-7.931" maxlon="-33.865"/>
<node id='-32' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06393367554' lon='-34.88970060001' />
<node id='-33' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06083075789' lon='-34.88378983943' />
<node id='-35' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06409078466' lon='-34.87984272078' />
<node id='-37' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06758644682' lon='-34.88739976703' />
<node id='-41' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06793993906' lon='-34.88718158459' />
<node id='-42' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06432644823' lon='-34.87960470357' />
<node id='-44' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06778283143' lon='-34.87599477597' />
<node id='-46' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.07208363064' lon='-34.88442455197' />
<node id='-50' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06411042329' lon='-34.88999812152' />
<node id='-51' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06774355452' lon='-34.88777662761' />
<node id='-53' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.07035546112' lon='-34.89225928496' />
<node id='-55' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06629030595' lon='-34.89446094411' />
<node id='-59' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06045762062' lon='-34.88329397025' />
<node id='-60' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06405150738' lon='-34.87920800823' />
<node id='-62' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.06204836132' lon='-34.8744674989' />
<node id='-64' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20" lat='-8.05876867919' lon='-34.87968404264' />
<way id='-34' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20">
<nd ref='-32' />
<nd ref='-33' />
<nd ref='-35' />
<nd ref='-37' />
<nd ref='-32' />
<tag k='DSQFL' v='154' />
</way>
<way id='-43' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20">
<nd ref='-41' />
<nd ref='-42' />
<nd ref='-44' />
<nd ref='-46' />
<nd ref='-41' />
<tag k='DSQFL' v='160' />
</way>
<way id='-52' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20">
<nd ref='-50' />
<nd ref='-51' />
<nd ref='-53' />
<nd ref='-55' />
<nd ref='-50' />
<tag k='DSQFL' v='153' />
</way>
<way id='-61' action='modify' visible='true' version="11" timestamp="2008-01-02T03:04:05Z" uid="20" user="user20">
<nd ref='-59' />
<nd ref='-60' />
<nd ref='-62' />
<nd ref='-64' />
<nd ref='-59' />
<tag k='DSQFL' v='155' />
</way>
</osm>
但是当我看到生成的二进制文件时,通过十六进制编辑器打开,我看不到放置的标签。
直接在 OpenStreetMaps 网站下载的其他文件可以毫无问题地进行转换。
osmosis
忽略这些多边形有什么问题?
答案 0 :(得分:0)
根据https://groups.google.com/forum/#!topic/mapsforge-dev/TGAMrGjCZuk中越来越多的讨论,在尝试查看解决方案以防mapforge -map-writer.jar考虑OpenStreetMaps标记之后。
根据此信息添加标签&lt;标记k ='building'v ='yes'/&gt; 在生成 .map 后显示的其中一个多边形中。
下面应该是OSM文件,以便它可以用.map格式生成:
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' upload='true' generator='JOSM'>
<bounds minlat='-8.155149' minlon='-35.01865' maxlat='-7.926358' maxlon='-34.851208' origin='Osmosis 0.35' />
<node id='-8' action='modify' visible='true' lat='-8.32238189013' lon='-35.05999269907' />
<node id='-10' action='modify' visible='true' lat='-8.3428522453' lon='-35.00838893999' />
<node id='-12' action='modify' visible='true' lat='-8.37122527763' lon='-35.00283519056' />
<node id='-14' action='modify' visible='true' lat='-8.40577539618' lon='-35.06303932724' />
<node id='-16' action='modify' visible='true' lat='-8.33679523492' lon='-35.00150986399' />
<node id='-18' action='modify' visible='true' lat='-8.37376026759' lon='-34.99464341014' />
<node id='-20' action='modify' visible='true' lat='-8.3757582776' lon='-34.94819386942' />
<node id='-22' action='modify' visible='true' lat='-8.33639559383' lon='-34.95950332282' />
<node id='-24' action='modify' visible='true' lat='-8.37435662533' lon='-34.98077936883' />
<node id='-26' action='modify' visible='true' lat='-8.41432500277' lon='-35.06264910335' />
<node id='-28' action='modify' visible='true' lat='-8.37749469974' lon='-35.00250946639' />
<node id='-30' action='modify' visible='true' lat='-8.38174452833' lon='-34.94630754375' />
<node id='-32' action='modify' visible='true' lat='-8.42317791951' lon='-34.97100775179' />
<node id='-34' action='modify' visible='true' lat='-8.33641063351' lon='-34.95382499837' />
<node id='-36' action='modify' visible='true' lat='-8.37891131443' lon='-34.93986401122' />
<node id='-38' action='modify' visible='true' lat='-8.4245943674' lon='-34.96599611538' />
<node id='-40' action='modify' visible='true' lat='-8.42778135618' lon='-34.90585647842' />
<node id='-42' action='modify' visible='true' lat='-8.33216031093' lon='-34.8983390238' />
<node id='-44' action='modify' visible='true' lat='-8.31267907528' lon='-35.05548962276' />
<node id='-46' action='modify' visible='true' lat='-8.32790994217' lon='-35.00716312877' />
<node id='-48' action='modify' visible='true' lat='-8.28788337586' lon='-35.01253273921' />
<node id='-50' action='modify' visible='true' lat='-8.2861121946' lon='-35.05692151887' />
<node id='-52' action='modify' visible='true' lat='-8.28930031512' lon='-35.00716312877' />
<node id='-54' action='modify' visible='true' lat='-8.32861834017' lon='-35.00179351833' />
<node id='-56' action='modify' visible='true' lat='-8.32897253869' lon='-34.95847866076' />
<node id='-58' action='modify' visible='true' lat='-8.32507633736' lon='-34.89941294589' />
<node id='-60' action='modify' visible='true' lat='-8.29036301622' lon='-34.90335066021' />
<way id='-62' action='modify' visible='true'>
<nd ref='-8' />
<nd ref='-10' />
<nd ref='-12' />
<nd ref='-14' />
<nd ref='-8' />
<tag k='DSQFL' v='154' />
<tag k='building' v='yes' />
</way>
<way id='-64' action='modify' visible='true'>
<nd ref='-16' />
<nd ref='-18' />
<nd ref='-24' />
<nd ref='-20' />
<nd ref='-22' />
<nd ref='-16' />
<tag k='DSQFL' v='153' />
<tag k='building' v='yes' />
</way>
<way id='-66' action='modify' visible='true'>
<nd ref='-26' />
<nd ref='-28' />
<nd ref='-30' />
<nd ref='-32' />
<nd ref='-26' />
<tag k='building' v='yes' />
</way>
<way id='-68' action='modify' visible='true'>
<nd ref='-34' />
<nd ref='-36' />
<nd ref='-38' />
<nd ref='-40' />
<nd ref='-42' />
<nd ref='-34' />
<tag k='building' v='yes' />
</way>
<way id='-70' action='modify' visible='true'>
<nd ref='-44' />
<nd ref='-46' />
<nd ref='-48' />
<nd ref='-50' />
<nd ref='-44' />
<tag k='building' v='yes' />
</way>
<way id='-72' action='modify' visible='true'>
<nd ref='-52' />
<nd ref='-54' />
<nd ref='-56' />
<nd ref='-58' />
<nd ref='-60' />
<nd ref='-52' />
<tag k='building' v='yes' />
</way>
<relation id='-74' action='modify' visible='true'>
<member type='way' ref='-68' role='outer' />
<member type='way' ref='-62' role='outer' />
<member type='way' ref='-64' role='outer' />
<member type='way' ref='-72' role='outer' />
<member type='way' ref='-66' role='outer' />
<member type='way' ref='-70' role='outer' />
<tag k='type' v='multipolygon' />
</relation>
</osm>