PBF from GeoServer TMS URL

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

PBF from GeoServer TMS URL

This post was updated on .
I have setup a tms using GeoServer and want to display the map and buildings out of the data. The imagery through tms works but pbf not even though it is enabled in the GeoServer (as you can see in TMS service response).

This is my earth file:

<map name="Demo" type="geocentric" version="2">
        <terrain normal_maps="true"
        <image name="World" driver="tms">
        <image name="OpenStreetMap" driver="tms">
    <image name="Nightshade" driver="tms">
    <feature_source name="buildings-data" driver="tfs">
            <script> <![CDATA[ ("building" in feature.properties); ]]> </script>        </filters>

    <feature_model name="buildings" feature_source="buildings-data">
            <library name="us_resources">

            <style type="text/css"> default { extrusion-height: getHeight(); extrusion-flatten: true; extrusion-wall-style: building-wall; extrusion-roof-style: building-rooftop; altitude-clamping: terrain; altitude-technique: map; altitude-binding: vertex; altitude-resolution: 0; } building-wall { skin-library: us_resources; skin-tags: building; skin-random-seed: 1; fill: #ffffff; } building-rooftop { skin-library: us_resources; skin-tags: rooftop; skin-tiled: true; skin-random-seed: 1; fill: #ffffff; } </style>
            <script> function getHeight() { if ("height" in feature.properties) { var h = feature.properties["height"].replace('m',''); return Math.max(h, 4.0); } else if ("building:height" in feature.properties) { var h = feature.properties["building:height"].replace('m',''); return Math.max(h, 4.0); } else if ("building:levels" in feature.properties){ var l = feature.properties["building:levels"]; return Math.max(l * 4.0, 4.0); } return Math.floor((Math.random() * 5.0) + 4.0); } </script>        </styles>

    <sky driver="simple" hours="13.0" ambient="0.3" atmospheric_lighting="true" exposure="1.2" />
imagery shown but no 3d buildings

The tms for the buildings (planet_osm_polygon), contains sample data around north africa.

<TileMap version="1.0.0" tilemapservice="">
<BoundingBox minx="-180.0" miny="-90.0" maxx="180.0" maxy="90.0"/>
<Origin x="-180.0" y="-90.0"/>
<TileFormat width="256" height="256" mime-type="application/x-protobuf" extension="pbf"/>
<TileSets profile="global-geodetic">
<TileSet href="" units-per-pixel="0.703125" order="0"/>
<TileSet href="" units-per-pixel="0.3515625" order="1"/>
<TileSet href="" units-per-pixel="0.17578125" order="2"/>
<TileSet href="" units-per-pixel="0.087890625" order="3"/>
<TileSet href="" units-per-pixel="0.0439453125" order="4"/>
<TileSet href="" units-per-pixel="0.02197265625" order="5"/>
<TileSet href="" units-per-pixel="0.010986328125" order="6"/>
<TileSet href="" units-per-pixel="0.0054931640625" order="7"/>
<TileSet href="" units-per-pixel="0.00274658203125" order="8"/>
<TileSet href="" units-per-pixel="0.001373291015625" order="9"/>
<TileSet href="" units-per-pixel="6.866455078125E-4" order="10"/>
<TileSet href="" units-per-pixel="3.4332275390625E-4" order="11"/>
<TileSet href="" units-per-pixel="1.71661376953125E-4" order="12"/>
<TileSet href="" units-per-pixel="8.58306884765625E-5" order="13"/>
<TileSet href="" units-per-pixel="4.291534423828125E-5" order="14"/>
<TileSet href="" units-per-pixel="2.1457672119140625E-5" order="15"/>
<TileSet href="" units-per-pixel="1.0728836059570312E-5" order="16"/>
<TileSet href="" units-per-pixel="5.364418029785156E-6" order="17"/>
<TileSet href="" units-per-pixel="2.682209014892578E-6" order="18"/>
<TileSet href="" units-per-pixel="1.341104507446289E-6" order="19"/>
<TileSet href="" units-per-pixel="6.705522537231445E-7" order="20"/>
<TileSet href="" units-per-pixel="3.3527612686157227E-7" order="21"/>

This tms service seems to work fine. However if I try to get the data from this url to obtain the features (which are in the database, rendering footprints as images works) as pbf (MVT format) nothing is shown (data folder with resources is available).

OsgEarth is built with protobuf.
There pops up a message when loading the earth file and zoom to the area:

[osgEarth]* [TFS FeatureSource] Error reading TFS response; cannot grok content-
type "text/html"

I'm not sure about the requested tiles does not fit and I think the requests might be out of the area. Also the pbf tiles are served through tms instead of tfs as pbf (see http://docs.geoserver.org/latest/en/user/extensions/vectortiles/tutorial.html).

Coverage [minx,miny,maxx,maxy] is [62345, 40401, 69309, 46299, 16], index [x,y,z] is [68353, 19333, 16] is the result if queried out of area which is indeed text/html.

The pbf from the readymap service works, but is there any special coordinate offset or so?
Thomas Stegemann Thomas Stegemann
Reply | Threaded
Open this post in threaded view

Re: PBF from GeoServer TMS URL

Was not able to get this working, maybe due to difference between tms and tfs service capability documents parsed by osgEarth. Trying xyz driver instead.