Opened 9 years ago
Last modified 6 years ago
#14974 closed defect
GeoJSON export: some ways gets exported as polygons — at Initial Version
| Reported by: | TobWen | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | 17.06 |
| Component: | Core geojson | Version: | latest |
| Keywords: | GeoJSON, polygon | Cc: |
Description
Ways with some tags get exported as polygons when exporting to GeoJSON.
Try this fake way:
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
<node id='-76119' lat='51.5099031' lon='6.8806761'>
<tag k='highway' v='footway' />
</node>
<node id='-76121' lat='51.5097885' lon='6.9040016'>
<tag k='highway' v='footway' />
</node>
<way id='-76135' action='modify'>
<nd ref='-76119' />
<nd ref='-76121' />
<tag k='highway' v='footway' />
<tag k='man_made' v='surveillance' />
</way>
</osm>
When exporting it to GeoJSON, it gets:
{
"type":"Feature",
"properties":{
"highway":"footway",
"man_made":"surveillance"
},
"geometry":{
"type":"Polygon",
"coordinates":[
[
[
6.88067610000,
51.50990310000
],
[
6.90400160000,
51.50978850000
]
]
]
}
}
Changing a non-closed ways into an area produces lots of trouble of course.
Furthermore, according to the wiki, man_made = surveillance is mainly used on points, but can also be used on ways and polygons.
Note:
See TracTickets
for help on using tickets.


