Foreground extrusions missing with vector tile returned by the vector tile search API

We use Mapbox GL JS to retrieve tiles from the new vector tile search API.

Everything work as expected until we try to extrude the features to display it in 3D:

          id: 'building_layer',
          type: "fill-extrusion",
          source: 'building_source',
          minzoom: 12,
          "source-layer": "hits",
          paint: {
            "fill-extrusion-color": "#00ade6",
            "fill-extrusion-height": 2,

As you can see on the image, the foreground extrusions is missing:

When I decode the tile using node-mapnik I get:

[{"name":"hits","extent":4096,"version":2,"features":[{"type":3,"properties":{"_id":"59633","_index":"building-v1","id":59633,"gross_floor":180,"floor_nb":2,"unit_nb":1,"protected_rank":0,"principal_type":"Zone d'habitation de très faible densité","city_name":"La Tour-de-Peilz"},"geometry":[9,934,5244,26,22,18,6,7,21,17,15]}]},{"name":"meta","extent":4096,"version":2,"features":[{"type":3,"properties":{"_shards.failed":0,"_shards.skipped":0,"_shards.successful":1,"":1,"timed_out":false,"took":1},"geometry":[9,0,8192,26,8192,0,0,8191,8191,0,15]}]}]

Then when I try to get the validity report of this tile with node-mapnik I got the following error:

[Error: Vector Tile has POLYGON with first ring clockwise. It is not valid according to v2 of VT spec.]

It looks like an old issue in PostGIS 2.4.4 related on this post:

Who was fix in 2.4.5:

Is there something I doing wrong, or do I need to create an issue on Github ?

For information the orientation of my geo_shape is RIGHT.
Elasticsearch version is 8.2.0, environment is Elastic cloud.

All the best,


Hi Thibault,

Thank you for reporting, this looks very similar to the bug fixed in the upstream library we are using:

Unfortunately it seems the fix has never been released. Could you please open an issue in the Elasticsearch repository?

1 Like

Hi Ignacio,

Thanks for your quick reply, I will open an issue on github.


1 Like

Adding the issue here: Foreground extrusions missing with vector tile returned by the vector tile search API · Issue #86560 · elastic/elasticsearch · GitHub

It should have been fixed in 8.2.1 and 7.17.4.


I confirm the fix is working as expecting. Thanks a lot

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.