GithubHelp home page GithubHelp logo

Comments (16)

klokan avatar klokan commented on September 10, 2024

In case the MBTiles has in metadata value maskLevel then it should be used instead of default empty vector tile.

See especially comment:
osm2vectortiles/osm2vectortiles#42 (comment)
and other related information at:
osm2vectortiles/osm2vectortiles#89 and
osm2vectortiles/osm2vectortiles#42

from tileserver-php.

daliborjanak avatar daliborjanak commented on September 10, 2024

Ok. @klokan have you got some empty tiles or some tip where I could create empty tiles? I will helps me. Mapbox returns 404 not found. Also when is tile inside boundingbox (or geometry) of layer.

from tileserver-php.

lukasmartinelli avatar lukasmartinelli commented on September 10, 2024

This is a tile pyramid from z8 to z14 (8/125/188) that only contains water.

https://drive.google.com/open?id=0B56n5MCkYKPrX1BWelpLYWFvd0U

from tileserver-php.

daliborjanak avatar daliborjanak commented on September 10, 2024

@lukasmartinelli thanks, but is water tile really empty? I mean if there is no data?

from tileserver-php.

lukasmartinelli avatar lukasmartinelli commented on September 10, 2024

@lukasmartinelli thanks, but is water tile really empty? I mean if there is no data?

Sorry it's written a bit sloppy. This tile contains the entire subpyramid.

db_browser_for_sqlite_-__users_lukasmartinelli_projects_geometalab_osm2vectortiles_tools_optimize-mbtiles_all_water_mbtiles

But that's actually not what you are interested in.
I removed alls tile below z8 for example.

DELETE FROM map WHERE zoom_level > 8;

Now it just contains one single z8 tile. But if we zoom to e.g. z12 we should still see the same data from z8 if the mask level is set to z8.

db_browser_for_sqlite_-__users_lukasmartinelli_projects_geometalab_osm2vectortiles_tools_optimize-mbtiles_all_water_mbtiles

Uploaded the samples again and gave better names:

from tileserver-php.

klokan avatar klokan commented on September 10, 2024

@daliborjanak the answer is no - the tile in above water.mbtiles is not empty - it does contain one feature - the water, with standard attributes...

MapBox Hosting does not return an empty tile either it seems - it does return 404 and JSON like:
https://b.tiles.mapbox.com/v4/klokantech.a68116a6/2/0/1.vector.pbf?access_token=tk.eyJ1Ijoia2xva2FudGVjaCIsImV4cCI6MTQ1MDEwNzUwNywiaWF0IjoxNDUwMTAzOTA3LCJzY29wZXMiOlsiZXNzZW50aWFscyIsInNjb3BlczpsaXN0IiwibWFwOnJlYWQiLCJtYXA6d3JpdGUiLCJ1c2VyOnJlYWQiLCJ1c2VyOndyaXRlIiwidXBsb2FkczpyZWFkIiwidXBsb2FkczpsaXN0IiwidXBsb2Fkczp3cml0ZSIsInN0eWxlczpyZWFkIiwiZm9udHM6cmVhZCIsInN0eWxlczp3cml0ZSIsInN0eWxlczpsaXN0Iiwic3R5bGVzOmRyYWZ0IiwiZm9udHM6bGlzdCIsImZvbnRzOndyaXRlIiwiZm9udHM6bWV0YWRhdGEiLCJkYXRhc2V0czpyZWFkIiwiZGF0YXNldHM6d3JpdGUiLCJzdHlsZXM6dGlsZXMiXSwiY2xpZW50IjoibWFwYm94LmNvbSJ9.CLTLCej8AxEumyMjRayurg

I have created a sample dataset, but MapBox Studio Classic does not generate any empty PBF tile (via the symlinks from tiles table) within the bounding box of the tileset at all... tiles seems to be simply missing, if there are no data to render. At least it seems like that.

from tileserver-php.

lukasmartinelli avatar lukasmartinelli commented on September 10, 2024

I have created a sample dataset, but MapBox Studio Classic does not generate any empty PBF tile (via the symlinks from tiles table) within the bounding box of the tileset at all... tiles seems to be simply missing, if there are no data to render. At least it seems like that.

These are vector tiles uploaded from Mapbox Studio Classic? Perhaps these PBFs were never meant for direct serving but always as intermediary format (as Mapbox served raster tiles until last month when the new studio came out) and the raster tile server implements the maskLevel (like tessera does).

But it seems to be the same upload mechanism and upload space as for the new Mapbox Studio MBTiles. Theoretically a Mapbox GL client is able to implement a maskLevel as well.

Configure maskLevel

The maskLevel is set in the MBTiles metadata table as name=maskLevel and for example value=8.

from tileserver-php.

klokan avatar klokan commented on September 10, 2024

@daliborjanak we have deployed the latest version of our recent docker image with tileserver-php behind the CDN and the 404 JSON error messages from commit 3343f80 are still not there:
http://osm2vectortiles-direct.tileserver.com/v1/18/132805/90194.pbf

It has been reported also at:
osm2vectortiles/osm2vectortiles#127

The KlokanTech CDN served from tileserver-mapnik does not have this issue of course:
http://klokantech-direct.tileserver.com/v1/18/132805/90194.pbf?key=SOdXGhtXFm1Q8fAL2rcD

Could you please check why latest docker does not return 404 for non-existing vector tiles and instead still returns an image?

from tileserver-php.

daliborjanak avatar daliborjanak commented on September 10, 2024

@klokan I pulled latest container and it works. Returns same as http://labs.klokantech.com/tileserver/#zurich/ol3vector. The problem should be somewhere else

from tileserver-php.

daliborjanak avatar daliborjanak commented on September 10, 2024

@klokan, finally 2 bugs: One in docker deploy - it didn't clean cache of downloaded repositories.
Second: Mounted disk contained old version of tileserver.php which overridden tileserver.php in docker. Fixed now.

I also added in tileserver-php ability of config loading from environment. We can now configure tileserver-php via docker volumes which will override config in global $config. We are using it for specifying baseUrl which is server specific. 8bbfa1d

from tileserver-php.

klokan avatar klokan commented on September 10, 2024

I am still getting at http://osm2vectortiles-direct.tileserver.com/v1/18/132805/90194.pbf an image @o1da!

from tileserver-php.

o1da avatar o1da commented on September 10, 2024

It is cache - try it in anonymous mode in chrome

from tileserver-php.

daliborjanak avatar daliborjanak commented on September 10, 2024

@klokan cache on -direct? Tile which is lying next to yours returns404: http://osm2vectortiles-direct.tileserver.com/v1/18/132805/90195.pbf

from tileserver-php.

o1da avatar o1da commented on September 10, 2024

-direct is without cache, it is cached in the browser, I had same problem, try it in new window, or purge local browser cache.

from tileserver-php.

klokan avatar klokan commented on September 10, 2024

Ack. Closing osm2vectortiles/osm2vectortiles#127. Thank you!

from tileserver-php.

klokan avatar klokan commented on September 10, 2024

We return 404 with JSON message now - this seems to be equal to MapBox hosting.

If maskLevel should be really implemented then let's create a new ticket.

from tileserver-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.