go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.3k stars 198 forks source link

Error when displaying highways #913

Open Etheonor opened 1 year ago

Etheonor commented 1 year ago

Hello,

I have an issue with my Tegola server that works well with my node layers (city/town), but have issues with my highways layer.

Here the error : 2023-03-17 11:21:45 [ERROR] handle_map_layer_zxy.go:175: error marshalling tile: error Getting VTileLayer: unsupported type for value(map[highway:motorway_link oneway:yes]) with key(tags) in tags for feature {Feature: 426430156, GEO: MULTILINESTRING ((1904 2825,1904 2825,1904 2825)), Tags: map[tags:map[highway:motorway_link oneway:yes] way_id:426430156]}.

I don't know if it's an issue with my import. To create the map I used osmium to first filter the osm.pbf and then osm2pgsql to import everything in my database.

Here is the import config from my .lua :

tables.highways = osm2pgsql.define_way_table('highways', { { column = 'tags', type = 'jsonb' }, { column = 'rel_refs', type = 'text' }, -- for the refs from the relations { column = 'rel_ids', sql_type = 'int8[]' }, -- array with integers (for relation IDs) { column = 'geom', type = 'linestring', not_null = true }, { column = 'source', type = 'int'}; { column = 'target', type = 'int'}; })

I tried to change the tegola config file to change the geometry_type, but without any success.

The database works well with pg_tileserv but I want to use Tegola as it seems way faster for my usecase.

ARolek commented 1 year ago

@Etheonor what do your SQL look like? Is the tags column a type of hstore?