Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Smart_Agro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
28
Issues
28
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TMP-23-236
Smart_Agro
Commits
53423603
Commit
53423603
authored
Sep 07, 2023
by
pramod_a
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated landcover classification & imports
parent
93e23f12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1039 additions
and
2 deletions
+1039
-2
src/landcover_classification.js
src/landcover_classification.js
+1039
-2
No files found.
src/landcover_classification.js
View file @
53423603
var
image
=
L8
.
filterBounds
(
roi
).
filterMetadata
(
'
CLOUD_COVER
'
,
'
less_than
'
,
3
).
filterDate
(
'
2017-01-01
'
,
'
2022-12-31
'
).
map
(
addNDVI
).
median
().
clip
(
roi
);
// Imports
var
roi
=
ee
.
FeatureCollection
(
"
projects/ee-arachchigepramod/assets/Mallawapitiya
"
),
L8
=
ee
.
ImageCollection
(
"
LANDSAT/LC08/C02/T1_TOA
"
),
imageVisParam
=
{
"
opacity
"
:
1
,
"
bands
"
:[
"
B4
"
,
"
B3
"
,
"
B2
"
],
"
min
"
:
0.05755979493260384
,
"
max
"
:
0.13399770930409433
,
"
gamma
"
:
1
},
Urban
=
/* color: #c39038 */
/* shown: false */
ee
.
FeatureCollection
(
[
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.37756762060678
,
7.50467804688886
],
[
80.37967047247446
,
7.506379953159719
],
[
80.37816843542612
,
7.50837968451616
],
[
80.37589392218149
,
7.506933071263599
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
0
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.37984213385141
,
7.501614598819924
],
[
80.38258871588266
,
7.502933586049754
],
[
80.38044294867075
,
7.5059119295992085
],
[
80.37821135077036
,
7.504507855895472
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
1
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.38043457376821
,
7.49797536471096
],
[
80.38356739389761
,
7.500826097869688
],
[
80.38159328806265
,
7.501889799488326
],
[
80.3786321293102
,
7.49989003829444
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
2
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.40465528664359
,
7.506555415708568
],
[
80.4079168528057
,
7.5085551462579625
],
[
80.40753061470755
,
7.509618828972604
],
[
80.40371114907035
,
7.50829986201914
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
3
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.41849898513274
,
7.518272487104088
],
[
80.42098807509856
,
7.519463784919489
],
[
80.42043017562347
,
7.5218463707412155
],
[
80.41725444014983
,
7.5203998023379475
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
4
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.38816749009881
,
7.499294225419153
],
[
80.38932620439324
,
7.499549514943382
],
[
80.387480844591
,
7.503549031270073
],
[
80.38640796098504
,
7.502825717210849
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
5
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39001284990105
,
7.498698549280314
],
[
80.39593516740594
,
7.500485575251061
],
[
80.39593516740594
,
7.501251441277919
],
[
80.38979827317986
,
7.50001754534888
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
6
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.40636359605584
,
7.49717475774681
],
[
80.4074364796618
,
7.497727887553273
],
[
80.40674983415398
,
7.49930217623253
],
[
80.40537654313836
,
7.498578855113949
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
7
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.38359642977319
,
7.477189105780908
],
[
80.38844586367212
,
7.476678500390994
],
[
80.38810254091821
,
7.481146277300039
],
[
80.38290978426538
,
7.480678226625845
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
8
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3795623874148
,
7.4731467967628555
],
[
80.3830385302981
,
7.475912591186401
],
[
80.38230896944604
,
7.480593126449322
],
[
80.38054944033227
,
7.479231521367915
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
9
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.40235043520532
,
7.47833796572456
],
[
80.40548325533472
,
7.481103727259492
],
[
80.40355206484399
,
7.484039670320864
],
[
80.40080548281274
,
7.4813590274405
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
10
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39037705416284
,
7.472508534023897
],
[
80.39205075258813
,
7.472636186646294
],
[
80.39029122347436
,
7.477018904050629
],
[
80.38737298006616
,
7.476252995443206
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
11
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39239407534204
,
7.475223083935674
],
[
80.39372445101343
,
7.4731806495973
],
[
80.39883137697778
,
7.475648589887144
],
[
80.39745808596216
,
7.477776113424219
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
12
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.40084839815698
,
7.478456918766215
],
[
80.3987455462893
,
7.477010206145262
],
[
80.39977551455102
,
7.47488267887596
],
[
80.40217877382837
,
7.476712352951669
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
13
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.38344304227621
,
7.481254194218628
],
[
80.38593213224203
,
7.481509494311585
],
[
80.38636128568442
,
7.482530693189511
],
[
80.38382928037436
,
7.483041291732009
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
14
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.38155476712973
,
7.4819349941345585
],
[
80.38013856076986
,
7.480403192829864
],
[
80.38061062955649
,
7.479296888543326
],
[
80.3821984972933
,
7.48053084314398
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
15
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39258401059897
,
7.493527234186372
],
[
80.39103905820639
,
7.492591158919197
],
[
80.39189736509115
,
7.489399978120594
],
[
80.39198319577963
,
7.487144862931898
],
[
80.39198319577963
,
7.4856981791214645
],
[
80.39391438627035
,
7.485485431097446
],
[
80.39314191007406
,
7.488123499258017
],
[
80.39451520108969
,
7.488378795329596
],
[
80.39481560849936
,
7.490676453244556
],
[
80.39266984128744
,
7.491272140356107
],
[
80.39279858732016
,
7.492889001267861
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
16
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3993200685386
,
7.470888892575084
],
[
80.40000671404641
,
7.469484706061449
],
[
80.40056461352151
,
7.47093144361112
],
[
80.39910549181741
,
7.472420727261291
],
[
80.39734596270364
,
7.470718688389531
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
17
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3987621690635
,
7.4691321187751525
],
[
80.39768928545755
,
7.46811088856188
],
[
80.39983505266946
,
7.466153523983991
],
[
80.40142292040628
,
7.467174758770277
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
18
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.37559197914979
,
7.517928409540005
],
[
80.37499116433045
,
7.5170349333250615
],
[
80.37254498970887
,
7.516694560950037
],
[
80.3733603812494
,
7.515971268767265
],
[
80.37550614846131
,
7.516481828080165
],
[
80.37645028603455
,
7.51724766592395
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
19
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.4103911528053
,
7.515077788525345
],
[
80.40798789352796
,
7.514056665998201
],
[
80.40622836441419
,
7.5105252654219
],
[
80.40841704697034
,
7.509163753920058
],
[
80.41232234329603
,
7.511291113767252
],
[
80.41137820572278
,
7.513248275628482
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
20
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.40017730087659
,
7.511078378251159
],
[
80.40129309982679
,
7.509844510204109
],
[
80.40318137497327
,
7.509929604664655
],
[
80.40391093582532
,
7.510823095494361
],
[
80.40313845962903
,
7.512142054790181
],
[
80.40112143844983
,
7.512354789785529
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
21
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.41897422165296
,
7.52128956549645
],
[
80.41627055496595
,
7.522608493000832
],
[
80.41605597824476
,
7.520693919503048
],
[
80.41455394119642
,
7.520651373329393
],
[
80.41489726395032
,
7.517715677274655
],
[
80.41760093063733
,
7.517545491387318
],
[
80.417901338047
,
7.515886175490089
],
[
80.41884547562024
,
7.514397040440636
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
22
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.4153264173927
,
7.515673442224188
],
[
80.41511184067151
,
7.516481828080165
],
[
80.41399604172132
,
7.516141455271593
],
[
80.41433936447523
,
7.514184306445358
],
[
80.41562682480237
,
7.513929025513511
],
[
80.41695720047376
,
7.51380138499133
],
[
80.41888839096448
,
7.514397040440636
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
23
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.37679702226384
,
7.5074588565808575
],
[
80.37456542436345
,
7.507288666675805
],
[
80.3747370857404
,
7.5050761918482465
],
[
80.37748366777166
,
7.50469326237001
],
[
80.3795436042951
,
7.506097335475165
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
24
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.37822418196315
,
7.497057436738408
],
[
80.37818126661891
,
7.493823739860242
],
[
80.37959747297877
,
7.49467471505093
],
[
80.38217239363307
,
7.496461757538883
],
[
80.38436107618922
,
7.497057436738408
],
[
80.38689308149928
,
7.497312727574439
],
[
80.38762264235133
,
7.4996103383615935
],
[
80.38573436720485
,
7.49875937281744
],
[
80.3835456846487
,
7.498036050796867
],
[
80.37989788038844
,
7.4960362718974185
],
[
80.38011245710963
,
7.497908405609651
],
[
80.37856750471705
,
7.497780760385008
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
25
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.4198177558393
,
7.522935302531224
],
[
80.4212768775434
,
7.523998950022826
],
[
80.4205902320356
,
7.5255305978289275
],
[
80.4189165336103
,
7.5249775034117325
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
26
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.38991903427961
,
7.536652463007537
],
[
80.39099191788557
,
7.537673532334563
],
[
80.39000486496809
,
7.538949865607364
],
[
80.38876031998518
,
7.538141521638122
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
27
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39900342548599
,
7.486398509396796
],
[
80.40093461597671
,
7.48810048711794
],
[
80.40016213978042
,
7.489589712172777
],
[
80.3971151503395
,
7.4881430364758375
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
28
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.38359954418337
,
7.477310765339588
],
[
80.3862173801819
,
7.475310891375485
],
[
80.38952186168825
,
7.476629958210031
],
[
80.3899080997864
,
7.479736132109115
],
[
80.38793399395144
,
7.481735985797182
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
29
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.38291289867556
,
7.4807573351376
],
[
80.38231208385622
,
7.480502034604517
],
[
80.38299872936403
,
7.476332104757019
],
[
80.38467242778933
,
7.476374655262755
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
30
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.38981777222368
,
7.462903365001763
],
[
80.39110523255083
,
7.462520398495611
],
[
80.3906331637642
,
7.464945847371106
],
[
80.39007526428911
,
7.4649883989856844
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
31
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39682971378043
,
7.487792162857112
],
[
80.3936539783068
,
7.484643496622602
],
[
80.39665805240348
,
7.483281904182501
],
[
80.39837466617301
,
7.48175010760696
],
[
80.40146457095817
,
7.482941505408324
],
[
80.40292369266227
,
7.485494489738959
],
[
80.40163623233512
,
7.487621965263626
]]]),
{
"
Class
"
:
1
,
"
system:index
"
:
"
32
"
})]),
Forest
=
/* color: #0d8b09 */
/* shown: false */
ee
.
FeatureCollection
(
[
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39718843334867
,
7.53929086345367
],
[
80.39530015820219
,
7.5377592642811
],
[
80.3954289042349
,
7.535504400084948
],
[
80.39693094128324
,
7.5324837145588965
],
[
80.39881921642973
,
7.5296331891870025
],
[
80.3994629465933
,
7.533249524149979
],
[
80.3985617243643
,
7.53605748106879
],
[
80.39808965557768
,
7.538312342385076
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
0
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.41462359482736
,
7.532167800476858
],
[
80.41286406571359
,
7.529785271357399
],
[
80.4106324678132
,
7.5310190827151064
],
[
80.408615446634
,
7.531912530126272
],
[
80.40818629319162
,
7.529402363670225
],
[
80.40921626145334
,
7.526807091542837
],
[
80.41110453659982
,
7.525530722503274
],
[
80.41243491227121
,
7.523956528848024
],
[
80.40998873764963
,
7.521701592849616
],
[
80.40908751542062
,
7.519701922821432
],
[
80.40505347306222
,
7.517914975852673
],
[
80.40831503922433
,
7.514553793770527
],
[
80.41239199692697
,
7.516681127224538
],
[
80.41595397049875
,
7.524041620543014
],
[
80.41462359482736
,
7.526807091542837
],
[
80.4155677324006
,
7.529444908985498
],
[
80.41603980118722
,
7.531444534093003
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
1
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.41106539543124
,
7.538321128322193
],
[
80.40939169700594
,
7.537768050229436
],
[
80.4130395012662
,
7.534236842677603
],
[
80.4150565224454
,
7.533726304264064
],
[
80.41625815208407
,
7.531726689685224
],
[
80.41612940605135
,
7.530280154238089
],
[
80.4185326653287
,
7.530280154238089
],
[
80.41930514152499
,
7.53232232052476
],
[
80.41836100395174
,
7.534066663273278
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
2
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39862937902278
,
7.5163466815874305
],
[
80.39609737371272
,
7.515708482153888
],
[
80.39343662236995
,
7.515580842154642
],
[
80.39262123082942
,
7.513581143935751
],
[
80.39017505620784
,
7.513751331376625
],
[
80.39210624669856
,
7.51034756989296
],
[
80.39296455358333
,
7.509156247075029
],
[
80.39064712499446
,
7.50473130516862
],
[
80.39099044774836
,
7.502178433588458
],
[
80.39330787633723
,
7.500731799710177
],
[
80.39596862768
,
7.501497665303678
],
[
80.39648361181086
,
7.500646703449909
],
[
80.39300746892756
,
7.499200064479623
],
[
80.39330787633723
,
7.498349098133372
],
[
80.3979856488592
,
7.496136577848142
],
[
80.40013141607112
,
7.498136356286867
],
[
80.40249176000422
,
7.499029871343483
],
[
80.40073223089045
,
7.500816895953806
],
[
80.40197677587336
,
7.501838049579219
],
[
80.40360755895442
,
7.501242376922286
],
[
80.40523834203547
,
7.500944540288021
],
[
80.4062683102972
,
7.502348625493216
],
[
80.40652580236262
,
7.503752706167035
],
[
80.40523834203547
,
7.505752449605347
],
[
80.4036933896429
,
7.50736925672615
],
[
80.40171928380794
,
7.506390663660675
],
[
80.39961643194026
,
7.505156782308641
],
[
80.39794273351497
,
7.505497163720944
],
[
80.3976423261053
,
7.506518306359336
],
[
80.3987581250555
,
7.507113971790979
],
[
80.39867229436702
,
7.508007468408289
],
[
80.39828605626887
,
7.509241341670315
],
[
80.39777107213801
,
7.51034756989296
],
[
80.39742774938411
,
7.511453795299808
],
[
80.39815731023616
,
7.511666530632129
],
[
80.39867229436702
,
7.510517758600382
],
[
80.39914436315364
,
7.508900963189236
],
[
80.4005605695135
,
7.508262752818809
],
[
80.40219135259456
,
7.508986057834496
],
[
80.39983100866145
,
7.510517758600382
],
[
80.39983100866145
,
7.51183671882299
],
[
80.40090389226741
,
7.512730205731352
],
[
80.40026016210383
,
7.5143044400989485
],
[
80.39953060125178
,
7.515240468639896
],
[
80.39892978643245
,
7.515836122115631
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
3
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.40125020949067
,
7.543150261107549
],
[
80.40009149519624
,
7.542001572478546
],
[
80.40026315657319
,
7.541023057537749
],
[
80.40155061690034
,
7.540129628920596
],
[
80.400949802081
,
7.53915110974788
],
[
80.39944776503266
,
7.539959451832046
],
[
80.39888986555756
,
7.539236198459395
],
[
80.3998340031308
,
7.538598032715356
],
[
80.39910444227876
,
7.537917321551594
],
[
80.39919027296723
,
7.536896252799423
],
[
80.40009149519624
,
7.536513351396629
],
[
80.40163644758881
,
7.537406787476471
],
[
80.40288099257172
,
7.538683121535583
],
[
80.4038680454892
,
7.538980932274661
],
[
80.40434011427583
,
7.539576553138221
],
[
80.40627130476655
,
7.539236198459395
],
[
80.4075587650937
,
7.539278742808887
],
[
80.40725835768403
,
7.540214717439776
],
[
80.40665754286469
,
7.540937969177482
],
[
80.40691503493012
,
7.542086660629698
],
[
80.40597089735688
,
7.5417037638177185
],
[
80.40391096083344
,
7.540852880800473
],
[
80.40279516188325
,
7.541959028396679
],
[
80.40185102431
,
7.542852453237267
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
4
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3705948589848
,
7.435296246023241
],
[
80.36900699124799
,
7.436657987790016
],
[
80.36707580075726
,
7.436785650864084
],
[
80.36797702298627
,
7.434445155274109
],
[
80.36570250974164
,
7.433168516057303
],
[
80.3642004726933
,
7.431806763468832
],
[
80.36256968961224
,
7.429721571636322
],
[
80.36244094357953
,
7.427764035603992
],
[
80.36587417111859
,
7.426572487663041
],
[
80.36698997006879
,
7.428530029002992
],
[
80.36707580075726
,
7.431168440489669
],
[
80.36952197537885
,
7.431849318301138
],
[
80.37128150449261
,
7.432870633039369
],
[
80.37123858914838
,
7.434572818991656
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
5
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.38035094523391
,
7.436685899847204
],
[
80.37781893992386
,
7.434558176615721
],
[
80.3796642997261
,
7.431749566162858
],
[
80.3796642997261
,
7.42906860306851
],
[
80.37859141612014
,
7.427068508836276
],
[
80.38193881297073
,
7.427834503447539
],
[
80.38434207224807
,
7.428132389880257
],
[
80.38554370188675
,
7.430004814262047
],
[
80.38498580241165
,
7.4323878882975185
],
[
80.38189589762649
,
7.435877366234029
],
[
80.38103759074173
,
7.436430573603929
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
6
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.37627398753128
,
7.427618837400079
],
[
80.37344157481155
,
7.426554955112997
],
[
80.3741711356636
,
7.424342071708127
],
[
80.37550151133499
,
7.422682401845582
],
[
80.37481486582718
,
7.420809946276404
],
[
80.37511527323684
,
7.41808636031215
],
[
80.37571608805618
,
7.4160011034145885
],
[
80.38412749552688
,
7.4217887308637245
],
[
80.37992179179153
,
7.423065403139063
],
[
80.37743270182571
,
7.424554849442609
],
[
80.37773310923538
,
7.426384733708099
],
[
80.37721812510452
,
7.427320950619281
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
7
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.40409431236068
,
7.403196220228592
],
[
80.40169105308334
,
7.402004605793402
],
[
80.39911613242904
,
7.402430182747026
],
[
80.39722785728256
,
7.403025989792129
],
[
80.39688453452865
,
7.401408797368435
],
[
80.39362296836654
,
7.399961830700029
],
[
80.39104804771225
,
7.400727872468677
],
[
80.39070472495834
,
7.3985148592856245
],
[
80.39199218528549
,
7.395876252138398
],
[
80.39293632285873
,
7.392641808956854
],
[
80.3952537514476
,
7.390598990530064
],
[
80.39714202659408
,
7.388385926573273
],
[
80.39877280967514
,
7.3883008085074
],
[
80.40486678855697
,
7.387619863390141
],
[
80.40581092613021
,
7.389577577773716
],
[
80.40563926475326
,
7.392301339875244
],
[
80.40203437583725
,
7.392641808956854
],
[
80.40160522239486
,
7.3954506688631145
],
[
80.39911613242904
,
7.394599501081673
],
[
80.39594039695541
,
7.396131601906608
],
[
80.39456710593979
,
7.398089278554785
],
[
80.39757118003646
,
7.398770207527103
],
[
80.40598258750717
,
7.398174394733773
],
[
80.40615424888412
,
7.400557641079496
],
[
80.40572509544174
,
7.403621796032218
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
8
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.37499770896713
,
7.410345839199594
],
[
80.3695903755931
,
7.409409586172616
],
[
80.3666721321849
,
7.406345471447906
],
[
80.36692962425033
,
7.403366450599334
],
[
80.36675796287338
,
7.400812988138637
],
[
80.36761626975814
,
7.398855323574773
],
[
80.37276611106674
,
7.400132062319138
],
[
80.37602767722885
,
7.3991957876011965
],
[
80.37680015342514
,
7.397323232204929
],
[
80.37774429099838
,
7.398855323574773
],
[
80.37937507407943
,
7.40225995201486
],
[
80.37705764549057
,
7.406345471447906
],
[
80.37499770896713
,
7.408898901864768
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
9
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.41192687316115
,
7.428831994890855
],
[
80.40694869322951
,
7.428236222771958
],
[
80.40523207945998
,
7.427555339361365
],
[
80.40420211119826
,
7.425427571904843
],
[
80.4033438043135
,
7.42278912595674
],
[
80.40205634398635
,
7.420150664179387
],
[
80.40342963500197
,
7.418959095608978
],
[
80.40720618529494
,
7.4197251043461145
],
[
80.41055358214552
,
7.421001782610935
],
[
80.41149771971877
,
7.423044460127471
],
[
80.41338599486525
,
7.42483179517142
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
10
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39302230316272
,
7.455546024497666
],
[
80.39096236663929
,
7.450780115114821
],
[
80.38752913910022
,
7.453077970755973
],
[
80.38478255706897
,
7.455120498982922
],
[
80.38203597503772
,
7.45384391995749
],
[
80.3806626840221
,
7.449418417195682
],
[
80.38031936126819
,
7.446780115436347
],
[
80.38280845123401
,
7.443120509288624
],
[
80.38804412323108
,
7.442269433714263
],
[
80.39036155181995
,
7.4464396882461035
],
[
80.39216399627796
,
7.45026947889107
],
[
80.39319396453968
,
7.452482231562026
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
11
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3888715342368
,
7.516527692421663
],
[
80.38947234905613
,
7.519250664996914
],
[
80.3892148569907
,
7.522824540579057
],
[
80.38818488872899
,
7.524526375748311
],
[
80.3862966135825
,
7.522313988726504
],
[
80.38277755535496
,
7.520527052511962
],
[
80.37882934368504
,
7.519250664996914
],
[
80.38114677227391
,
7.516868064927484
],
[
80.38355003155125
,
7.516782971826029
],
[
80.38166175640477
,
7.514485451784347
],
[
80.38312087810887
,
7.512017731536599
],
[
80.38475166118992
,
7.508188482716743
],
[
80.3862966135825
,
7.505976012467731
],
[
80.3903306559409
,
7.508613956473823
],
[
80.38990150249852
,
7.513549421616368
],
[
80.38904319561375
,
7.515336386550311
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
12
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.40534574469513
,
7.496840504362403
],
[
80.39950925787872
,
7.495564047301014
],
[
80.39856512030548
,
7.494202488978113
],
[
80.40071088751739
,
7.492755828596319
],
[
80.4028566547293
,
7.492160143513289
],
[
80.40405828436798
,
7.493521708220481
],
[
80.40766317328399
,
7.492500535089044
]]]),
{
"
Class
"
:
2
,
"
system:index
"
:
"
13
"
})]),
Water
=
/* color: #3c61dd */
/* shown: false */
ee
.
FeatureCollection
(
[
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3847375204623
,
7.470098839326777
],
[
80.3832783987582
,
7.46937546977237
],
[
80.38345006013515
,
7.468311688840748
],
[
80.38177636170985
,
7.466992596889807
],
[
80.38229134584071
,
7.46805638103188
],
[
80.38100388551356
,
7.467588316328323
],
[
80.37894394899013
,
7.467290456710544
],
[
80.37774231935146
,
7.467758521733072
],
[
80.37688401246669
,
7.468184034954958
],
[
80.37619736695888
,
7.466567082508138
],
[
80.37559655213954
,
7.465205433703684
],
[
80.37551072145106
,
7.4644395043877445
],
[
80.37615445161464
,
7.46465226266563
],
[
80.37692692781093
,
7.4662692221945415
],
[
80.37855771089198
,
7.466694736866125
],
[
80.37950184846522
,
7.466396876639486
],
[
80.38117554689052
,
7.465928810159068
],
[
80.38259175325038
,
7.466184119210504
],
[
80.38400795961024
,
7.466694736866125
],
[
80.38422253633144
,
7.467673419038973
],
[
80.383965044266
,
7.468779752769662
],
[
80.38426545167567
,
7.46937546977237
]]]),
{
"
Class
"
:
3
,
"
system:index
"
:
"
0
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.37834313417079
,
7.463801228933003
],
[
80.37718441987636
,
7.464269297690902
],
[
80.37568238282802
,
7.463843780658965
],
[
80.37495282197597
,
7.462482123374707
],
[
80.3749957373202
,
7.461588533478267
],
[
80.3761115362704
,
7.460992805866577
],
[
80.37744191194179
,
7.460822597828546
],
[
80.37885811830165
,
7.462950193544313
]]]),
{
"
Class
"
:
3
,
"
system:index
"
:
"
1
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3784718802035
,
7.466354325161976
],
[
80.37735608125331
,
7.4660990162099266
],
[
80.37658360505702
,
7.465077778910863
],
[
80.37658360505702
,
7.4645671593668945
],
[
80.3784718802035
,
7.464056539226687
],
[
80.37997391725185
,
7.464013987521425
],
[
80.38066056275966
,
7.4649501240807785
],
[
80.38083222413661
,
7.465716052502307
],
[
80.37894394899013
,
7.4660990162099266
]]]),
{
"
Class
"
:
3
,
"
system:index
"
:
"
2
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3744497709594
,
7.459961310533398
],
[
80.37522224715569
,
7.460386831342002
],
[
80.37453560164788
,
7.461152767754611
]]]),
{
"
Class
"
:
3
,
"
system:index
"
:
"
3
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.37307647994378
,
7.459961310533398
],
[
80.37419227889397
,
7.459365580706172
],
[
80.37436394027092
,
7.46089745576606
]]]),
{
"
Class
"
:
3
,
"
system:index
"
:
"
4
"
})]),
Agriculture
=
/* color: #51ff2e */
/* shown: false */
ee
.
FeatureCollection
(
[
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.37107699500548
,
7.425741207684368
],
[
80.36790125953185
,
7.423783653925204
],
[
80.36644213782775
,
7.421400533238921
],
[
80.36652796851622
,
7.417400265920231
],
[
80.36901705848204
,
7.414165980653316
],
[
80.3724502860211
,
7.413910641330786
],
[
80.3735660849713
,
7.419357848088416
],
[
80.37227862464415
,
7.424379432078884
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
0
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.40466635789379
,
7.407494197053822
],
[
80.39805739488109
,
7.40579190632727
],
[
80.39779990281566
,
7.403919378935252
],
[
80.40037482346996
,
7.403153342709968
],
[
80.40561049546703
,
7.404259839052633
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
1
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.37478256331839
,
7.446145678565889
],
[
80.37315178023734
,
7.447932919563812
],
[
80.37203598128714
,
7.444358430281634
],
[
80.37229347335257
,
7.440783911860969
],
[
80.3754692088262
,
7.438230666585313
],
[
80.37709999190726
,
7.440358372013462
],
[
80.37607002364554
,
7.443932893902102
],
[
80.37572670089163
,
7.445464822935711
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
2
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3717216355284
,
7.432001397554788
],
[
80.36811674661239
,
7.429448101204323
],
[
80.36949003762801
,
7.4270650112237515
],
[
80.37223661965926
,
7.428086337083541
],
[
80.37524069375594
,
7.429958761661571
],
[
80.37309492654403
,
7.431660958898848
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
3
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39146269387801
,
7.443065510163365
],
[
80.38871611184676
,
7.441788896022485
],
[
80.3852828843077
,
7.441022925754525
],
[
80.38287962503036
,
7.43983141379056
],
[
80.3823646408995
,
7.437533488722974
],
[
80.38425291604598
,
7.434810006397095
],
[
80.38734282083114
,
7.434469569918398
],
[
80.38811529702743
,
7.4374483801560585
],
[
80.38940275735457
,
7.439235656595157
],
[
80.39172018594344
,
7.4409378178644054
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
4
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3649372683412
,
7.408047009887821
],
[
80.36691137417615
,
7.408813037608658
],
[
80.36991544827283
,
7.410259975225483
],
[
80.37317701443494
,
7.410940885400776
],
[
80.37609525784315
,
7.410855771686424
],
[
80.37558027371229
,
7.412387816028384
],
[
80.37206121548475
,
7.4128984962914295
],
[
80.36862798794569
,
7.412132475674806
],
[
80.36450811489881
,
7.410089747517198
],
[
80.36356397732557
,
7.408047009887821
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
5
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3879396537616
,
7.468822463352727
],
[
80.38545056379579
,
7.466269381537125
],
[
80.38476391828797
,
7.462780145611729
],
[
80.38622303999207
,
7.459375986176923
],
[
80.38854046858094
,
7.456567534707037
],
[
80.39137288130067
,
7.459886611780635
],
[
80.38939877546571
,
7.4631205600982655
],
[
80.38896962202332
,
7.467205513267582
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
6
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39403363264344
,
7.47026920309493
],
[
80.39128705061219
,
7.468311848182594
],
[
80.39120121992372
,
7.465758763384726
],
[
80.39223118818543
,
7.462354627130999
],
[
80.3927461723163
,
7.459801507554731
],
[
80.39643689192079
,
7.462439730860253
],
[
80.39540692365907
,
7.4648226285565356
],
[
80.39334698713563
,
7.467120410465827
],
[
80.3927461723163
,
7.469588384989343
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
7
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.40130577403967
,
7.53242888298943
],
[
80.40001831371252
,
7.532343792940543
],
[
80.40053329784338
,
7.530386717204904
],
[
80.40027580577795
,
7.528599814250303
],
[
80.39881668407385
,
7.526897995065116
],
[
80.39941749889319
,
7.525111077732485
],
[
80.40242157298987
,
7.524515436985562
],
[
80.40388069469397
,
7.525876900348016
],
[
80.40542564708655
,
7.5285147234496845
],
[
80.40636978465979
,
7.530046355305278
],
[
80.40456734020178
,
7.530982349886108
],
[
80.40199241954748
,
7.531577981748725
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
8
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3770156892008
,
7.532088522693656
],
[
80.3766723664469
,
7.531067440202327
],
[
80.37890396434729
,
7.5307270788372636
],
[
80.38139305431311
,
7.529961264788608
],
[
80.38405380565588
,
7.529280540053928
],
[
80.38722954112951
,
7.527153268368707
],
[
80.38877449352209
,
7.5248558032268225
],
[
80.39186439830725
,
7.523494336659399
],
[
80.38989029247229
,
7.525621626293089
],
[
80.38877449352209
,
7.527748905492662
],
[
80.39083443004553
,
7.530046355305278
],
[
80.39323768932287
,
7.53242888298943
],
[
80.39229355174963
,
7.53404559074319
],
[
80.39014778453772
,
7.53404559074319
],
[
80.38757286388342
,
7.533109602778932
],
[
80.38697204906408
,
7.532173612792655
],
[
80.3854270966715
,
7.531067440202327
],
[
80.38302383739416
,
7.530471807638066
],
[
80.38182220775549
,
7.531577981748725
],
[
80.37984810192053
,
7.531833252296366
],
[
80.37856064159338
,
7.532003432577926
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
9
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.38328865293254
,
7.538169381241514
],
[
80.38019874814738
,
7.537999203382417
],
[
80.37710884336222
,
7.537743936468369
],
[
80.37384727720011
,
7.538850092008991
],
[
80.37273147824992
,
7.53714831308371
],
[
80.37324646238078
,
7.534170183872754
],
[
80.3742764306425
,
7.5316174853963425
],
[
80.37496307615031
,
7.529830587515653
],
[
80.37642219785441
,
7.531362214721593
],
[
80.37650802854289
,
7.53289383651446
],
[
80.37564972165812
,
7.5348509009262665
],
[
80.37547806028117
,
7.536807956496056
],
[
80.37779548887004
,
7.537063223961867
],
[
80.37813881162394
,
7.535701795738842
],
[
80.38088539365519
,
7.534765811353088
],
[
80.38337448362101
,
7.534510542533227
],
[
80.38534858945597
,
7.536042153195819
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
10
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39273057909499
,
7.4386283920776775
],
[
80.39058481188307
,
7.435138936007124
],
[
80.38895402880202
,
7.432330329268588
],
[
80.3879240605403
,
7.428670602631506
],
[
80.39152894945632
,
7.428074830293788
],
[
80.39513383837233
,
7.430968574081463
],
[
80.39418970079909
,
7.435479371966805
],
[
80.39350305529128
,
7.438202850139733
]]]),
{
"
Class
"
:
4
,
"
system:index
"
:
"
11
"
})]),
BareLand
=
/* color: #c22323 */
/* shown: false */
ee
.
FeatureCollection
(
[
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.39967255374962
,
7.431982338940259
],
[
80.39478020450646
,
7.428918381406104
],
[
80.39083199283654
,
7.426365067140542
],
[
80.38902954837853
,
7.423556404318281
],
[
80.3887720563131
,
7.419300820407646
],
[
80.38834290287072
,
7.417258125509032
],
[
80.39237694522912
,
7.418364586422814
],
[
80.40027336856896
,
7.42347129304358
]]]),
{
"
Class
"
:
5
,
"
system:index
"
:
"
0
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.3816577378091
,
7.412981333976844
],
[
80.37719454200833
,
7.411959973050713
],
[
80.37745203407376
,
7.409321446362934
],
[
80.37951197059719
,
7.40642756021414
],
[
80.38191522987454
,
7.403108079176445
],
[
80.37856783302395
,
7.400129036456573
],
[
80.37882532508938
,
7.3983416011677114
],
[
80.38371767433254
,
7.406512674783857
],
[
80.38363184364407
,
7.409321446362934
],
[
80.38157190712063
,
7.411279064450751
]]]),
{
"
Class
"
:
5
,
"
system:index
"
:
"
1
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.40388471789214
,
7.447544027040481
],
[
80.40045149035308
,
7.448054666440143
],
[
80.39736158556792
,
7.450778066522705
],
[
80.39701826281402
,
7.44796955991485
],
[
80.39444334215972
,
7.445161035309916
],
[
80.39358503527495
,
7.440735444880011
],
[
80.39478666491362
,
7.436820462284073
],
[
80.39667494006011
,
7.434352303135146
],
[
80.40156728930327
,
7.4361395921807025
],
[
80.39993650622222
,
7.4402247969570725
],
[
80.39985067553374
,
7.445161035309916
],
[
80.40311224169585
,
7.445671677485502
]]]),
{
"
Class
"
:
5
,
"
system:index
"
:
"
2
"
}),
ee
.
Feature
(
ee
.
Geometry
.
Polygon
(
[[[
80.36651470033343
,
7.534486218970584
],
[
80.36359645692522
,
7.532699332919651
],
[
80.36411144105608
,
7.528444812665213
],
[
80.36505557862932
,
7.5248709833847585
],
[
80.36557056276018
,
7.5215524012575266
],
[
80.36651470033343
,
7.519510184256377
],
[
80.36728717652971
,
7.5160213746529365
],
[
80.36866046754534
,
7.51295800652498
],
[
80.3709778961342
,
7.508873482088225
],
[
80.37235118714983
,
7.510915749105468
],
[
80.37046291200335
,
7.5199356469240595
],
[
80.3702912506264
,
7.521467309074348
],
[
80.36848880616839
,
7.526232445631144
],
[
80.36737300721819
,
7.533380052284245
]]]),
{
"
Class
"
:
5
,
"
system:index
"
:
"
3
"
})]);
// ------------------------------------ Classification & Algorithm start here ------------------------------------ //
var
image
=
L8
.
filterBounds
(
roi
).
filterMetadata
(
'
CLOUD_COVER
'
,
'
less_than
'
,
3
).
filterDate
(
'
2017-01-01
'
,
'
2022-12-31
'
).
map
(
addNDVI
).
median
().
clip
(
roi
);
var
defaultCenter
=
[
7.878
,
80.703
];
// [latitude, longitude]
var
zoomLevel
=
7
;
// Adjust the zoom level as needed
//var image2 = L7.filterBounds(roi_2).filterMetadata('CLOUD_COVER','less_than',1).filterDate('2019-01-01','2022-12-31')
//var image2 = L7.filterBounds(roi_2).filterMetadata('CLOUD_COVER','less_than',1).filterDate('2019-01-01','2022-12-31')
//var image_3 = S2.filterBounds(roi_2).filterMetadata('CLOUD_COVER','less_than',1).filterDate('2020-01-01','2022-12-31');
//var image_3 = S2.filterBounds(roi_2).filterMetadata('CLOUD_COVER','less_than',1).filterDate('2020-01-01','2022-12-31');
// Set the default map center and zoom level
Map
.
setCenter
(
defaultCenter
[
1
],
defaultCenter
[
0
],
zoomLevel
);
//print(image);
//print(image);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment