开发者

Indoor map creator

开发者 https://www.devze.com 2023-03-25 07:44 出处:网络
I have designed and developed couple of navigation apps using google API and osmdroid API for android powered devices. Now I am looking to create an Indoor navigation system using osmdroid API. But, i

I have designed and developed couple of navigation apps using google API and osmdroid API for android powered devices. Now I am looking to create an Indoor navigation system using osmdroid API. But, in order to do so I need to create tiles similar to regular map tiles from an simple PNG file with naming conventio开发者_Python百科n similar to OpenStreetMap.

Please suggest me how to do this?

Cheers, Susheel


You could design your indoor map using JOSM. Save it to a .osm file. Don't upload the data to OpenStreetMap unless it is a appropriate to do so (OpenStreetMap has some basic some indoor features, e.g. a highway=footway running through a shopping mall, but generally a lot of very detailed indoor stuff will be inappropriate for OSM) But...

With a .osm file you could then use one of the OpenStreetMap rendering tools to create a raster map, and chop it into tiles. For quick satisfaction I'd recommend Maperative, although I'm not sure how easy the last tile chopping step is. I've never done this with Maperative. Mapnik has a nice generate_tiles.py output, which will give you the tileset you want, but it's a bit tricky to set up in the first place.

Actually the last step is the main thing you're asking about. You can chop up any image into tiles. It may or may not be important to you that the tiles are geo-positioned in some meaningful way. For an old project I did a quick fudge solution using google tile cutter script, which is actually a wrapper around GDAL tools.


Have a look at the gdal library, and in particular gdal2tiles. This is a library designed to create maps from raster images, and serves exactly your purpose.

You can decide on a projection and what the bounds of your source image(s) are. The library allows you to reproject your image to the correct coordinate space.

It can also generate tiles at various zoom levels using gdal2tiles, either with or without reprojection.


Now you can check indoor rendering by drag and dropping OSM geojson data into https://app.openindoor.io web page.

0

精彩评论

暂无评论...
验证码 换一张
取 消