I am working on an simple tool for model visualisation in 3D OSM. It will also be usable to fine-tune the model metadata. The tool uses the framework A-Frame (and the example, given by OSM user KaiRo. No code from OSMgo)
A minimum of code should support just the needed functionality. At the moment, it is a 2D ground map with 3D buildings and threes. We could drop the trees or ad more. And the model of corse, placed as it would be in all OSM 3D renderer, using 3DMR.
Next to the visualisation, the only function is, to move and rotate the model for fine tuning. The arrow keys (and WASD) should move it. What shall be used for rotation? I think, only the model should move. But the camera could be bound to the model and move with it to. We may start with this and use it. If we miss functions, they may be added.
Details:
The GPS lat/lon, given in the model metadata are only a raw position. And there may be more than one tagged instance! An overpass query should be used to find the OSM Nodes and Ways with the Tag “3dmr” and the ID of the model. This instance(s) may be shown in 3DMR in the models Map-View. I could change the code of 3DMR. But I never have used GIT and will do it, if some one supports me.
A marker in the Map may be used to select the model instance for visualisation and fine-tuning. The A-Frame tool will now get the valide lat/lon values and the model ID. It also will geht the Node or Way ID. This way, a 3D Building, replaced by the model will be hidden.
A user of 3DMR, if logged in, may now moved the model to the exact place. This will change Origin an Rotation or the lat/lon and direction tag of a node. The new model metadata or the OSM tag will be set by a “Save” button (next to “Cancel”). The View will return to the model page of 3DMR. This page shows the plain model in 3D. We may implement, it to show the model by the A-Frame tool.
@all: Please check my concept, comment it and tell mistakes, I may have done.
There will be more to be defined later one, like how to find the model position if a way is tagged by “3mdr”. But fist steps first.
-karlos-