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
|  
Report Content as Inappropriate

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">
        <options>       
        <terrain normal_maps="true"
                                 color="#ffffffff"
                                 incremental_update="true"
                                 skirt_ratio="0.05"
                                 progressive="true"
                                 tile_size="13"
                                 merges_per_frame="4"
                                 morph_imagery="true"
                                 morph_terrain="true"
                                 high_resolution_first="true"
                                 first_lod="1"
                                 normalize_edges="true"
                                 quick_release_gl_objects="false">
                </terrain>
    </options>
   
       
       
       
        <image name="World" driver="tms">
        <url>http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/RME:World_250m@EPSG:4326@png/</url>
    </image>
       
        <image name="OpenStreetMap" driver="tms">
        <url>http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps:openstreetmap@EPSG:4326@png/</url>
    </image>
       
    <image name="Nightshade" driver="tms">
        <url>http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/RME:Nightshade@EPSG:4326@png/</url>
        <color_filters>
        <night/>
        </color_filters>
    </image>
       
    <feature_source name="buildings-data" driver="tfs">
        <url>http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps:planet_osm_polygon@EPSG:4326@pbf</url>
        <min_level>14</min_level>
        <max_level>14</max_level>
        <profile>spherical-mercator</profile>
        <format>pbf</format>
        <filters>
            <script> <![CDATA[ ("building" in feature.properties); ]]> </script>        </filters>
    </feature_source>

    <feature_model name="buildings" feature_source="buildings-data">
        <styles>
            <library name="us_resources">
                <url>data/resources/textures_us/catalog.xml</url>
            </library>

            <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>
    </feature_model>       

    <sky driver="simple" hours="13.0" ambient="0.3" atmospheric_lighting="true" exposure="1.2" />
 
</map>
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="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0">
<Title>planet_osm_polygon</Title>
<Abstract/>
<SRS>EPSG:4326</SRS>
<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="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/0" units-per-pixel="0.703125" order="0"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/1" units-per-pixel="0.3515625" order="1"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/2" units-per-pixel="0.17578125" order="2"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/3" units-per-pixel="0.087890625" order="3"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/4" units-per-pixel="0.0439453125" order="4"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/5" units-per-pixel="0.02197265625" order="5"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/6" units-per-pixel="0.010986328125" order="6"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/7" units-per-pixel="0.0054931640625" order="7"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/8" units-per-pixel="0.00274658203125" order="8"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/9" units-per-pixel="0.001373291015625" order="9"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/10" units-per-pixel="6.866455078125E-4" order="10"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/11" units-per-pixel="3.4332275390625E-4" order="11"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/12" units-per-pixel="1.71661376953125E-4" order="12"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/13" units-per-pixel="8.58306884765625E-5" order="13"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/14" units-per-pixel="4.291534423828125E-5" order="14"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/15" units-per-pixel="2.1457672119140625E-5" order="15"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/16" units-per-pixel="1.0728836059570312E-5" order="16"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/17" units-per-pixel="5.364418029785156E-6" order="17"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/18" units-per-pixel="2.682209014892578E-6" order="18"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/19" units-per-pixel="1.341104507446289E-6" order="19"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/20" units-per-pixel="6.705522537231445E-7" order="20"/>
<TileSet href="http://141.200.19.174:8080/geoserver/gwc/service/tms/1.0.0/WorldMaps%3Aplanet_osm_polygon@EPSG%3A4326@pbf/21" units-per-pixel="3.3527612686157227E-7" order="21"/>
</TileSets>
</TileMap>

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
|  
Report Content as Inappropriate

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.
Loading...