1 / 45

Geospatial Analysis I: map algebra, neighborhood operations

Geospatial Analysis and Modeling MEA592 ? Helena Mitasova. Outline. summary statistics ? global and zonal operationsneighborhood (focal) operationsmap algebra and local operationsexpressions, operators, functions and variablesbasic calculations, integer and floating point data"if" conditions, h

eli
Télécharger la présentation

Geospatial Analysis I: map algebra, neighborhood operations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. Geospatial Analysis and Modeling MEA592 Helena Mitasova Geospatial Analysis I: map algebra, neighborhood operations Geospatial Analysis and Modeling: Lecture notes Helena Mitasova, NCSU MEAS

    2. Geospatial Analysis and Modeling MEA592 Helena Mitasova Outline summary statistics global and zonal operations neighborhood (focal) operations map algebra and local operations expressions, operators, functions and variables basic calculations, integer and floating point data "if" conditions, handling NULLs, creating masks special operators patching, mosaicking and overlay

    3. Geospatial Analysis and Modeling MEA592 Helena Mitasova Summary statistics Continuous raster data: stored numbers are values quantifying the phenomenon univariate statistics: min, max, mean, standard deviation, histogram requires discretization into bins Intro - this has been already covered Intro - this has been already covered

    4. Geospatial Analysis and Modeling MEA592 Helena Mitasova Summary statistics Continuous raster data: stored numbers are values quantifying the phenomenon univariate statistics: min, max, mean, standard deviation, histogram requires discretization into bins Discrete raster data: stored numbers can be values (quantitative data) or category numbers (qualitative data) univariate statistics can be applied only to quantitative attributes mode (most frequent cat), diversity (number of different cats) apply to category data Can be applied as global, zonal, or focal operations Intro - this has been already covered Intro - this has been already covered

    5. Geospatial Analysis and Modeling MEA592 Helena Mitasova Global statistics: continuous data Intro - this has been already covered Intro - this has been already covered

    6. Geospatial Analysis and Modeling MEA592 Helena Mitasova Global statistics: continuous data Intro - this has been already covered Intro - this has been already covered

    7. Geospatial Analysis and Modeling MEA592 Helena Mitasova Global statistics: continuous data Intro - this has been already covered Intro - this has been already covered

    8. Geospatial Analysis and Modeling MEA592 Helena Mitasova Global statistics: continuous data Intro - this has been already covered Intro - this has been already covered

    9. Geospatial Analysis and Modeling MEA592 Helena Mitasova Global statistics: discrete objects Works for soil erodibility factor: Does not apply to soil ID Mean: 0.248 stdv 0.028 Mean: 29379.2 stdv 349.302 but not for erodibility classes Intro - this has been already covered Intro - this has been already covered

    10. Geospatial Analysis and Modeling MEA592 Helena Mitasova Zonal statistics: continuous data Zonal summary statistics for continuous data: Raster 1: rasterized polygon (zipcodes) Intro - this has been already covered Intro - this has been already covered

    11. Geospatial Analysis and Modeling MEA592 Helena Mitasova Zonal statistics: continuous data Zonal summary statistics for continuous data: Raster 1: rasterized polygon (zipcodes) Raster 2: continuous field (elevation) Intro - this has been already covered Intro - this has been already covered

    12. Geospatial Analysis and Modeling MEA592 Helena Mitasova Zonal statistics: continuous data Zonal summary statistics for continuous data: Raster 1: rasterized polygon (zipcodes) Raster 2: continuous field (elevation) Resulting raster 3: mean elevation value for each zipcode Intro - this has been already covered Intro - this has been already covered

    13. Geospatial Analysis and Modeling MEA592 Helena Mitasova Zonal statistics: category data Zonal statistics for category data Raster 1: rasterized polygon (zipcodes) Raster 2: category map (land use 1996 with 24 classes) Intro - this has been already covered Intro - this has been already covered

    14. Geospatial Analysis and Modeling MEA592 Helena Mitasova Zonal statistics: category data Zonal statistics for category data Raster 1: rasterized polygon (zipcodes) Raster 2: category map (land use 1996 with 24 classes) Resulting raster 3: most frequent land use for each zipcode Guess the categories in the result below Intro - this has been already covered Intro - this has been already covered

    15. Geospatial Analysis and Modeling MEA592 Helena Mitasova Neighborhood operations Focal operations: value at a grid cell is function of its neighborhood values. Grid cell neighborhood moving window, square or circular Same handling of continuous and discrete data as for global and zonal operations

    16. Geospatial Analysis and Modeling MEA592 Helena Mitasova Neighborhood operations Functions: mean, stdv,max, min, median, sum, variance mode, diversity, interspersion most frequent cell value, number of different cell values filters fluxes Implemented as modules or in map algebra Image processing applications

    17. Geospatial Analysis and Modeling MEA592 Helena Mitasova Neighborhood operations Continuous data: smoothing SRTM DEM focal mean operator 5x5 window

    18. Geospatial Analysis and Modeling MEA592 Helena Mitasova Neighborhood operations Continuous data: smoothing SRTM DEM focal mean operator 5x5 window

    19. Geospatial Analysis and Modeling MEA592 Helena Mitasova Neighborhood operations Discrete data: land use 1996 focal diversity 7x7 window

    20. Geospatial Analysis and Modeling MEA592 Helena Mitasova Neighborhood operations Discrete data: land use 1996 focal diversity 7x7 window

    21. Geospatial Analysis and Modeling MEA592 Helena Mitasova Raster map algebra Computes a new raster map using expression built by applying logical and/or arithmetic operators, mathematical functions to existing raster maps representing variables: newmap = expression (map1, map2, ...map3) Local: Expression is applied on per-cell basis Focal: moving window calculations apply expression to the given cell and its neighboring cells

    22. Geospatial Analysis and Modeling MEA592 Helena Mitasova Raster map algebra Each software has its own syntax and set of operators and functions, examples: Logical ? Arithm. Operators ? Math. Functions ? Special operators ?

    23. Geospatial Analysis and Modeling MEA592 Helena Mitasova Raster map algebra Each software has its own syntax and set of operators and functions, examples: Logical operators and functions: less than, equal, and, or, not, ...; if(x), if(x,a,b) Arithm. Operators +, -, *, / Math. Functions: exp(x,y),sin(x),log(x) min(x1,x2,..), max(), median()

    24. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: int and fp rules Integer and floating point matters for arithmetic expressions: F(map1_int, map2_int) -> map_int F(map1_int, map2_fp) -> map_fp Example: compute ndvi index from landsat integer maps ndvi=(tm4-tm3)/(tm4+tm3) ndvi=float(tm4-tm3)/float(tm4+tm3) ndvi=1.*(tm4-tm3)/(tm4+tm3)

    25. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: int and fp rules ndvi=(tm4-tm3)/(tm4+tm3)

    26. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: int and fp rules ndvi=(tm4-tm3)/(tm4+tm3)

    27. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: int and fp rules tm3: 1-255

    28. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: int and fp rules tm3: 1-255

    29. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: if conditions logical expressions apply to both continuous and discrete (category) data and their combination use for complex reclassification, masking and overlays Example: find all forested areas with elevation > 120m

    30. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: if conditions logical expressions apply to both continuous and discrete (category) data and their combination use for complex reclassification, masking and overlays Example: find all forested areas with elevation > 120m

    31. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: null data handling Raster maps can include NULL data (no-data), each software has its own rules how to handle them in map algebra operations General rule: If a cell is null in at least one map (variable) then it is null in the resulting map If statements can test for null and/or assign a cell null value based on the if condition Special operators can be implemented to extend the rules applied to nulls

    32. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: null data handling Compute average elevation from 30m SRTM and one tile of 6m NCFlood DEM, elev_avg=(elev_srtm_30m+elevlid_D782_6m)/2.

    33. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: null data handling Compute average elevation from 30m SRTM and one tile of 6m NCFlood DEM, cells that do not have NCFlood tile values are NULL elev_avg=(elev_srtm_30m+elevlid_D782_6m)/2.

    34. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: relative coordinates Focal operations - moving window - operations filters or simulations slower than C modules but more flexible, edge cell problem Operations on raster map subset, creating new maps Replacing values in a subregion of a raster map Generating tilted plane Modeling dynamic processes Fluxes and diffusion

    35. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: relative coordinates Example for applying operation to subset of a given region: For an area where x < 637033. and y < 225552. and x > 633985. and y >222504. use lidar-based DEM elevlid_D783_6m everywhere else within the define region use SRTM-based elev_srtm_30m

    36. Geospatial Analysis and Modeling MEA592 Helena Mitasova Map algebra: relative coordinates Examples: generating tilted plane (e.g. geological fault) z=ax+by+c, z=x+y+100 plane dipping to NW starting at 100m plane=row()+col()+98

    37. Geospatial Analysis and Modeling MEA592 Helena Mitasova Raster maps patching and overlay Merging several neighboring raster maps into a single raster Filling-in nulls in base raster map with values from additional raster maps Order of maps matters Issues: resolution, extension that is not aligned, no-data slivers due to projection

    38. Geospatial Analysis and Modeling MEA592 Helena Mitasova Raster maps patching Merging several neighboring raster maps into a single raster: example patch DEM tiles A, B, C, D into map E

    39. Geospatial Analysis and Modeling MEA592 Helena Mitasova Raster maps patching and overlay

    40. Geospatial Analysis and Modeling MEA592 Helena Mitasova Reclassification and rescaling Reclassification / recoding: transformation rules used to convert between raster value types and classes general form: change interval or list of values <wi, wj> to a new value vk or interval of values <vk,vl> Rescaling applies to continuous data or values associated with discrete data wnew =k*wold for each cell histogram equalized: values are distributed according to a cumulative histogram Intro - this has been already covered Intro - this has been already covered

    41. Geospatial Analysis and Modeling MEA592 Helena Mitasova Reclassification examples Reclassification examples How is this handled in DBMS? When do you want to do this? Intro - this has been already covered Intro - this has been already covered

    42. Geospatial Analysis and Modeling MEA592 Helena Mitasova Reclassification examples Reclassification examples Intro - this has been already covered Intro - this has been already covered

    43. Geospatial Analysis and Modeling MEA592 Helena Mitasova Rescaling examples Slope equal interval Intro - this has been already covered Intro - this has been already covered

    44. Geospatial Analysis and Modeling MEA592 Helena Mitasova Rescaling examples Slope equal interval hist. equalized Intro - this has been already covered Intro - this has been already covered

    45. Geospatial Analysis and Modeling MEA592 Helena Mitasova Summary and references summary statistics (global, zonal, focal) Neteler ch. 5, Bolstad ch. 10 map algebra Neteler ch. 5.2 , Bolstad ch. 10 patching, rescaling, reclassification

More Related