osm4j
osm4j copied to clipboard
Center attribute missing on OSM entities
The "center" attribute that sometime is received from an Overpass response is missing in the implementation of the osm4j parsers (especially XML parser).
The center attribute belongs to ways/relations and looks something like this: <center lat="46.2965728" lon="8.7908617"/>
Example of a whole tag (including center attribute):
<way id="458341945" version="2" timestamp="2021-04-26T18:48:09Z" changeset="103656292" uid="74900" user="FischersFritz"> <center lat="46.2965728" lon="8.7908617"/> <nd ref="4543689513"/> <nd ref="8669512158"/> <nd ref="8669512156"/> <nd ref="8669512155"/> <nd ref="8669512157"/> <nd ref="4543689514"/> <nd ref="8669512151"/> <nd ref="8669512149"/> <nd ref="8669512148"/> <nd ref="8669512150"/> <nd ref="4543689515"/> <nd ref="8669512146"/> <nd ref="8669512145"/> <nd ref="8669512144"/> <nd ref="8669512147"/> <nd ref="4543689516"/> <nd ref="8669512154"/> <nd ref="8669512153"/> <nd ref="8669512152"/> <nd ref="8669512159"/> <nd ref="4543689513"/> <tag k="building" v="yes"/> <tag k="castle_type" v="palace"/> <tag k="historic" v="castle"/> <tag k="name" v="Castello Marcacci"/> </way>