landam / grass-gis-git-migration-test

0 stars 0 forks source link

Implemenation of the Pareto Boundary (to support accuracy assessment of low resolution thematic maps) #33

Open landam opened 5 years ago

landam commented 5 years ago

Reported by nikos on 7 Nov 2009 16:43 UTC It would be nice to have an "i.pareto" (?) module in GRASS which will implement the Pareto Boundary.

The Pareto Boundary can be useful for the accuracy assessment of (all kinds of) low resolution dichotomic maps and theoretically even maps with multiple classes. Details can be found in a paper of Boschetti et al. [1].

I've wrote some python and R scripts (attached) for my own use which are (very) far from being (what I call) a generally useful program. I wish some real programmer could implement this within grass (and R).

Thanks, Nikos


[1] Analysis of the conflict between omission and commission in low spatial resolution dichotomic thematic products: The Pareto Boundary Luigi Boschetti, Stephane P. Flasse, Pietro A. Brivio; published in Remote Sensing of Environment 91 (2004) 280 292

Migrated-From: https://trac.osgeo.org/grass/ticket/804

landam commented 5 years ago

Attachment from nikos on 7 Nov 2009 16:44 UTC python scripts and R code for the pareto boyndary https://trac.osgeo.org/grass/attachment/ticket/804/pareto_boundary_grass_python_R_scripts.tar.gz

landam commented 5 years ago

Comment by nikos on 7 Nov 2009 16:56 UTC Testing the scripts within the spearfish60 dataset (warning: too many comments and print-outs):

# testing with spearfish60 data
grass64 /geo/grassdb/spearfish60/user1/

# set region to
g.region s=4925000 e=593500 n=4927000 w=590000 res=30 -p

# use sqlite db-backend
db.connect driver=sqlite
database=/geo/grassdb/spearfish60/PERMANENT/sqlite.db
db.connect -p

### prepare input files

# high resolution reference raster map will be
g.copy rast=landcover.30m,landcover_ref

# high resolution reference Class of Interest (to be assessed) will be (e.g. rangeland)
r.mapcalc "landcover_refcoi = if(landcover.30m ##  51 || landcover.30m 
71 || landcover.30m ##  81 || landcover.30m  92, 2, null())"

# low resolution classification map 1 (to be assessed for accuracy) will
be
g.region res=100 -pa
r.mapcalc "pareto_classification_rangeland_1 = if (vegcover == 2, 2,
null())"

# prepare a 2nd classification map
g.copy
rast=pareto_classification_rangeland_1,pareto_classification_rangeland_2

# edit/ change 2nd map
d.rast.edit pareto_classification_rangeland_2
out=pareto_classification_rangeland_2_edited
g.remove pareto_classification_rangeland_2
g.rename
rast=pareto_classification_rangeland_2_edited,pareto_classification_rangeland_2

### extract omission and commission errors for pareto-optimal maps and
classifications

# step 1
python pareto_1_vectorise_rasters.py reference_raster=landcover_ref \
reference_coi_rasters=landcover_refcoi \
classification_rasters=pareto_classification_rangeland_1,pareto_classification_rangeland_2 --o

# step 2
python pareto_2_create_lowres_vector_grid.py highres=30 lowres=100 --o

# step 3
python pareto_3_count_pixels_within_gridcells.py --v

# step 4
python pareto_4_calculate_coi_percentages.py --v

# step 5
python pareto_5_populate_thresholds_and_classifications.py lowres=100 --v

# step 6
python pareto_6_populate_pareto_errors.py --v

# step 7
python pareto_7_populate_classification_errors.py --v

# step 8
python pareto_8_export_csv___spearfish60.py --o

### use epoxrted csv files to plot the Pareto Boundary (using the R
scripts within R)
landam commented 5 years ago

Modified by @landam on 7 Nov 2009 17:01 UTC

landam commented 5 years ago

Modified by @landam on 12 May 2016 06:44 UTC

landam commented 5 years ago

Modified by @landam on 23 Aug 2016 11:47 UTC

landam commented 5 years ago

Comment by @landam on 27 Aug 2016 13:42 UTC Milestone renamed

landam commented 5 years ago

Comment by neteler on 26 Jan 2018 11:40 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Modified by neteler on 12 Jun 2018 20:48 UTC

landam commented 5 years ago

Comment by @landam on 25 Sep 2018 16:53 UTC All enhancement tickets should be assigned to 7.6 milestone.

landam commented 5 years ago

Comment by @landam on 25 Jan 2019 21:08 UTC Ticket retargeted after milestone closed