lczexplore_en

Matthieu Gousseff

2026-10-19

A package to explore Local Climate Zones: lczexplore

Purpose and origin

The lczexplore package was developed thanks to the PAENDORA2 (Pour la gestion du confort estival : Données, Outils et Recherche-Action, 2022 -2025, funded by ADEME, a French agency for ecological transition).

Its purpose is to easily compare different Local Climate Zone (LCZ) classifications on the same study territory.

Before using this package, one must assign a local climate zone (LCZ) type to each Spatial Reference Units of a territory. These units can be topological units or geometries derived from pixels of a raster approach the package deals with the conversion). Fo a detailed example of the raster approach, please read the “lczexplore_raster_vector” vignette (vignette("lczexplore_raster_vector"). As several workflows can produce these LCZ types, this package allows to represent them and to compare pairs of these classifications (pairwise). It has been extended to compare any pair of qualitative variable set on valid geographical units.

Installation

The following allows the installation from the github repository: (devtools::install_github("orbisgis/lczexplore", build_vignettes = TRUE)).

On can also install from the tar.gz file and install it (see ?install.packages).

Load the package: library(lczexplore).

library(ggplot2)
library(lczexplore)

First use-case: load a file with geometries and standard LCZ

Import files with importLCZvect function

The function importLCZvect is the generic import function for the file containing geometries, or Reference Spatial Units (RSU), and the associated Local Climate Zone Type (LCZ). Imports of .fgb (prefered), .geojson and .shp files were tested, but any format accepted by the function st_read of the sf package should work.

The dirPath and the file arguments set the path to the folder and the filename to be loaded. The compulsory argument column is the name of the column in which are the LCZ types. The optional arguments geomID and confid allow the user to load column of geometry identifiers and a column containing a measure of the confidence associated to the LCZ type of a given geometry (these are needed for the sensitivity analysis described below).

The default output of importLCZvect is an object of class simple feature as defined by the openGIS consortium and as handled by the sf package, an R reference library for Geographical Information System vector Data [https://doi.org/10.32614/RJ-2018-009].

If one sets the argument output="bBox", importLCZvect will output only the bounding box of the geometries of the input file. It is useful, for instance, when you want to use it to crop another file and study the same area.

dirPath <- system.file("extdata/multipleWfs/Redon", package = "lczexplore")
redonOSM <- importLCZvect(dirPath = dirPath, file = "osm_lcz.fgb", column = "LCZ_PRIMARY")
redonBDT <- importLCZvect(dirPath = dirPath, file = "bdt_lcz.fgb", column = "LCZ_PRIMARY")
#

Map the LCZ types with the function showLCZ

Once the dataset has been loaded into an R object of class sf, the function showLCZ produces the map of it’s repartition. The argumentsf sets the input dataset, the column of the LCZ types is passed to the argument column. The argument wf is simply a string
to specify which workflow produced the input data (it is used to produce the title).

Standard representation

For standard LCZ types, one sets the argument repr="standard", and the function will recognize levels from 1 to 10 and from 101 to 107. It is the recommended choice. But standard representation will also accept levels from 11 to 17 and from A to G. (for other conventions, see the alter representation).

showLCZ(sf = redonOSM, wf = "OSM", column = "LCZ_PRIMARY", repr = "standard", LCZlevels = "", colors = "")

One can note that by default, all the 17 possible types of an LCZ classification are present in the legend. This makes comparison easier when one compares dataset with different present levels. To only represent the present levels, set drop=TRUE.

### Alternative visualization

The non-standard representation, triggered with repr=alter is useful when: - one wants to regroup some LCZ types into more general categories, - the LCZ don’t have a standard encoding - one want’s to use custom colors - one wants to plot… something different from LCZ

With repr=alter, one passes the vector of possible levels to the argument LCZlevels and the vector of associated colors to the argument colors.

If no vector of levels or no vector of colors is given, the levels will be deduced from the unique values present in the data, and the colors will be picked from the “Polychrome 36” palette of the grDevices package.

For instance: one can first plot the column without knowing the LCZ levels present.

# Choice of random colors from a palette
testCol <- palette.colors(n = 17, palette = "Polychrome 36")
showLCZ(sf = redonOSM, wf = "OSM", column = "LCZ_PRIMARY", repr = "alter", colors = testCol, useStandCol = FALSE, drop = TRUE)
#> typeLevels before trying to group are #5A5156typeLevels before trying to group are #E4E1E3typeLevels before trying to group are #F6222EtypeLevels before trying to group are #FE00FAtypeLevels before trying to group are #16FF32typeLevels before trying to group are #3283FEtypeLevels before trying to group are #FEAF16typeLevels before trying to group are #B00068typeLevels before trying to group are #1CFFCEtypeLevels before trying to group are #90AD1C
#> 3.1 : No levels but a color vector which size is greater than the number of levels in the data,
#>       unused colors were dropped.

The colors one wants to use can be specified either by their name (if a known color name in R) or it’s RGB code, and passed to the argument colors.


LCZlevels <- c(2, 3, 5, 6, 8, 9, 101, 102, 104, 105, 107)
couleurs <- c("red", "brown1", "orange", "coral", "grey", "darkgreen", "chartreuse4", "springgreen3",
              "darkolivegreen", "black", "#6d67fd")
showLCZ(sf = redonOSM, wf = "OSM", column = "LCZ_PRIMARY", repr = "alter", drop = TRUE, LCZlevels = LCZlevels, colors = couleurs)
#> typeLevels before trying to group are redtypeLevels before trying to group are orangetypeLevels before trying to group are coraltypeLevels before trying to group are greytypeLevels before trying to group are darkgreentypeLevels before trying to group are chartreuse4typeLevels before trying to group are springgreen3typeLevels before trying to group are darkolivegreentypeLevels before trying to group are blacktypeLevels before trying to group are #6d67fd
#> One vector of levels, one vector of colors, either the same length (case 9: and 10:), or colors longer (case 12:, unused colors were dropped),
#>          reduced to  4: & 5: A single vector was provided, whose names cover the levels in the data (values are expected to be colors). Drop=TRUE, some of the specified levels were not found in the data and were dropped

Group several LCZ types in a category using groupLCZ

For instance, one may want to illustrate the contour of a city, by grouping the urban LCZs and the vegetation ones.
Use the groupLCZ function and set the dataset with the argument sf and the column with column. Then pass as many vectors as there are grouped category, each of them containing the levels to be grouped together. The newly created categories will be stored in the outCol column. If the user doesn’t enter them (by default outCol="grouped").

The newly created dataset can be mapped with showLCZ function.

redonOSMgrouped <- groupLCZ(redonOSM, column = "LCZ_PRIMARY",
                            urban = c("1", "2", "3", "4", "5", "6", "7", "8", "9"),
                            industry = "10",
                            vegetation = c("101", "102", "103", "104"),
                            impervious = "105", pervious = "106", water = "107", colors = c("red", "black", "green", "grey", "burlywood", "blue"))
#> Grouping
#> One of the specified levels to group doesn't exist in the data, if it is a mispelled level of the data,
#>               this level will be kept as ungroupedsimpleWarning: Unknown levels in `f`: 1, 3, 4, 7, 10, 103, 106
#> Warning: Unknown levels in `f`: 1, 3, 4, 7, 10, 103, 106
showLCZ(redonOSMgrouped, column = "grouped", repr = "alter", wf = "OSM",
        LCZlevels = c("urban", "industry", "vegetation", "impervious", "pervious", "water"),
        colors = c("red", "black", "green", "grey", "burlywood", "blue"))
#> typeLevels before trying to group are redtypeLevels before trying to group are blacktypeLevels before trying to group are greentypeLevels before trying to group are greytypeLevels before trying to group are burlywoodtypeLevels before trying to group are bluetypeLevels before trying to group are #757f05
#> One vector of levels, one vector of colors, either the same length (case 9: and 10:), or colors longer (case 12:, unused colors were dropped),
#>          reduced to  6: A single vector was provided, whose names don't cover the levels in the data, 
#>       missing levels were assigned random colors.

Compare two LCZ classification with the function compareLCZ

The purpose of this package is to easily compare local climate zone classifications produced by different algorithms on the same study area. In our example, the GeoClimate workflow was used with two different input data to produce two LCZ classifications: the BD TOPO® v2.2, produced by the French National Institute of Geographic and Forest Information, and OpenStreetMap.

NOTE: The vignette “lczexplore_raster_vector” explores in detail another example with WUDAPT raster data.

One has to call compareLCZ and feed it, for each dataset, at least the name of the sf object and the name of the columns where the LCZ types are stored. As the two input data set can have different coordinate reference system (CRS), you need to tell which dataset is the reference (by default ref=1, that is the second data set will be re-transformed into the CRS of the first data set).

NOTE: if the two data sets to compare have the same column names, the compareLCZ function will concatenate a “.1” string to the column names of the second file

The graphical output includes 4 graphs and is easier to read after zooming or exporting.


path <- system.file('extdata/redonCompare',package="lczexplore")
redonCompare <- compareLCZ(sf1 = redonBDT, wf1 = "bdt", geomID1 = "ID_RSU", column1 = "LCZ_PRIMARY",
                           confid1 = "LCZ_UNIQUENESS_VALUE",
                           sf2 = redonOSM, wf2 = "osm", geomID2 = "ID_RSU", column2 = "LCZ_PRIMARY",
                           confid2 = "LCZ_UNIQUENESS_VALUE", exwrite = FALSE, saveG = path)
#>  The column  LCZ_PRIMARY  of the dataset sf1 is the reference against which the  LCZ_PRIMARY  column of the dataset  sf2 will be compared.
#> Both sf datasets need to live in the same crs projection (srid / epsg),
#> they will be coerced to the specified reference (sf1)
#> Warning: attribute variables are assumed to be spatially constant throughout
#> all geometries

path <- system.file('extdata/GeneralUniquenessSensib.png',package="lczexplore")
knitr::include_graphics(path, error=FALSE)

The comparison also works on grouped data.

redonOSMgrouped <- groupLCZ(redonOSM, column = "LCZ_PRIMARY",
                            urban = c("1", "2", "3", "4", "5", "6", "7", "8", "9"),
                            industry = "10",
                            vegetation = c("101", "102", "103", "104"),
                            impervious = "105", pervious = "106", water = "107", colors = c("red", "black", "green", "grey", "burlywood", "blue"))
#> Grouping
#> One of the specified levels to group doesn't exist in the data, if it is a mispelled level of the data,
#>               this level will be kept as ungroupedsimpleWarning: Unknown levels in `f`: 1, 3, 4, 7, 10, 103, 106
#> Warning: Unknown levels in `f`: 1, 3, 4, 7, 10, 103, 106
redonBDTgrouped <- groupLCZ(redonBDT, column = "LCZ_PRIMARY",
                            urban = c("1", "2", "3", "4", "5", "6", "7", "8", "9"),
                            industry = "10",
                            vegetation = c("101", "102", "103", "104"),
                            impervious = "105", pervious = "106", water = "107", colors = c("red", "black", "green", "grey", "burlywood", "blue"))
#> Grouping
#> One of the specified levels to group doesn't exist in the data, if it is a mispelled level of the data,
#>               this level will be kept as ungroupedsimpleWarning: Unknown levels in `f`: 1, 4, 5, 7, 10, 103, 106
#> Warning: Unknown levels in `f`: 1, 4, 5, 7, 10, 103, 106
path <- paste0(system.file("extdata/", package = "lczexplore"), "/groupedComparison")
comparisonGrouped <- compareLCZ(sf1 = redonOSMgrouped, column1 = "grouped",
                                sf2 = redonBDTgrouped, column2 = "grouped",
                                repr = "alter",
                                levels = c("urban", "industry", "vegetation", "impervious", "pervious", "water"),
                                colors = c("red", "black", "green", "grey", "burlywood", "blue"), saveG = path)
#>  The column  grouped  of the dataset sf1 is the reference against which the  grouped  column of the dataset  sf2 will be compared.
#> Workflow names are used in produced graphics and as column names, long names are not suitable,
#>     the first 3 and last 3 letters were kept instead
#> Workflow names are used in produced graphics and as column names, long names are not suitable,
#>     the first 3 and last 3 letters were kept instead
#> Both sf datasets need to live in the same crs projection (srid / epsg),
#> they will be coerced to the specified reference (sf1)
#> Warning: attribute variables are assumed to be spatially constant throughout
#> all geometries
#> typeLevels before trying to group are redtypeLevels before trying to group are blacktypeLevels before trying to group are greentypeLevels before trying to group are greytypeLevels before trying to group are burlywoodtypeLevels before trying to group are bluetypeLevels before trying to group are #d69ae2
#> One vector of levels, one vector of colors, either the same length (case 9: and 10:), or colors longer (case 12:, unused colors were dropped),
#>          reduced to  6: A single vector was provided, whose names don't cover the levels in the data, 
#>       missing levels were assigned random colors.
#> As useStandCol is set to TRUE, some of the specified colors may have been over-ridden to use standard colors if standard LCZ values have been detected
#> standard LCZ types detected, the standard colors will be associated to them: redstandard LCZ types detected, the standard colors will be associated to them: blackstandard LCZ types detected, the standard colors will be associated to them: greenstandard LCZ types detected, the standard colors will be associated to them: greystandard LCZ types detected, the standard colors will be associated to them: burlywoodstandard LCZ types detected, the standard colors will be associated to them: bluestandard LCZ types detected, the standard colors will be associated to them: ghostwhite
#> typeLevels before trying to group are redtypeLevels before trying to group are blacktypeLevels before trying to group are greentypeLevels before trying to group are greytypeLevels before trying to group are burlywoodtypeLevels before trying to group are bluetypeLevels before trying to group are #6406a3
#> One vector of levels, one vector of colors, either the same length (case 9: and 10:), or colors longer (case 12:, unused colors were dropped),
#>          reduced to  6: A single vector was provided, whose names don't cover the levels in the data, 
#>       missing levels were assigned random colors.
#> As useStandCol is set to TRUE, some of the specified colors may have been over-ridden to use standard colors if standard LCZ values have been detected
#> standard LCZ types detected, the standard colors will be associated to them: redstandard LCZ types detected, the standard colors will be associated to them: blackstandard LCZ types detected, the standard colors will be associated to them: greenstandard LCZ types detected, the standard colors will be associated to them: greystandard LCZ types detected, the standard colors will be associated to them: burlywoodstandard LCZ types detected, the standard colors will be associated to them: bluestandard LCZ types detected, the standard colors will be associated to them: ghostwhite
path <- paste0(system.file("extdata/", package = "lczexplore"), "/groupedComparison.png")
knitr::include_graphics(path, error=FALSE)

A little cheat is possible ! You can try to group and compare on-the-fly with tryGroup=TRUE. The syntax is then as shown in the nex code chunk.

comparisonGrouped <- compareLCZ(sf1 = redonBDT, column1 = "LCZ_PRIMARY", wf1 = "groupedBDT",
                                sf2 = redonOSM, column2 = "LCZ_PRIMARY", wf2 = "groupedOSM",
                                repr = "alter", ref = 2, saveG = "", exwrite = FALSE, location = "Redon", plot = TRUE,
                                urban = c("1", "2", "3", "4", "5", "6", "7", "8", "9"),
                                industry = "10",
                                vegetation = c("101", "102", "103", "104"),
                                impervious = "105", pervious = "106", water = "107",
                                colors = c("red", "black", "green", "grey", "burlywood", "blue"), tryGroup = TRUE)
#>  The column  LCZ_PRIMARY  of the dataset sf1 is the reference against which the  LCZ_PRIMARY  column of the dataset  sf2 will be compared.
#> Both sf datasets need to live in the same crs projection (srid / epsg),
#> they will be coerced to the specified reference (sf2)
#> Level names in your 1st dataset didn't match original data.
#>       As tryGroup=TRUE, the function groupLCZ will try to create a "grouped" column with level names and levels specified in (...).
#>       If this doesn't work, compareLCZ function may fail.
#> Grouping
#> One of the specified levels to group doesn't exist in the data, if it is a mispelled level of the data,
#>               this level will be kept as ungroupedsimpleWarning: Unknown levels in `f`: 1, 4, 5, 7, 10, 103, 106
#> Warning: Unknown levels in `f`: 1, 4, 5, 7, 10, 103, 106
#> As tryGroup=TRUE, the function groupLCZ will try to create a "grouped" column with level names and levels specified in (...).
#>       If this doesn't work, compareLCZ function may fail.
#> Grouping
#> One of the specified levels to group doesn't exist in the data, if it is a mispelled level of the data,
#>               this level will be kept as ungroupedsimpleWarning: Unknown levels in `f`: 1, 3, 4, 7, 10, 103, 106
#> Warning: Unknown levels in `f`: 1, 3, 4, 7, 10, 103, 106
#> Warning: attribute variables are assumed to be spatially constant throughout
#> all geometries
#> typeLevels before trying to group are redtypeLevels before trying to group are blacktypeLevels before trying to group are greentypeLevels before trying to group are greytypeLevels before trying to group are burlywoodtypeLevels before trying to group are bluetypeLevels before trying to group are #e59f79
#> Level names in your 1st dataset didn't match original data.
#>       As tryGroup=TRUE, the function groupLCZ will try to create a "grouped" column with level names and levels specified in (...).
#>       If this doesn't work, compareLCZ function may fail.
#> Grouping
#> One of the specified levels to group doesn't exist in the data, if it is a mispelled level of the data,
#>               this level will be kept as ungroupedsimpleWarning: Unknown levels in `f`: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 101, 102, 103, 104, 105, 106, 107
#> Warning: Unknown levels in `f`: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 101, 102, 103,
#> 104, 105, 106, 107
#> Case 14: with at least a color or 15:, or 17: or 18:, then reduced to  Case one vector of levels, one of colors, the vector of colors being shorter, some colors were picked, case 11:, reduced to  4: & 5: A single vector was provided, whose names cover the levels in the data (values are expected to be colors). your may want to check your vector of colors
#> As useStandCol is set to TRUE, some of the specified colors may have been over-ridden to use standard colors if standard LCZ values have been detected
#> standard LCZ types detected, the standard colors will be associated to them: redstandard LCZ types detected, the standard colors will be associated to them: blackstandard LCZ types detected, the standard colors will be associated to them: greenstandard LCZ types detected, the standard colors will be associated to them: greystandard LCZ types detected, the standard colors will be associated to them: burlywoodstandard LCZ types detected, the standard colors will be associated to them: blue
#> typeLevels before trying to group are redtypeLevels before trying to group are blacktypeLevels before trying to group are greentypeLevels before trying to group are greytypeLevels before trying to group are burlywoodtypeLevels before trying to group are bluetypeLevels before trying to group are #ea9fc3
#> Level names in your 1st dataset didn't match original data.
#>       As tryGroup=TRUE, the function groupLCZ will try to create a "grouped" column with level names and levels specified in (...).
#>       If this doesn't work, compareLCZ function may fail.
#> Grouping
#> One of the specified levels to group doesn't exist in the data, if it is a mispelled level of the data,
#>               this level will be kept as ungroupedsimpleWarning: Unknown levels in `f`: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 101, 102, 103, 104, 105, 106, 107
#> Warning: Unknown levels in `f`: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 101, 102, 103,
#> 104, 105, 106, 107
#> Case 14: with at least a color or 15:, or 17: or 18:, then reduced to  Case one vector of levels, one of colors, the vector of colors being shorter, some colors were picked, case 11:, reduced to  4: & 5: A single vector was provided, whose names cover the levels in the data (values are expected to be colors). your may want to check your vector of colors
#> As useStandCol is set to TRUE, some of the specified colors may have been over-ridden to use standard colors if standard LCZ values have been detected
#> standard LCZ types detected, the standard colors will be associated to them: redstandard LCZ types detected, the standard colors will be associated to them: blackstandard LCZ types detected, the standard colors will be associated to them: greenstandard LCZ types detected, the standard colors will be associated to them: greystandard LCZ types detected, the standard colors will be associated to them: burlywoodstandard LCZ types detected, the standard colors will be associated to them: blue

Output data for further analysis

CompareLCZoutputs a list called matConfOut which contains:

At last: it exWrite=TRUE the data are exported to a .csv file whose name is created from the argument wf1 and wf2. It can then be loaded for further analysis.

comparisonGrouped$percAgg
#>    percAgg
#>      <num>
#> 1:      88
comparisonGrouped$areas
#> Key: <marginLevels>
#>    marginLevels percArea1 percArea2
#>          <char>     <num>     <num>
#> 1:   impervious  2.414980  3.688181
#> 2:     industry  0.000000  0.000000
#> 3:     pervious  0.000000  0.000000
#> 4:        urban 43.439778 48.332730
#> 5:   vegetation 51.175625 45.145563
#> 6:        water  2.969616  2.833526

Sensitivity of the agreement to the confidence value

Some algorithm may provide a confidence value associated to the LCZ type. For instance, GeoClimate, for a given geometry, chooses the LCZ type according to a distance to a hypercube defining each LCZ type (in a space defined by the urban canopy parameters)?. Therefore, GeoClimate assigns the geometry to the closest type, but another type may have been quite close too. GeoClimate supplies a uniqueness value, between 0 and 1. The closer it is to 1, the less the second LCZ type was a good candidate. So this uniqueness can be seen as a confidence value.

Import the necessary data: LCZ type, but also confidence.

When using the importLCZvect function one needs to specify the confidence value associated to the LCZ (confid argument). On can also set the name of the geometry identifier (geomID argument ).

dirPath <- system.file("extdata/multipleWfs/Redon", package = "lczexplore")

redonOSM <- importLCZvect(dirPath = dirPath, file = "osm_lcz.fgb", column = "LCZ_PRIMARY", geomID = "ID_RSU", confid = "LCZ_UNIQUENESS_VALUE")

redonBDT <- importLCZvect(dirPath = dirPath, file = "bdt_lcz.fgb", column = "LCZ_PRIMARY", geomID = "ID_RSU", confid = "LCZ_UNIQUENESS_VALUE")

redonCompare <- compareLCZ(sf1 = redonBDT, wf1 = "bdt", geomID1 = "ID_RSU", column1 = "LCZ_PRIMARY",
                           confid1 = "LCZ_UNIQUENESS_VALUE",
                           sf2 = redonOSM, wf2 = "osm", geomID2 = "ID_RSU", column2 = "LCZ_PRIMARY", confid2 = "LCZ_UNIQUENESS_VALUE",
                           exwrite = FALSE, plot = FALSE)
#>  The column  LCZ_PRIMARY  of the dataset sf1 is the reference against which the  LCZ_PRIMARY  column of the dataset  sf2 will be compared.
#> Both sf datasets need to live in the same crs projection (srid / epsg),
#> they will be coerced to the specified reference (sf1)
#> Warning: attribute variables are assumed to be spatially constant throughout
#> all geometries
#> Plot set to FALSE, no plots created

The function confidSensib performs the sensitivity analysis from the output of compareLCZ.

NOTE: if the two data sets to compare have the same column names, the compareLCZ function will concatenate a “.1” string to the column names of the second file, so the enriched names will be the ones to feed confidSensib.

The question we want to answer is: Does the agreement between the two classification gets bigger if we keep only the geometries for which the LCZ value is associated to a confidence value bigger than a thershold?

The span of the confidence values is divided on as many points as the user chooses with the argument nPoints

For each of these thresholds, the function only keeps the reference spatial units (RSU, i.e. the geometries) for which the confidence value is higher than the threshold. Then it computes the agreement between the classifications based on these geoms.

names(redonCompare$data)
#> [1] "ID_RSU"                 "bdt"                    "LCZ_UNIQUENESS_VALUE"  
#> [4] "ID_RSU.1"               "osm"                    "LCZ_UNIQUENESS_VALUE.1"
#> [7] "area"                   "location"               "agree"
confidRedon <- confidSensib(inputDf = redonCompare$data, filePath = "", nPoints = 10,
                            wf1 = "bdtopo_2_2", wf2 = "osm",
                            geomID1 = "ID_RSU", column1 = "bdt", confid1 = "LCZ_UNIQUENESS_VALUE",
                            geomID2 = "ID_RSU.1", column2 = "osm", confid2 = "LCZ_UNIQUENESS_VALUE.1",
                            sep = ";", repr = "standard",
                            plot = TRUE, saveG = system.file("extdata/", package = "lczexplore"))
#> Warning in geom_text(aes(x = 0.5, y = NAPercAgr, label = etiquette, vjust = 1.5, : All aesthetics have length 1, but the data has 20 rows.
#> ℹ Please consider using `annotate()` or provide this layer with data containing
#>   a single row.
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_point()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_text()`).
#> Warning in geom_text(aes(x = 0.5, y = NAPercAgr, label = etiquette, vjust = 1.5, : All aesthetics have length 1, but the data has 20 rows.
#> ℹ Please consider using `annotate()` or provide this layer with data containing
#>   a single row.
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_point()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_text()`).
#> Ignoring unknown labels:
#> • size : "1.3"
#> Warning: Removed 4 rows containing missing values or values outside the scale range
#> (`geom_point()`).
#> Warning: Removed 4 rows containing missing values or values outside the scale range
#> (`geom_text()`).
#> Ignoring unknown labels:
#> • size : "1.3"
#> Warning: Removed 4 rows containing missing values or values outside the scale range
#> (`geom_point()`).
#> Removed 4 rows containing missing values or values outside the scale range
#> (`geom_text()`).
path <- paste0(system.file("extdata/GeneralUniquenessSensib",package="lczexplore"), ".png")
knitr::include_graphics(path, error=FALSE)

file.remove(path)
#> Warning in file.remove(path): cannot remove file '.png', reason 'No such file
#> or directory'
#> [1] FALSE

One can see that the agreement between classifications using BDTOPO and OpenStreetMap tends to increase when the confidence of the LCZ we keep increases (except for the open low LCZ !).


knitr::include_graphics("byLCZUniquenessSensib.png", error=FALSE)

These are the main functions of the package, for further use, refer to the man page of each function.

if (file.exists("byLCZUniquenessSensib.png")){file.remove("byLCZUniquenessSensib.png")}
if (file.exists("GeneralUniquenessSensib.png")){file.remove("GeneralUniquenessSensib.png")}
if (file.exists("comparison.png")){file.remove("comparison.png")}