Topic: Change of building and map provider

Hi, I am currently trying to replace the building provider from the online map from OSM to OneMap. Because OneMap provides more buildings as compared to OSM in the context of Singapore. May I ask how I could do this? Or at least a guide on which part of the code I should look into to achieve this? I am still unable to fetch the data from OneMap but I have emailed the service provider for their hope. Would really appreciate it if anyone can enlighten me. Thank you!

P.s, OneMap can be found at https://www.onemap.gov.sg/main/v2/

Re: Change of building and map provider

Update, OneMap currently has API to provide building polygon in the form of points, enquiring a building of specific geolocation will hence return sth like this :
[[1.31955,103.84223],[1.31755,103.84223],[1.31755,103.82223],[1.31755,103.81223],[1.31955,103.84223]]
These are the coordinates of the corners of the building, I believe I could connect the points to get the shape of the buildings.

I look into the code for the generating of building in OnlineMapsBuilding.cs and trace to this class OnlineMapsBuildingsNodeData().
I have a problem understanding what is "Nodes" and "Way" in this class. How do these 2 attributes help to create a building? Is there a chance that the points I mentioned above can be converted into an OnlineMapsBuildingsNodeData()?

Re: Change of building and map provider

Hello.

OnlineMapsBuildings is designed to work with OSM Overpass API data.
Overpass returns data as XML containing three types of items:
- node - a point that has geographic coordinates.
- way - an array of nodes, for example a building outline.
- relations - the ways array when the object is too complex to describe it in single way item.

OneMap most likely returns data in some other format, and you can add support for this service only by modifying Online Maps source code, or by implementing your own building manager.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.