渲染从OpenStreetMap的数据的地图有一个开源的3D引擎? [英] Render a map from Openstreetmap data with an open-source 3D engine?

查看:1387
本文介绍了渲染从OpenStreetMap的数据的地图有一个开源的3D引擎?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

渲染3D地图从OpenStreetMap的数据可以是pretty的<一个href="http://gis.stackexchange.com/questions/19391/render-the-postgis-osm-data-in-3d">cumbersome.

Rendering a 3D-map from an Openstreetmap data can be pretty cumbersome.

但是,如果要求比渲染3D任何城市在世界的要求不高?

But what if the requirements are less demanding than rendering any city of the world in 3D?

如果我只需要渲染只是某个城市受限于特定的边界?不应该有大量的多边形渲染,特别是如果我选择只渲染那些建筑物和道路的实际在屏幕上看到(我听说这种技术用于游戏开发)。

What if I just need to render only a certain city limited by particular boundaries? There should not be a lot of polygons to render, especially if I choose to render only those buildings and roads that are actually seen on the screen (I have heard that this technique is used in game development).

我想实现的东西如的,但它是确定有只是简单的盒子与近似的高度和无纹理的建筑物。所以,基本上我只需要一个OSM-基于路网和简单的盒子重新presenting建筑3D。

I wish to achieve something like this, but it is ok to have just simple boxes for buildings with approximate height and no textures. So, basically I just need an OSM-based road network and simple boxes representing buildings in 3D.

因此​​,该计划可能是以下内容:

So, the plan could be the following:

  • 在提取OSM数据到.osm文件;
  • 在该文件(手动)增加身高数据,每栋楼;
  • 渲染从.osm文件地图的3D视图(需要自定义分析器)与某种3D引擎。

这是计划是否可行?是否有我可以使用/自定义呈现从.osm文件的OSM地图的任何开源的3D引擎?是否有任何Linux兼容(OpenGL的?)3D引擎存在可以[可能]定制渲染OSM的地图?

Is this plan feasible? Are there any open-source 3D engines that I can use/customize to render an OSM map from an .osm file? Are there any Linux-compatible (OpenGL?) 3D engines exist that can be [possibly] customized to render an OSM map?

推荐答案

请注意,在大多数地区的OpenStreetMap只有在大量的公路和其他的东西,而不是个别建筑物。是这样的话我最后一次检查,但是这取决于你感兴趣的领域。

Be aware that in most areas OpenStreetMap has only on lots and roads and other stuff, but not individual buildings. That was the case last time I checked, but it depends on the area you're interested in.

据我知道有没有现成的现成办法做到这一点,但如果你只是想简单的事情,它不应该是复杂的。简要说明:

As far as I know there's no off-the-box way to do this, but if you just want simple things it should not be that complicated. Brief description:

1 -extract从OSM的XML文件中的脚印多边形数据。

1 -Extract the footprints polygon data from the osm xml file.

2 -Project到您选择的笛卡尔,例如使用 PROJ.4 ,因为OSM坐标是北纬长。

2 -Project into a Cartesian of your choice, for example using PROJ.4, since osm coordinates are in lat-long.

3 -Triangulate避免非凸多边形。

3 -Triangulate to avoid non-convex polygons.

4 -Extrude您三角的多边形生成四为每个边界边。

4 -Extrude your triangulated polygon generating a quad for each boundary edge.

5 - 最后,你可以将生成的模型到您最喜爱的3D引擎,例如 OpenSceneGraph的或使它们自己使用OpenGL。

5 -Finally, you can insert the generated models into your favorite 3d engine for example OpenSceneGraph or render them by yourself using OpenGL.

在这之后,你想要更多的东西添加喜欢的纹理,模仿的细节,越变得复杂。

After that, the more things you want to add like textures, modeled detail, the more it gets complicated.

这篇关于渲染从OpenStreetMap的数据的地图有一个开源的3D引擎?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆