Open F-15023 opened 3 years ago
A zero byte file where there's no data is correct.
The problem is that nginx returns 404 if file 0 bytes and this files can't be cached also. Can you add parameter that make tegola returns the same file as with postgis data provider for this type of mvt?
@F-15023
Can you add parameter that make tegola returns the same file as with postgis data provider for this type of mvt
Can you expand on this? Are you saying that PostGIS is returning a non 0-byte tile, but tegola is returning a 0-byte tile?
For example, we have tile which have no data. With postgis data provider (I mean type = postgis in tegola config in [[providers]] section) tegola returns mvt file which will contains all layers names from tegola config even if layers have no objects. You can see something like this inside of mvt file for empty tile: layers { name: "rivers" extent: 4096 version: 2 } layers { name: "buildings" extent: 4096 version: 2 } ...etc. And this mvt file will not have 0 byte size. But with new mvt_postgis data provider tegola will return absolutely empty file without layers names and it will be 0 byte size. And this leads to some problems as I say before. Now I had to add a useless layer containing the BBOX borders, just to avoid 0 byte files. Maybe there are better solutions exists?
@F-15023 Ah yes, I'm thinking that's potentially a bug in tegola as it should probably be returning 0 byte tiles if no data exists. I need to look into this a bit.
Can you share any of your nginx config? I'm surprised that it's returning a 404 even though tegola is not. I could maybe understand a 204 No Content, but I'm surprised that changing the status code to 404 on a 0-byte body would be the default behavior.
Hello, I have encountered with a problem. If the tile have no data inside of its BBOX tegola with postgis data provider will returns mvt file wich will contains names of layers at least. But with new mvt_postgis data provider tegola will returns empty file with 0 byte size. And the problem is, the caching server can't use this file (because of its size, I think) and returns 404. Is it possible to make this type of files not totally empty and remain names of layers for example?