2016-04-28 67 views
0

我想轉換一個OSM文件,它需要開發私有數據格式.map使用osmosismapforge-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

也許由於其負的id? – scai

+0

不,我曾經測試過積極的ID,沒有任何改變。 –

+0

滲透不具有'--mapfile-writing'選項,因此您必須在談論某個其他程序或其他選項。 – scai

回答

0

根據https://groups.google.com/forum/#!topic/mapsforge-dev/TGAMrGjCZuk中越來越多的討論,在試圖在mapforge-map-writer.jar考慮OpenStreetMaps標記的情況下嘗試查看解決方案之後。

基於該信息將所述標籤<標籤K =「建設」 V時=「是」在它被生成.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>