使用 osgearth_package 下载 OpenStreetMaps 华盛顿特区

Use osgearth_package to download OpenStreetMaps Washington DC

我正在尝试使用 osgEarth 下载和转换华盛顿地区的 OpenStreetMap 数据。

我正在使用来自 osgEarth 的 openstreetmap_flat.earth 示例。

<map name="OpenStreetMap" type="projected" version="2">

<options>
    <profile>spherical-mercator</profile>
    <lighting>false</lighting>
    <terrain engine="quadtree" range_mode="PIXEL_SIZE_ON_SCREEN" tile_pixel_size="256"/>
</options>

<image name="osm" driver="xyz">
    <url>http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png</url>
    <profile>spherical-mercator</profile>
    <cache_policy usage="none"/>
</image>

</map>

我的 DC 区域边界框是 SW(-77.0518, 38.8414) NE(-76.9488, 38.9589)

我使用 osgearth_package 和以下命令行选项来执行我的下载。目标是获得 DC 区域的 19 个细节级别。我相信我输入的坐标是 UTM,但我可能错得很惨。

osgearth_package --tms ../openstreetmap_flat.earth --out c:/osgearth/ --out-earth osm.earth --max-level 19 --verbose --bounds -8564949.622936 4698767.775034 -8587714.346282 4698703.947754

输出不太正确。我得到了南美洲和非洲的部分地区。此外,虽然我确实从 DC 区域获得了更高级别的细节,但它远不及 19 级。它更像是 5 个级别。

我希望在我的地图上只有 DC 区域显示 19 个细节级别,没有别的。

我是不是做错了什么?有什么建议吗?

我认为你的问题是球形墨卡托与 UTM。 osgearth_package 的文档 http://docs.osgearth.org/en/latest/user/tools.html#osgearth-package

说 --bounds xmin ymin xmax ymax bounds to package (in map coordinates; default=entire map) 你可以提供多个边界

所以,我认为您的边界坐标需要采用球面墨卡托,而不是 UTM。