Giter VIP home page Giter VIP logo

Comments (2)

tibbles-and-tribbles avatar tibbles-and-tribbles commented on June 12, 2024

While reading 5.3.3, I took the following notes to resolve the issue I was having with the resolution:


Let's review the changes from dem to dem_lower:

object resolution grid extent
dem $(30.85, 30.85)$ $117 \times 117$ $794599.1, 798208.6, 8931775, 8935384$
dem_lower $(154.25, 154.25)$ $24 \times 24$ $794599.1, 798301.1, 8931682, 8935384$

Notice that "decreasing" the resolution with aggregate() actually increases the component values of the resolution in the raster header from $(30.85, 30.85)$ to $(154.25, 154.25)$. This is counterintuitive, but it helps to the review the formula for the resolution per the raster data model.

$\displaystyle \text{resolution} = \Big(\frac{\text{xmax} - \text{xmin}}{\text{ncol}}, \frac{\text{ymax} - \text{ymin}}{\text{nrow}}\Big)$

aggregate() "decreased" the resolution by decreasing the grid size, that is, by decreasing the number of rows (nrow) and columns (ncol). The extent was slightly adjusted probably to accommodate the new grid size. Decreasing the number of rows and columns, in turn, actually increases the component values of the resolution per the formula.


from geocompr.

Nowosad avatar Nowosad commented on June 12, 2024

@tibbles-and-tribbles thank you.

Please take a look at my changes at #1043.

I move the equation to the second chapter (as it is a general concept), and added some of your explanation to the fifth chapter.

from geocompr.

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.