Closed rinigus closed 6 years ago
There is not currently a way to drop that field (that I recall). There was an early effort to provide an option, in C++, to do this https://github.com/mapbox/mapnik-vector-tile/pull/78. The problem is that ideally you need a way to signal what fields you want from the XML. We added the ability to control the key field specifically for the postgis database in https://github.com/mapnik/mapnik/issues/3115. Something similar could likely be added for sqlite, but I don't personally have time to work on this.
Thank you for the fast reply! While not implemented in C++, is it possible later to filter this field out using some other approach? Like processing all tiles via tilegrinder or filter the field out in tilelive pipeline? I am quite new to this, sorry if these questions have been replied somewhere already.
Closing this issue as it is something related to plugins in mapnik.
Thank you for closing it. I was wondering what's the policy regarding closing the issues and wasn't sure whether to do it.
If someone stumbles on it: I went around it by using PostGIS instead and would recommend to do so to others as well.
@rinigus Hi, could not you use spatialite?
It was spatialite database when I was discussing sqlite datasource.
@rinigus thanks, can you please tell me how you converted your sqlite database to vector tiles, you used tilelive copy or bridge?
I ended up tuning with my own scripts on the basis of approaches available around. The project is available at https://github.com/rinigus/mapbox-gl-importer and is now based on PostGIS. But it should be possible to adjust to SQLite if you change Mapnik source definitions.
I am generating vector tiles using tilelive copy (from bridge to mbtiles). Data is served from SQLite database(s) that were generated from OSM data (ogr2ogr) and preprocessed to arrange for simplifying import. While tiles seem to be fine, all layers have an additional
rowid
key that seem just to waste space in the tile. I wonder whether I am missing some parameter in Mapnik XML to disable rowid propagation into the generated tile.Used Mapnik XML:
tileinfo --verbose example.pbf
: