pakillo / cityshademapper Goto Github PK
View Code? Open in Web Editor NEWCreate high resolution shade maps in cities
Home Page: https://pakillo.github.io/CityShadeMapper/
License: GNU Affero General Public License v3.0
Create high resolution shade maps in cities
Home Page: https://pakillo.github.io/CityShadeMapper/
License: GNU Affero General Public License v3.0
Remove pixels occupied by buildings. Probably water too
That is, leave pixels that are outdoors (streets, open spaces), either vegetated or not, to calculate shade statistics across districts, etc
We can do this using lidar points classes (see #2 (comment))
Vegetation <1m should probably be discarded
library(terra)
#> terra 1.5.21
library(raster)
#> Loading required package: sp
r = rast(nrows = 3, ncols = 3, xmin = 0, xmax = 3, ymin = 0, ymax = 3,
resolution = 1, vals = 1:9)
plot(r)
raster <- raster(r)
m <- matrix(raster::extract(raster, raster::extent(raster)),
nrow = ncol(raster), ncol = nrow(raster))
m
#> [,1] [,2] [,3]
#> [1,] 1 4 7
#> [2,] 2 5 8
#> [3,] 3 6 9
Need to transpose resulting matrix in terra_to_matrix
I want to get a raster with the cover type (i.e. building, vegetation, water) that comes with the LiDAR points data
@jesus-davila do you know an easy way to put that information (ie. LiDAR point classes) on a raster? Thanks
Time zones together with Daylight Savings Times are complicated...
The time difference between local time and UTC/solar time at late March or late October (i.e. after DST) depends on the particular year
We're going to model a 'standard' year, so let's assume that all days from November to March, both included, have winter time (i.e. 1 hour ahead of UTC/solar), and all days between April and October (both included) have summer time (i.e. 2 hours ahead of UTC/solar)
P.S. Here is a base R solution to find time difference at any given date
This can be useful to prototype the shiny app: https://ashbaldry.github.io/designer/
Del PNOA:
Nubes de puntos (resolución >= 0.5 puntos/m2). 1ª cobertura: 2009-2015. 2ª cobertura (aún no disponible para todo el territorio): 2015-2020.
Modelo Digital del Terreno: altura del suelo, generado por interpolación de puntos clase 2 (terreno), con resolución de 5 m (1ª cobertura) o 2 m (2ª cobertura).
Modelo Digital de Superficies: alturas sobre el terreno, generado a partir de puntos de clase 2 (terreno), 3, 4, 5 (vegetación) y 6 (edificaciones), con resolución de 5 m (1ª cobertura). También disponibles MDS de vegetación y edificaciones (por separado), con resolución de 2.5 m (1ª cobertura).
Mapa Lidar: Modelo Digital de Superficies sombreado, distinguiendo vegetación de edificaciones, con resolución de 2.5 m
(Catastro tiene información sobre número de plantas, pero no alturas)
Generate SpatRaster with many layers
Writing functions: https://rstudio.cloud/learn/primers/6
Building R packages: https://r-pkgs.org/
Advanced R: https://adv-r.hadley.nz/
Could be more useful/accurate in our case. See end of https://www.tylermw.com/throwing-shade/
We need to find the best route between two points (ideally, two addresses or geoplaces as in Google Maps or Openstreetmap) with the conditions that
route must follow streets (ideally from OSM), i.e. not being a direct line between the two points. Must be possible to make it walking
route must minimize cost, in terms of selecting the most shaded routes as coming from the shade raster for that date and time
For that, we will use lidR::normalize_height, then lidR::rasterize_canopy, then reclassify those heights into ground level or not
single small tree
single big tree (same as several small trees together)
square building with open area inside
Coming from #8
We need to discount the number of rays that are intercepted by the tree canopy just above, but keep all the other rays (coming from sides).
Look into rayshader::ray_shade function and try to get the number of rays intercepted vertically by the canopy above.
See also explanation of algorithm here https://www.tylermw.com/throwing-shade/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.