Giter VIP home page Giter VIP logo

Comments (3)

jingsam avatar jingsam commented on June 5, 2024

Note that mapbox.terrain-rgb uses 256.

from rio-rgbify.

dnomadb avatar dnomadb commented on June 5, 2024

Note that mapbox.terrain-rgb uses 256.

While the default tile endpoint is indeed 256, the full size tiles (@2x) are retina resolution at 512x512 (same for all of our raster tiles: https://www.mapbox.com/api-documentation/#retrieve-tiles -- they are resized on-the-fly).

512: https://api.mapbox.com/v4/mapbox.terrain-rgb/11/334/[email protected]?access_token=<token>

image

256: https://api.mapbox.com/v4/mapbox.terrain-rgb/11/334/793.pngraw?access_token=<token>

image

I'd guess that for hillshading 512 is overkill, but 512 tiles work great for other uses in order to make fewer calls to the api, eg: https://www.mapbox.com/labs/terra/#15.1541/-25.3483/131.0368/31.8413/36

from rio-rgbify.

jingsam avatar jingsam commented on June 5, 2024

I think the default tileSize should be 512. As mapbox-gl-js uses 512 tiles, a 256 tile source would cause mapbox-gl-js request four 256-based tiles to compose a 512 tile. Not only more requests, but also the total size of tiles increase.

from rio-rgbify.

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.