How to load a local OSM file

classic Classic list List threaded Threaded
2 messages Options
ceranco ceranco
Reply | Threaded
Open this post in threaded view
|

How to load a local OSM file

Hello everyone,

I'm trying to load a data from a local .osm file to osgEarth without much success.
I'm using osgEarth version 2.10.1 built by using vcpkg on Windows 10 and Windows 7 computers.

I downloaded the .osm file according to this link, by using the following API call:


wget -O munich.osm "https://api.openstreetmap.org/api/0.6/map?bbox=11.54,48.14,11.543,48.145"


The earth file I'm using is based on the openstreetmap_full.earth  example.
I've slightly changed it to use the OGR driver to load the local .osm file:


<map name="world">
        <image name="base" driver="gdal">
                <url>data/world.tif</url>
        </image>       
               
    <feature_model name="osm">
        <features name="osm" driver="ogr">
            <url>munich.osm</url>
            <ogr_driver>OSM</ogr_driver>
        </features>

        <feature_indexing enabled="false"></feature_indexing>

        <styles>
         .......
         .......
        </styles>
    </feature_model>
    .......
    .......
</map>


The full file can be seen here.

Unfortunately, when I use this earth file with the aforementioned data I can't see anything rendered on the map, and no errors are printed in the console.
The textures in the earth file and the basemap are taken from the osgearth data folder.

Can anyone see the problem or point me to a possible solution?

Thanks,
Eran Cohen
Eran Cohen
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: How to load a local OSM file

Eran,
You didn't post your stylesheet, but something like this should work:

point-fill: #ff0000;
point-size: 10
render-depth-offset: true;
Glenn Waldron / Pelican Mapping