OpenStreetMap logo OpenStreetMap

Panoramax in "OSM go" / 3D rendering

Posted by -karlos- on 5 February 2025 in English.

Panoramax is a rising star at the moment, for OSM, but not only; while Mapillary goes down, sold to Facebook. In my old www.OSMgo.org, the key P showed a Mapillary picture near the actual position in the 3D rendered OSM world. As the API is gone, I replaced it with Panoramax. OSMgo was abandoned by me years ago but the server is still running. As I read more and more about Panoramax, I decided to dig out the old code and use it. First I asked in the Fediverse for help with the API and got a great and fast response, even a good example, thank you all!



There are almost to much pages about it. The real API was a bit hidden but well documented at last. The Idea of decentralised servers but a central directory is great, the Web-UI to see all pictures to. And the API got me a json list of the closest pictures, including a link to the pictures. After researching to define the radius (place_distance) and get the direction of the “shot” (feature.properties[“view:azimuth”]) my old Mapillary could be modified to show the picture in the 3D view and move the camera to see it.

Try it out

Panoramix picture of London Houses Of Parliament

You may note, the controls of OSMgo are nasty. The whole project is outdated and incomplete. I consider to redo it, may be in Rust or Zig; someone interested to join in? One missing feature in OSMgo is roof-types like gabled. There are more OSM 3D renderers and I started to investigate how they solve my obstacles. A compact one is this building viewer Example: US Capitol

Before I will start with a new code, I want to have a detailed definition of how 3D rendering is done in the open source projects: OSMBuilding, OSM2World, plugins for JOSM and Blender. Do you know more There are some points to talk about in the OSM forum, like how to render a dome or an onion, circular or according to the way nodes it is tagged in. The OSM Wiki may get more details/pages. With this knowledge, OSMgo could get some improvements to.

A rust crate may be the next goal. It would take an area of OSM data and create a 3D scene, rather simple or good looking will be controlled by options. That Scene could be send directly to the GPU or stored in GLT-file


Location: Westminster, Millbank, City of Westminster, Greater London, England, SW1P 3JX, United Kingdom

Discussion

Comment from cbeddow on 16 February 2025 at 14:39

Hi from the Mapillary team! The Mapillary API only transitioned to a new version and was never gone, did you mean to Aya after it transitioned? I personally attempted to contact all significant API users I could at the time. The docs are still at: https://www.mapillary.com/developer/api-documentation/

Nice project and thanks for sharing!

Comment from -karlos- on 16 February 2025 at 14:51

All right. I may reactivate it with Shift-P later. Or -M for Meta? Greetings to 🍬⛰️ ;-)

Comment from -karlos- on 16 February 2025 at 16:13

@cbeddow The API changed. That was my first call: https://graph.mapillary.com/images/?radius=1500&per_page=1&closeto=-0.12072092753179367,51.49854422313819&client_id=SECRET!

closeto and radius are gone? There is a get_image_close_to in your code somewhrere. Or I have do calculate a bbox …

Next I called “https://d1cuyjsrcm0gby.cloudfront.net/” + pro.key + “/thumb-2048.jpg” More todo …

Comment from cbeddow on 16 February 2025 at 17:10

So, first just do a very small box, for example this is 1500 meters:

-0.1423,51.4850,-0.0991,51.5120

(Closeto should be coming back, I think it’s super useful but I think not native to the graph API)

To fetch the image, just make sure you include &fields=thumb_2048_url in the original request and it will return with a URL to follow

Log in to leave a comment