室内地图创建器

发布于 2024-11-27 19:37:17 字数 195 浏览 2 评论 0原文

我使用 google API 和 osmdroid API 为 Android 设备设计和开发了几个导航应用程序。现在我希望使用 osmdroid API 创建一个室内导航系统。但是,为了做到这一点,我需要从一个简单的 PNG 文件创建类似于常规地图图块的图块,其命名约定类似于 OpenStreetMap。

请建议我该怎么做?

干杯, 苏希尔

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 convention similar to OpenStreetMap.

Please suggest me how to do this?

Cheers,
Susheel

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

彩虹直至黑白 2024-12-04 19:37:17

您可以使用 JOSM 设计室内地图。将其保存到 .osm 文件。不要将数据上传到 OpenStreetMap,除非这样做是合适的(OpenStreetMap 有一些基本的室内功能,例如穿过购物中心的高速公路=人行道,但通常很多非常详细的室内内容不适合 OSM )但是...

使用 .osm 文件,您可以使用 OpenStreetMap 渲染之一工具来创建栅格地图,并将其切成图块。为了快速满足,我推荐 Maperative,尽管我不确定最后的瓷砖切割步骤有多容易。我从来没有用 Maperative 这样做过。 Mapnik 有一个很好的generate_tiles.py 输出,它将为您提供所需的图块集,但首先设置起来有点棘手。

实际上最后一步是您要问的主要问题。您可以将任何图像切成图块。以某种有意义的方式对图块进行地理定位对您来说可能重要,也可能不重要。对于旧项目,我使用 googletilecutter 脚本,它实际上是 GDAL 工具的包装器。

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.

软甜啾 2024-12-04 19:37:17

查看 gdal 库,特别是 gdal2tiles。这是一个旨在从光栅图像创建地图的库,并且完全满足您的目的。

您可以决定投影以及源图像的边界。该库允许您将图像重新投影到正确的坐标空间。

它还可以使用 gdal2tiles 生成各种缩放级别的图块,无论是否有重投影。

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.

无悔心 2024-12-04 19:37:17

现在,您可以通过将 OSM geojson 数据拖放到 https://app.openindoor.io web 中来检查室内渲染页。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文