Giter Club home page Giter Club logo

Comments (4)

dionhaefner avatar dionhaefner commented on July 19, 2024

We should keep an eye on this PR: cogeotiff/rio-cogeo#22

Clipping rasters to the Mercator grid at some maximum zoom level should be the right way to tackle this.

from terracotta.

j08lue avatar j08lue commented on July 19, 2024

Why, when do we currently reproject? When serving?

from terracotta.

dionhaefner avatar dionhaefner commented on July 19, 2024

Yes. We construct a WarpedVRT when reading the raster data, and we should keep doing that. It's just that there's no real overhead to reproject during ingestion should the user wish to do so, and squeeze out some drops of performance. We just need to be careful not to destroy data this way (e.g. at extreme latitudes).

from terracotta.

dionhaefner avatar dionhaefner commented on July 19, 2024

Some numbers to back this up:

------------------------------ benchmark 'test_bench_singleband': 24 tests -------------------------------
Name (time in ms)                                      Min                Max             Median
----------------------------------------------------------------------------------------------------------
test_bench_singleband[True-subpixel-nearest]       10.4022 (1.0)      22.1370 (1.41)     10.9022 (1.0)
test_bench_singleband[True-subpixel-linear]        10.5489 (1.01)     18.4306 (1.17)     10.9121 (1.00)
test_bench_singleband[True-subpixel-average]       10.6505 (1.02)     17.9965 (1.14)     11.0098 (1.01)
test_bench_singleband[True-subpixel-cubic]         10.6557 (1.02)     15.7493 (1.0)      11.0352 (1.01)
test_bench_singleband[True-preview-nearest]        10.7739 (1.04)     18.4937 (1.17)     13.3235 (1.22)
test_bench_singleband[True-preview-average]        11.2968 (1.09)     18.8943 (1.20)     11.6789 (1.07)
test_bench_singleband[True-preview-linear]         11.7683 (1.13)     19.3742 (1.23)     12.1181 (1.11)
test_bench_singleband[True-preview-cubic]          12.0574 (1.16)     18.6076 (1.18)     12.3896 (1.14)
test_bench_singleband[False-preview-nearest]       12.2605 (1.18)     17.6876 (1.12)     12.7577 (1.17)
test_bench_singleband[False-subpixel-nearest]      12.4894 (1.20)     20.1799 (1.28)     12.8388 (1.18)
test_bench_singleband[False-subpixel-linear]       15.9545 (1.53)     32.8731 (2.09)     16.6443 (1.53)
test_bench_singleband[False-subpixel-average]      16.1189 (1.55)     42.0965 (2.67)     16.6298 (1.53)
test_bench_singleband[False-preview-average]       16.4866 (1.58)     23.3200 (1.48)     17.3809 (1.59)
test_bench_singleband[False-preview-linear]        16.6721 (1.60)     23.4794 (1.49)     17.1587 (1.57)
test_bench_singleband[False-subpixel-cubic]        19.0431 (1.83)     26.7898 (1.70)     19.5505 (1.79)
test_bench_singleband[False-preview-cubic]         20.0107 (1.92)     45.5268 (2.89)     20.8642 (1.91)
test_bench_singleband[True-birds-eye-nearest]      20.0978 (1.93)     27.7186 (1.76)     20.7752 (1.91)
test_bench_singleband[True-birds-eye-linear]       20.5290 (1.97)     27.8032 (1.77)     21.2586 (1.95)
test_bench_singleband[True-birds-eye-average]      20.6013 (1.98)     39.2488 (2.49)     22.4438 (2.06)
test_bench_singleband[True-birds-eye-cubic]        21.1571 (2.03)     33.8629 (2.15)     23.9085 (2.19)
test_bench_singleband[False-birds-eye-nearest]     29.3875 (2.83)     35.4783 (2.25)     29.9778 (2.75)
test_bench_singleband[False-birds-eye-average]     53.7812 (5.17)     60.7123 (3.85)     55.1779 (5.06)
test_bench_singleband[False-birds-eye-linear]      54.4519 (5.23)     97.4871 (6.19)     59.9822 (5.50)
test_bench_singleband[False-birds-eye-cubic]       60.2341 (5.79)     66.7784 (4.24)     61.7923 (5.67)
----------------------------------------------------------------------------------------------------------

The cases with True in the first parameter is where it's already in the target CRS. Especially the pathological birds-eye case gets defused pretty well. Not a lot of influence though when using nearest neighbor interpolation.

from terracotta.

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.