├── .idea
├── S1_S2_ARD_code_list.iml
├── inspectionProfiles
│ └── profiles_settings.xml
├── modules.xml
├── vcs.xml
└── workspace.xml
├── CONTRIBUTING.md
├── LICENSE
├── Maintaining.md
├── README.md
├── S1_S2_ARD_authors.txt
├── code
└── geotiffjs_example
│ ├── index.html
│ └── readme.md
└── images
├── All_logos.png
├── Department_for_Environment,_Food_and_Rural_Affairs_logo.svg.png
├── Logos_updated.png
├── ceda_logo_transp_black_1.png
├── contributing
├── 01_fork.png
├── 02_fork.png
└── 03_fork.png
├── fpa-logo-web.jpg
├── logo.png
└── maintaining
├── 01_editing.png
├── 02_editing.png
├── 03_editing.png
├── 04_editing.png
├── 05_downloading.png
├── 06_git_desk.png
├── 07_git_desk.png
├── 08_git_desk.png
├── 09_git_desk.png
├── 10_git_desk.png
├── 11_git_desk.png
├── 12_git_desk.png
├── 13_git_desk.png
├── 14_git_cmd.png
├── 15_git_cmd.png
├── 16_git_cmd.png
├── 17_git_cmd.png
├── 18_git_cmd.png
├── 19_git_cmd.png
├── 20_edit_mk.png
├── 21_version.png
├── 22_version.png
└── 23_version.png
/.idea/S1_S2_ARD_code_list.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | 1598023182650
35 |
36 |
37 | 1598023182650
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 | As a summary the best practice for contributing is to:
3 |
4 | 1. Fork it
5 | 2. Clone it to your local system
6 | 3. Make a new branch
7 | 4. Make your changes
8 | 5. Push it back to your repo
9 | 6. Click the Compare & pull request button
10 | 7. Click Create pull request to open a new pull request
11 |
12 | You will need a [github account](https://github.com/) to contribute. It is assumed you have one and that you have familiarity with git. If you need some reminding then please read through the [maintaining guide](Maintaining.md) first. It will run through editing files all the way to committing them.
13 |
14 | ---
15 |
16 | #### 1. Fork it
17 | In this example (for a different git repo) click on the Fork button to make a copy to your git hub account
18 |
19 | 
20 |
21 | #### 2. Clone it to you local system
22 |
23 | `git clone link` - the 'link' to your accounts fork of this repo
24 |
25 | Inspect it on your system
26 |
27 | #### 3. Make a new branch
28 |
29 | `git checkout -b newbranch` - creates a new branch called newbranch (you can call it anything you like)
30 |
31 | #### 4. Make the changes
32 |
33 | Using a text editor (eg. notepadd++) or IDE (eg. pycharm)
34 |
35 | #### 5. Push it back to your repo
36 |
37 | `git add *` - add the changes to the header
38 |
39 | `git commit -m "a message"` - make a commit statement
40 |
41 | `git checkout master` - working on the master branch again
42 |
43 | `git merge newbranch` - merge the change on the newbranch to the master
44 |
45 | `git push` - push the changes back to orginal
46 |
47 | #### 6. Click the Compare and pull request button
48 | Navigate back to this repo and click on big green button marked "Compare and pull request".
49 |
50 | 
51 |
52 | Now you will be able to (and ideally should) write a note about your pull request. It will also show you the changes you have made.
53 |
54 | #### 7. Click Create pull request to open a new pull request
55 | Review your changes and when you are happy then click the green "Create pull request" button. Now wait for an admin of this repo to respond. They may seek further information before merging.
56 |
57 | 
58 |
59 | ## Maintaining
60 | For a indepth guide to editing and git commands related to this repo please visit [maintaining.md](Maintaining.md). This maybe helpful if you are unfamiliar with git desktop or git command line. The guide also contains links to more detailed documentation
61 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | 395 lines (305 sloc) 18.2 KB
2 | Attribution 4.0 International
3 |
4 | =======================================================================
5 |
6 | Creative Commons Corporation ("Creative Commons") is not a law firm and
7 | does not provide legal services or legal advice. Distribution of
8 | Creative Commons public licenses does not create a lawyer-client or
9 | other relationship. Creative Commons makes its licenses and related
10 | information available on an "as-is" basis. Creative Commons gives no
11 | warranties regarding its licenses, any material licensed under their
12 | terms and conditions, or any related information. Creative Commons
13 | disclaims all liability for damages resulting from their use to the
14 | fullest extent possible.
15 |
16 | Using Creative Commons Public Licenses
17 |
18 | Creative Commons public licenses provide a standard set of terms and
19 | conditions that creators and other rights holders may use to share
20 | original works of authorship and other material subject to copyright
21 | and certain other rights specified in the public license below. The
22 | following considerations are for informational purposes only, are not
23 | exhaustive, and do not form part of our licenses.
24 |
25 | Considerations for licensors: Our public licenses are
26 | intended for use by those authorized to give the public
27 | permission to use material in ways otherwise restricted by
28 | copyright and certain other rights. Our licenses are
29 | irrevocable. Licensors should read and understand the terms
30 | and conditions of the license they choose before applying it.
31 | Licensors should also secure all rights necessary before
32 | applying our licenses so that the public can reuse the
33 | material as expected. Licensors should clearly mark any
34 | material not subject to the license. This includes other CC-
35 | licensed material, or material used under an exception or
36 | limitation to copyright. More considerations for licensors:
37 | wiki.creativecommons.org/Considerations_for_licensors
38 |
39 | Considerations for the public: By using one of our public
40 | licenses, a licensor grants the public permission to use the
41 | licensed material under specified terms and conditions. If
42 | the licensor's permission is not necessary for any reason--for
43 | example, because of any applicable exception or limitation to
44 | copyright--then that use is not regulated by the license. Our
45 | licenses grant only permissions under copyright and certain
46 | other rights that a licensor has authority to grant. Use of
47 | the licensed material may still be restricted for other
48 | reasons, including because others have copyright or other
49 | rights in the material. A licensor may make special requests,
50 | such as asking that all changes be marked or described.
51 | Although not required by our licenses, you are encouraged to
52 | respect those requests where reasonable. More_considerations
53 | for the public:
54 | wiki.creativecommons.org/Considerations_for_licensees
55 |
56 | =======================================================================
57 |
58 | Creative Commons Attribution 4.0 International Public License
59 |
60 | By exercising the Licensed Rights (defined below), You accept and agree
61 | to be bound by the terms and conditions of this Creative Commons
62 | Attribution 4.0 International Public License ("Public License"). To the
63 | extent this Public License may be interpreted as a contract, You are
64 | granted the Licensed Rights in consideration of Your acceptance of
65 | these terms and conditions, and the Licensor grants You such rights in
66 | consideration of benefits the Licensor receives from making the
67 | Licensed Material available under these terms and conditions.
68 |
69 |
70 | Section 1 -- Definitions.
71 |
72 | a. Adapted Material means material subject to Copyright and Similar
73 | Rights that is derived from or based upon the Licensed Material
74 | and in which the Licensed Material is translated, altered,
75 | arranged, transformed, or otherwise modified in a manner requiring
76 | permission under the Copyright and Similar Rights held by the
77 | Licensor. For purposes of this Public License, where the Licensed
78 | Material is a musical work, performance, or sound recording,
79 | Adapted Material is always produced where the Licensed Material is
80 | synched in timed relation with a moving image.
81 |
82 | b. Adapter's License means the license You apply to Your Copyright
83 | and Similar Rights in Your contributions to Adapted Material in
84 | accordance with the terms and conditions of this Public License.
85 |
86 | c. Copyright and Similar Rights means copyright and/or similar rights
87 | closely related to copyright including, without limitation,
88 | performance, broadcast, sound recording, and Sui Generis Database
89 | Rights, without regard to how the rights are labeled or
90 | categorized. For purposes of this Public License, the rights
91 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
92 | Rights.
93 |
94 | d. Effective Technological Measures means those measures that, in the
95 | absence of proper authority, may not be circumvented under laws
96 | fulfilling obligations under Article 11 of the WIPO Copyright
97 | Treaty adopted on December 20, 1996, and/or similar international
98 | agreements.
99 |
100 | e. Exceptions and Limitations means fair use, fair dealing, and/or
101 | any other exception or limitation to Copyright and Similar Rights
102 | that applies to Your use of the Licensed Material.
103 |
104 | f. Licensed Material means the artistic or literary work, database,
105 | or other material to which the Licensor applied this Public
106 | License.
107 |
108 | g. Licensed Rights means the rights granted to You subject to the
109 | terms and conditions of this Public License, which are limited to
110 | all Copyright and Similar Rights that apply to Your use of the
111 | Licensed Material and that the Licensor has authority to license.
112 |
113 | h. Licensor means the individual(s) or entity(ies) granting rights
114 | under this Public License.
115 |
116 | i. Share means to provide material to the public by any means or
117 | process that requires permission under the Licensed Rights, such
118 | as reproduction, public display, public performance, distribution,
119 | dissemination, communication, or importation, and to make material
120 | available to the public including in ways that members of the
121 | public may access the material from a place and at a time
122 | individually chosen by them.
123 |
124 | j. Sui Generis Database Rights means rights other than copyright
125 | resulting from Directive 96/9/EC of the European Parliament and of
126 | the Council of 11 March 1996 on the legal protection of databases,
127 | as amended and/or succeeded, as well as other essentially
128 | equivalent rights anywhere in the world.
129 |
130 | k. You means the individual or entity exercising the Licensed Rights
131 | under this Public License. Your has a corresponding meaning.
132 |
133 |
134 | Section 2 -- Scope.
135 |
136 | a. License grant.
137 |
138 | 1. Subject to the terms and conditions of this Public License,
139 | the Licensor hereby grants You a worldwide, royalty-free,
140 | non-sublicensable, non-exclusive, irrevocable license to
141 | exercise the Licensed Rights in the Licensed Material to:
142 |
143 | a. reproduce and Share the Licensed Material, in whole or
144 | in part; and
145 |
146 | b. produce, reproduce, and Share Adapted Material.
147 |
148 | 2. Exceptions and Limitations. For the avoidance of doubt, where
149 | Exceptions and Limitations apply to Your use, this Public
150 | License does not apply, and You do not need to comply with
151 | its terms and conditions.
152 |
153 | 3. Term. The term of this Public License is specified in Section
154 | 6(a).
155 |
156 | 4. Media and formats; technical modifications allowed. The
157 | Licensor authorizes You to exercise the Licensed Rights in
158 | all media and formats whether now known or hereafter created,
159 | and to make technical modifications necessary to do so. The
160 | Licensor waives and/or agrees not to assert any right or
161 | authority to forbid You from making technical modifications
162 | necessary to exercise the Licensed Rights, including
163 | technical modifications necessary to circumvent Effective
164 | Technological Measures. For purposes of this Public License,
165 | simply making modifications authorized by this Section 2(a)
166 | (4) never produces Adapted Material.
167 |
168 | 5. Downstream recipients.
169 |
170 | a. Offer from the Licensor -- Licensed Material. Every
171 | recipient of the Licensed Material automatically
172 | receives an offer from the Licensor to exercise the
173 | Licensed Rights under the terms and conditions of this
174 | Public License.
175 |
176 | b. No downstream restrictions. You may not offer or impose
177 | any additional or different terms or conditions on, or
178 | apply any Effective Technological Measures to, the
179 | Licensed Material if doing so restricts exercise of the
180 | Licensed Rights by any recipient of the Licensed
181 | Material.
182 |
183 | 6. No endorsement. Nothing in this Public License constitutes or
184 | may be construed as permission to assert or imply that You
185 | are, or that Your use of the Licensed Material is, connected
186 | with, or sponsored, endorsed, or granted official status by,
187 | the Licensor or others designated to receive attribution as
188 | provided in Section 3(a)(1)(A)(i).
189 |
190 | b. Other rights.
191 |
192 | 1. Moral rights, such as the right of integrity, are not
193 | licensed under this Public License, nor are publicity,
194 | privacy, and/or other similar personality rights; however, to
195 | the extent possible, the Licensor waives and/or agrees not to
196 | assert any such rights held by the Licensor to the limited
197 | extent necessary to allow You to exercise the Licensed
198 | Rights, but not otherwise.
199 |
200 | 2. Patent and trademark rights are not licensed under this
201 | Public License.
202 |
203 | 3. To the extent possible, the Licensor waives any right to
204 | collect royalties from You for the exercise of the Licensed
205 | Rights, whether directly or through a collecting society
206 | under any voluntary or waivable statutory or compulsory
207 | licensing scheme. In all other cases the Licensor expressly
208 | reserves any right to collect such royalties.
209 |
210 |
211 | Section 3 -- License Conditions.
212 |
213 | Your exercise of the Licensed Rights is expressly made subject to the
214 | following conditions.
215 |
216 | a. Attribution.
217 |
218 | 1. If You Share the Licensed Material (including in modified
219 | form), You must:
220 |
221 | a. retain the following if it is supplied by the Licensor
222 | with the Licensed Material:
223 |
224 | i. identification of the creator(s) of the Licensed
225 | Material and any others designated to receive
226 | attribution, in any reasonable manner requested by
227 | the Licensor (including by pseudonym if
228 | designated);
229 |
230 | ii. a copyright notice;
231 |
232 | iii. a notice that refers to this Public License;
233 |
234 | iv. a notice that refers to the disclaimer of
235 | warranties;
236 |
237 | v. a URI or hyperlink to the Licensed Material to the
238 | extent reasonably practicable;
239 |
240 | b. indicate if You modified the Licensed Material and
241 | retain an indication of any previous modifications; and
242 |
243 | c. indicate the Licensed Material is licensed under this
244 | Public License, and include the text of, or the URI or
245 | hyperlink to, this Public License.
246 |
247 | 2. You may satisfy the conditions in Section 3(a)(1) in any
248 | reasonable manner based on the medium, means, and context in
249 | which You Share the Licensed Material. For example, it may be
250 | reasonable to satisfy the conditions by providing a URI or
251 | hyperlink to a resource that includes the required
252 | information.
253 |
254 | 3. If requested by the Licensor, You must remove any of the
255 | information required by Section 3(a)(1)(A) to the extent
256 | reasonably practicable.
257 |
258 | 4. If You Share Adapted Material You produce, the Adapter's
259 | License You apply must not prevent recipients of the Adapted
260 | Material from complying with this Public License.
261 |
262 |
263 | Section 4 -- Sui Generis Database Rights.
264 |
265 | Where the Licensed Rights include Sui Generis Database Rights that
266 | apply to Your use of the Licensed Material:
267 |
268 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
269 | to extract, reuse, reproduce, and Share all or a substantial
270 | portion of the contents of the database;
271 |
272 | b. if You include all or a substantial portion of the database
273 | contents in a database in which You have Sui Generis Database
274 | Rights, then the database in which You have Sui Generis Database
275 | Rights (but not its individual contents) is Adapted Material; and
276 |
277 | c. You must comply with the conditions in Section 3(a) if You Share
278 | all or a substantial portion of the contents of the database.
279 |
280 | For the avoidance of doubt, this Section 4 supplements and does not
281 | replace Your obligations under this Public License where the Licensed
282 | Rights include other Copyright and Similar Rights.
283 |
284 |
285 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
286 |
287 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
288 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
289 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
290 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
291 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
292 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
293 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
294 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
295 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
296 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
297 |
298 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
299 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
300 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
301 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
302 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
303 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
304 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
305 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
306 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
307 |
308 | c. The disclaimer of warranties and limitation of liability provided
309 | above shall be interpreted in a manner that, to the extent
310 | possible, most closely approximates an absolute disclaimer and
311 | waiver of all liability.
312 |
313 |
314 | Section 6 -- Term and Termination.
315 |
316 | a. This Public License applies for the term of the Copyright and
317 | Similar Rights licensed here. However, if You fail to comply with
318 | this Public License, then Your rights under this Public License
319 | terminate automatically.
320 |
321 | b. Where Your right to use the Licensed Material has terminated under
322 | Section 6(a), it reinstates:
323 |
324 | 1. automatically as of the date the violation is cured, provided
325 | it is cured within 30 days of Your discovery of the
326 | violation; or
327 |
328 | 2. upon express reinstatement by the Licensor.
329 |
330 | For the avoidance of doubt, this Section 6(b) does not affect any
331 | right the Licensor may have to seek remedies for Your violations
332 | of this Public License.
333 |
334 | c. For the avoidance of doubt, the Licensor may also offer the
335 | Licensed Material under separate terms or conditions or stop
336 | distributing the Licensed Material at any time; however, doing so
337 | will not terminate this Public License.
338 |
339 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
340 | License.
341 |
342 |
343 | Section 7 -- Other Terms and Conditions.
344 |
345 | a. The Licensor shall not be bound by any additional or different
346 | terms or conditions communicated by You unless expressly agreed.
347 |
348 | b. Any arrangements, understandings, or agreements regarding the
349 | Licensed Material not stated herein are separate from and
350 | independent of the terms and conditions of this Public License.
351 |
352 |
353 | Section 8 -- Interpretation.
354 |
355 | a. For the avoidance of doubt, this Public License does not, and
356 | shall not be interpreted to, reduce, limit, restrict, or impose
357 | conditions on any use of the Licensed Material that could lawfully
358 | be made without permission under this Public License.
359 |
360 | b. To the extent possible, if any provision of this Public License is
361 | deemed unenforceable, it shall be automatically reformed to the
362 | minimum extent necessary to make it enforceable. If the provision
363 | cannot be reformed, it shall be severed from this Public License
364 | without affecting the enforceability of the remaining terms and
365 | conditions.
366 |
367 | c. No term or condition of this Public License will be waived and no
368 | failure to comply consented to unless expressly agreed to by the
369 | Licensor.
370 |
371 | d. Nothing in this Public License constitutes or may be interpreted
372 | as a limitation upon, or waiver of, any privileges and immunities
373 | that apply to the Licensor or You, including from the legal
374 | processes of any jurisdiction or authority.
375 |
376 |
377 | =======================================================================
378 |
379 | Creative Commons is not a party to its public
380 | licenses. Notwithstanding, Creative Commons may elect to apply one of
381 | its public licenses to material it publishes and in those instances
382 | will be considered the “Licensor.” The text of the Creative Commons
383 | public licenses is dedicated to the public domain under the CC0 Public
384 | Domain Dedication. Except for the limited purpose of indicating that
385 | material is shared under a Creative Commons public license or as
386 | otherwise permitted by the Creative Commons policies published at
387 | creativecommons.org/policies, Creative Commons does not authorize the
388 | use of the trademark "Creative Commons" or any other trademark or logo
389 | of Creative Commons without its prior written consent including,
390 | without limitation, in connection with any unauthorized modifications
391 | to any of its public licenses or any other arrangements,
392 | understandings, or agreements concerning use of licensed material. For
393 | the avoidance of doubt, this paragraph does not form part of the
394 | public licenses.
395 |
396 | Creative Commons may be contacted at creativecommons.org.
397 |
--------------------------------------------------------------------------------
/Maintaining.md:
--------------------------------------------------------------------------------
1 | # A guide to maintaining this repo
2 |
3 | This document is a step by step guide to the maintenance of the S1_S2_ARD_code_list repo
4 |
5 | last update to this document 23/08/20
6 |
7 | #### Please note that screen shots may differ to your computer screen
8 |
9 | 1. [Basic editing (in browser)](#basic-editing)
10 | 2. [Setting up offline (incl downloading a copy via browser)](#setting-up-offline)
11 | - [Editing Software](#editing-software)
12 | - [Git](#git)
13 | - [GitHub Desktop](#github-desktop)
14 | - [Git command line](#command-line-git)
15 | - [Cloning](#cloning)
16 | - [Commit to master](#making-a-commit-to-master)
17 | - [Branching](#branching)
18 | 3. [Editing Markdown](#editing-markdown)
19 | 4. [Versioning](#versioning)
20 | 5. [Handling external pull requests](#handling-external-pull-requests)
21 |
22 | ---
23 |
24 |
25 | ## Basic editing
26 | As the admin of the account it is possible to edit the repo directly within GitHub. This maybe the quickest option; especially when the change is minor and can be easily identified. Click on the pencil highlighted in red below
27 |
28 | 
29 |
30 | The screen will be similar to below
31 |
32 | 
33 |
34 | Click on the highlighted green box to preview any change(s) - shown below
35 |
36 | 
37 |
38 | To commit the changes make a short commit statement eg
39 |
40 | "short description of change(s)"
41 |
42 | and optionally add a description
43 |
44 | "optional... I added this link / image / sent by x"
45 |
46 | 
47 |
48 | Inspect the file to see the changes made.
49 |
50 | ---
51 |
52 | ## Setting up offline
53 | For anything more than just simple editing it is often easier to work on a version offline and then 'push' it back to the online version. The first part of this document is for a single admin and it is assumed that they will be working on the master branch (the the master copy) of the repo. Often (and espcially when working with code) it is a good idea to make a branch, make changes and then merge back into the master at a later point. This is better for multiple maintainers - see section on [branching](#branching) in this guide. [Branching](#branching) is a great way to manage multiple users editing at the same time. Another good overview of branching documentation is [here](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging). In the [contributing doc](CONTRIBUTING.md) branching is also mentioned.
54 |
55 | To obtain a copy of this repo you can, in the root of the repo, click on the green 'code' button (shown below) and then click download zip.
56 |
57 | 
58 |
59 | Save this file and view as needed in text editor or IDE. (more info in [editing software](#editing-software) section). This is fine for inspecting the repo but not recommended for editing and version control
60 |
61 | ### Editing Software
62 | Before we get into the process of managing the repo its worth considering using a bespoke editor. The following are options
63 | - [notepad ++](https://notepad-plus-plus.org/downloads/)
64 | - [pycharm](https://www.jetbrains.com/pycharm/)
65 | - [atom](https://atom.io/)
66 | - another text editor? (feel free to add)
67 |
68 | This guide uses pycharm for its screen shots. It has a preview panel associated with the Readme.md (as do many other editors). The principle of editing remains the same regardless of editor. It is recommended to use one that gives you some colour styling or guidance when making edits, but ultimately it is a personal preference.
69 |
70 | ### Git
71 | There are two main options for managing your offline editing
72 |
73 | 1. [GitHub desktop install](https://desktop.github.com/) - A GUI for Windows only
74 | 2. [Command line git install](https://git-scm.com/) - Terminal suitable for all types of operating system (os)
75 |
76 | They should (at the time of writing they did) both follow a simple gui wizard based installation. Please refer to the respective installation pages for more details
77 |
78 | #### GitHub Desktop
79 | Open the program and clone the repo
80 |
81 | 
82 | Navigate to the appropriate location of this repo (note it will be different to screen shot post hand over)
83 |
84 | Pleae note the save location in the highlighted black box
85 | 
86 | Cloning in progress
87 |
88 | 
89 | Current status - no changes at present
90 |
91 | 
92 | Make a change to a file (in a text editor) - this is an example
93 |
94 | 
95 | Add a commit message and click on commit
96 |
97 | 
98 | Finally click on Push Origin to push the (altered) file back to the repo. Inspect the github account online
99 |
100 | 
101 | Finally if there are any changes made (perhaps online?) then you can pull/fetch the orgin back to local to ensure you are upto date (again this is an example)
102 |
103 | 
104 |
105 | #### Command line git
106 | Git desktop is ok for useage but familiarity with using the command line will enable much faster and provide more control using the power of git. The rest of this guide will assume use of command line / terminal.
107 | You can use the terminal provided in the git install, in this example a standard windows cmd prompt is used.
108 |
109 | If this is the first time you are using the terminal then setup your user name and account name by typing
110 |
111 | `git config --global user.name "Your name here"`
112 |
113 | `git config --global user.email "your_email@example.com"`
114 |
115 | This helps when inspecting the history of the repo - finding out who made the change(s). You may/will also be prompted to input your github account password if you are pushing to a repo for the first time
116 |
117 | ##### Cloning
118 | On the repo root page copy the 'clone with https' link as shown below
119 |
120 | 
121 | Open a command prompt and navigate to the location you would like to clone the repo to and type
122 |
123 | `git clone link` (where link is the link from above)
124 |
125 | 
126 | Navigate to the folder and you should find the new repo
127 |
128 | #### Making a commit to master
129 |
130 | 
131 | Make a change using an editor. Then type
132 |
133 | `git add *` - to add the change to the header of the repo
134 |
135 | `git status` - to see the status of the repo
136 |
137 | `git commit -m "a commit message"` - to make a commit (locally)
138 |
139 | `git status` - to see the status of the repo
140 |
141 | `git push` - to push the changes to the repo (master)
142 |
143 | 
144 | In this final example I have typed
145 |
146 | `git pull` - get updates locally from repo
147 |
148 | to update our local clone. In this case you would want to do this prior to making any changes
149 |
150 | 
151 |
152 | #### Branching
153 | This is a simple guide to branching and merging for more detail please visit [branching docs](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)
154 |
155 | `git branch` - shows all the branches in repo - just master in this case
156 |
157 | `git checkout -b test` - creates a new branch we will work on call test
158 |
159 | `git branch` - shows what branches are available and current working one
160 |
161 | Make a change to a any file in your repo
162 |
163 | `git add *` - add the changes to the header
164 |
165 | `git commit -m "a message"` - make a commit statement
166 |
167 | Now we are happy with our data we will merge it to the master.
168 |
169 | `git checkout master` - working on the master branch again
170 |
171 | (at this point consider a `git pull` if there is a chance of a change on original - in this case we know it is just us editing so not needed)
172 |
173 | `git merge test` - merge the change on the test branch to the master
174 |
175 | `git status` - check that there are no conflicts and that the merge is in the head
176 |
177 | `git push` - push the changes back to orginal
178 |
179 | `git branch` - check the branch we are workig on
180 |
181 | `git branch -d test` - delete the test branch (as we don't need it now)
182 |
183 | `git branch` - confirm deletion
184 |
185 | All the above steps are shown in screen shot below
186 |
187 | 
188 |
189 | ---
190 |
191 | ### Editing markdown
192 | The best guide to editing markdown in [here](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)
193 |
194 | A basic understanding of html is helpful flags like `some text` will make text appear like some text
195 |
196 | The 3 most common things in this repo are headers, links and images and these are all shown below
197 |
198 | 
199 |
200 | - Headers `# header` or `## header2`
201 | # header
202 | ## header 2
203 | - Links `[link name](http://www.google.com)`
204 |
205 | [link name](http://www.google.com)
206 | - Images ``
207 |
208 | 
209 |
210 | Lines of test tend to be continous lines. They can be separated with `
` flag but in editors like pycharm carriage return will suffice. Use the preview in whatever editor you have
211 |
212 | You can bold text by using `**bold this** ` **bold this** or wrap in html tags ` bold that ` bold that
213 |
214 | ---
215 |
216 | ### Versioning
217 | Versioning in this case will be useful restore to previous version if necessary
218 |
219 | To learn more about version control in github visit [here](https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control)
220 |
221 | In the terminal you can type
222 |
223 | `git log` - gets a list all all the commits
224 |
225 | This is perhaps not the easiest visual. You can get more infomation by inspecting the history on the git repo page. Click on the commits link (highlighted below)
226 |
227 | 
228 | You will get back a list of commits and person who has committed them
229 |
230 | 
231 | Click on one to inspect further. Green areas are additions, red areas are deletions. The green box highlighted in the commit hash. Make a note of this if you want to revert to it
232 |
233 | 
234 |
235 | To revert to that commit type at the terminal
236 |
237 | `git revert --no-commit c9b7e08..HEAD`
238 |
239 | `git commit`
240 |
241 | For more information on versioning at the cmd prompt see this excellent [stackoverflow post](https://stackoverflow.com/questions/4114095/how-do-i-revert-a-git-repository-to-a-previous-commit). Sometimes though it is easier to copy the old text and combine manually and make a new commit.
242 |
243 | ---
244 |
245 | ### Handling external pull requests
246 | please see [contributing doc](CONTRIBUTING.md) for how to make a contribution.
247 |
248 | If someone has forked this repo and made a change they may issue a pull request.
249 |
250 | To handle a pull request in this repo (you will probably get email notified of the request)
251 | 1. Click Pull requests.
252 | 2. Click into the pull request (there maybe several)
253 | 3. Inspect it - if happy select merge pull request (if there are no conflicts that you will need to resolve, if not resolve them)
254 | 4. Write a comment in the acknowledgement box and close the request
255 |
256 | A visual guide is available [here](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request)
257 |
258 | This process is relatively wizard driven and will become familiar after a short period of time. In the pull request tab you will be able to see previous pull requests. If unsure find another repo and inspect the pull requests tab to see how others handle merging new requests.
259 |
260 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sentinel-1 & Sentinel-2 ARD code list
2 |
3 |
4 |
5 | 
6 |
7 |
8 | A curated list supporting the use of Sentinel-1 and Sentinel-2 analysis-ready data (ARD) in the UK
9 |
10 | ---
11 |
12 | # Project Background
13 | [JNCC](https://jncc.gov.uk/) are leading a project to help people use [Sentinel-1](https://sentinel.esa.int/web/sentinel/missions/sentinel-1) and [Sentinel-2](https://sentinel.esa.int/web/sentinel/missions/sentinel-2) analysis-ready data ([ARD](https://jncc.gov.uk/our-work/simple-ard-service-faqs/)) provided by the [Defra EO Data Service](https://defradigital.blog.gov.uk/2020/06/18/making-it-easier-to-access-and-use-earth-observation-data/) and the [CEDA Archive](http://archive.ceda.ac.uk/), with a particular focus on accessing data via API (application programming interfaces). As part of this project, we have set up a public repository for sharing code in any language for processing or analysing Sentinel-1 and Sentinel-2 ARD. We conducted a survey in July 2020 to gain a better understanding of user needs and inform the choice of code-sharing platform. Based on the survey results and subsequent discussion with the project team and partners, it was agreed that the best option was to set up this curated list on GitHub. We have also set up a Slack workspace to enable discussion and messaging between users of Sentinel-1 and Sentinel-2 ARD; you can [join the group here](https://S1-S2-ARD-users.slack.com/) if you have a Slack account, or [sign up here](https://join.slack.com/t/s1-s2-ard-users/signup) if you do not yet have a Slack account.
14 |
15 | # How to contribute
16 | This list is a work in progress and we need your help to keep it up-to-date! If you have examples of code for selecting, downloading, manipulating or analysing Sentinel-1 or Sentinel-2 ARD, please add them to the list by making a pull request. See our [contribution guidelines](CONTRIBUTING.md) for details on how to do this.
17 |
18 | # Acknowledgements
19 | Thank you very much to all the [authors](S1_S2_ARD_authors.txt) who have contributed their code to this list, and to [Andrew Cutts](https://github.com/acgeospatial) for help with setting up the list.
20 | This project is funded by the Caroline Herschel Framework Partnership Agreement on [Copernicus User Uptake](https://jncc.gov.uk/our-work/copernicus-project/).
21 |
22 | ---
23 |
24 | # Contents
25 |
26 | | [Tutorials and functions](#tutorials-and-functions ) | [Defra EO Data Service API](#defra-eo-data-service-api) | [CEDA Data Access](#ceda-data-access) | [Other functions](other-functions)
27 |
28 | | [Marine and Coastal Applications](#marine-and-coastal-applications) | [Maerl monitoring](#maerl-monitoring) | [Satellite-derived bathymetry](#satellite-derived-bathymetry) | [Intertidal extent mapping](#mapping-intertidal-extent)
29 |
30 | | [Terrestrial Applications](#terrestrial-applications) | [Habitat Change Detection](#habitat-change-detection) | [Peatland Mapping](#peatland-mapping) | [Burn mapping](#burn-mapping) | [Habitat mapping](#habitat-mapping) | [Water body monitoring](#water-body-monitoring)
31 |
32 | | [GitHub accounts of relevant organisations](#GitHub-accounts-of-relevant-organisations) | [Other useful Earth Observation GitHub links](#other-useful-earth-observation-github-links) |
33 |
34 | Start Here
35 |
36 | ## Tutorials and functions
37 | ### Defra EO Data Service API
38 | #### EODS API training materials
39 | *These Jupyter Notebooks were created as training materials to demonstrate use of the EO Data Service API. They were produced before the [EODS API Python Library](#eods-api-python-library) was developed. Many of the processes in these Notebooks can now be carried out more efficiently using the functions in the EODS API Python Library.*
40 | - ['eods-api-example-simple-query'](https://github.com/defra-data/EODS-API/blob/master/notebooks-v1/eods-api-example-simple-query.ipynb). Introduction to the Defra EO Data Service API and creating a simple query. `Python` `Defra` `EODS-API`
41 | - ['eods-api-example-generate-cloudless-mosaic'](https://github.com/defra-data/EODS-API/blob/master/notebooks-v1/eods-api-example-generate-cloudless-mosaic.ipynb). Generate a list of Sentinel-2 granules with least cloud per granule per orbit for a given date range and geographic area. `Python` `Defra` `EODS-API`
42 | - ['eods-api-example-wps'](https://github.com/defra-data/EODS-API/blob/master/notebooks-v1/eods-api-example-wps.ipynb). Use web processing services (WPS) to clip raster, select single band from raster, re-project raster, create points from raster, and generate zonal statistics `Python` `Defra` `EODS-API` `WPS`
43 | - ['EODS_API'](https://github.com/jncc/defra-eo-data-service-api/blob/master/EODS_API.ipynb) Download Sentinel-2 data via API from the Defra EO Data Service, then create a mosaic, clip to area of interest and create NDVI. `Python` `JNCC` `EODS-API` `WPS` `copernicus-user-uptake`
44 | - ['EODS_API_Best_pixel'](https://github.com/jncc/defra-eo-data-service-api/blob/master/EODS_API_Best_pixel.ipynb). Download Sentinel-2 data via API from the Defra EO Data Service, then create best-pixel composite using the pixels with least cloud in a stack of imagery from different dates `RSGISLib` `Python` `JNCC` `EODS-API` `WPS` `copernicus-user-uptake`
45 | - [config.py](https://github.com/defra-data/EODS-API/blob/master/config.py). Config file for use with the above Jupyter Notebooks, e.g. to input your authentication token.
46 | - [environment.yml](https://github.com/defra-data/EODS-API/blob/master/environment.yml). Environment file for use with the Jupyter Notebooks in this section and the section below.
47 | #### EODS API Python library
48 | *A module of library functions for programmatic interaction with the EO Data Service developed by Sam Franklin at CGI, together with four Jupyter Notebooks demonstrating applications of the library for filtering, downloading and manipulating Sentinel-2 data.*
49 | - [eodslib.py](https://github.com/defra-data/EODS-API/blob/master/eodslib.py). Functions for interacting with the EO Data Service. Examples include: keyword arguments for filtering data; finding the least cloudy Sentinel-2 granules; creating XML files for use in Web Processing Service (WPS) requests; submitting WPS requests; removing split Sentinel-2 granules from a dataframe; processing data downloaded via WPS (unzipping and renaming files, deleting zip files). `Python` `Defra` `EODS-API` `WPS`
50 | - [eodslib.py example 1: simple query](https://github.com/defra-data/EODS-API/blob/master/eods-example1-simple-EODS-query.ipynb). Apply filter parameters and return results as a dataframe. `Python` `Defra` `EODS-API`
51 | - [eodslib.py example 2: query and download](https://github.com/defra-data/EODS-API/blob/master/eods-example2-query-EODS-and-download-results.ipynb). Apply filter parameters and download returned data. `Python` `Defra` `EODS-API` `WPS`
52 | - [eodslib.py example 3: query, download, optimise and mosaic](https://github.com/defra-data/EODS-API/blob/master/eods-example3-query-eods-download-results-mosaic-s2s-with-rasterio.ipynb). Apply filter parameters, download results, convert downloaded files to 'optimised' GEOTIFFs and mosaic the imagery by creating a virtual raster. `Python` `Defra` `EODS-API` `WPS`
53 | - [eodslib.py example 4: query, download clipped area, calculate ndvi](https://github.com/defra-data/EODS-API/blob/master/eods-example4-query-eods-coveragecrop-download-calc-ndvi-plot-ndvi.ipynb). Apply filter parameters, download the returned data clipped to an area of interest, calculate and plot NDVI from the downloaded data. `Python` `Defra` `EODS-API` `WPS`
54 | - [eodslib.py example 5: query EODS and create a layer group](https://github.com/defra-data/EODS-API/blob/master/eods-example5-query-eods-and-create-a-layergroup.ipynb). Apply filter parameters and create a layer group (mosaic) from selected Sentinel-2 granules. `Python` `Defra` `EODS-API`
55 | - [eodslib.py example 6: query EODS and update a layer group](https://github.com/defra-data/EODS-API/blob/master/eods-example6-query-eods-and-update-a-layergroup.ipynb). Apply filter parameters and update an existing layer group (mosaic), e.g. to use more recently acquired imagery. `Python` `Defra` `EODS-API`
56 | ### CEDA Data Access
57 | - [Accessing ARD over HTTP using geotiff.js](https://github.com/jncc/s1-s2-ard-code-list/tree/master/code/geotiffjs_example) This example shows the process of creating true colour Sentinel-2 thumbnails using ARD hosted in the CEDA Archive.
58 | ### Other functions
59 | - ['habitat-condition-monitoring'](https://github.com/jncc/habitat-condition-monitoring). A package of various functions involved in preparation, statistical analysis and modelling with Sentinel-1 and Sentinel-2 data, including cloud and shadow masking, calculating indices, creating thumbnails, generating zonal statistics and summarising these per polygon. `R` `JNCC` `copernicus-user-uptake`
60 | - [Generate coherence image from Sentinel-1](https://github.com/jncc/cuu-illegal-waste). Please note this uses Sentinel-1 *Single Look Complex (SLC)* data, not the analysis-ready data processed by JNCC and Defra. XML script and supporting command line scripts to produce a coherence image from two SLC input datasets, enabling detection of ground surface changes over time. `JNCC` `SEPA` `copernicus-user-uptake`
61 |
62 | ---
63 |
64 | ## Marine and Coastal Applications
65 |
66 | ### Maerl monitoring
67 | - [Live maerl classification](https://github.com/karensnh/Mask-R-CNN-for-classification-of-maerl) Jupyter notebooks used to train and apply a mask R-cnn model to classify live maerl in imagery of the sea-bed obtained from drop-down cameras. This example does not use Sentinel-1 or 2 ARD but the method could be applied to satellite imagery. `Python` `NatureScot`
68 |
69 | ### Satellite-derived bathymetry
70 | - [IMECsentinel](https://github.com/GemmaH131/IMECsentinel) Bathymetry from Sentinel-2 imagery to detect sandbanks in the southern North Sea. `R` `Newcastle-University`
71 |
72 | ### Mapping intertidal extent
73 | - [Coast X-Ray](https://github.com/jamesfitton/cxr) generates Normalised Difference Water Index for a time-series of Sentinel-2 images to calculate the frequency of water occurrence across the intertidal zone. This approach was developed by the Scottish [Dynamic Coast](http://www.dynamiccoast.com/) project. The full method is published in [Remote Sensing Applications](https://www.sciencedirect.com/science/article/pii/S2352938521000355) `Python`
74 |
75 | ---
76 |
77 | ## Terrestrial Applications
78 |
79 | ### Habitat Change Detection
80 | - Workflow for processing Sentinel-1 and Sentinel-2 with habitat map shapefiles to produce input data for change detection RShiny app, using functions provided in the ['habitat-condition-monitoring'](https://github.com/jncc/habitat-condition-monitoring) package. There are separate workflows for [English sites](https://github.com/jncc/cuu-change-detection/blob/master/CUUCD_EnglishSites.Rmd), [Welsh sites](https://github.com/jncc/cuu-change-detection/blob/master/CUUCD_WelshSites.Rmd) and [Scottish sites](https://github.com/jncc/cuu-change-detection/blob/master/CUUCD_ScottishSites.Rmd). `R` `JNCC` `copernicus-user-uptake`
81 | - ['change-analysis-examples'](https://github.com/jncc/cuu-change-detection/blob/master/change_analysis_examples.Rmd) A short analysis of NDVI statistics generated from Sentinel-2 and how they can be used in conjunction with a habitat map shapefile to identify polygons which deviate from mean values by more than set thresholds. `R` `JNCC` `copernicus-user-uptake`
82 | - ['change-statistics-analysis'](https://github.com/jncc/cuu-change-detection/blob/master/change_statistics_analysis.Rmd). An interactive document demonstrating use of NDVI derived from Sentinel-2 in conjunction with a habitat map shapefile to identify polygons which deviate from mean values by more than set thresholds. `R` `JNCC` `copernicus-user-uptake`
83 | - Change detection RShiny App 2020 pilot - coming soon `R` `JNCC` `copernicus-user-uptake`
84 |
85 | ### Peatland Mapping
86 | #### Nature.Scot bare peat mapping
87 | - [Bare peat mapping - creating indices](https://github.com/duncansnh/Bare-peat/blob/master/bare_peat_indices.r). Calculates various indices for bare peat mapping vectors too large to apply in one script, therefore carried out with single raster at a time, controlled input by moving rasters between folders on remote sensing drive. `R` `NatureScot`
88 | - [Bare peat mapping - creating indices](https://github.com/duncansnh/Bare-peat/blob/master/Indices_creation.ipynb). Creates indices from ARD of 10 bands from Sentinel-2. Creates 23 band raster (float 32). `Python` `NatureScot`
89 | - [Bare peat mapping – random forest classification](https://github.com/duncansnh/Bare-peat/blob/master/bare.peat.national.RF.classification.R). The script reads an ESRI Shapefile (defined by the "shapefile" variable) with training polygons and then selects a user-determined number of samples from each land cover type. A multilayer image that contains spectral, other continuous data or categorical data is also input. For each randomly selected sample the data values for that pixel are determined and these data are used to run the Random Forest model. After building the model the multilayer image is read, and up to three output layers can be selected for the output image. `R` `NatureScot`
90 | - [Bare peat mapping – random forest classification](https://github.com/duncansnh/Bare-peat/blob/master/Data_Split_Classification_.ipynb). Script to perform supervised classification. Applied to bare peat classification on nationwide scale using Sentinel-2. `Python` `NatureScot`
91 | #### JNCC Bare Peat Mapper app
92 | - [Bare peat mapping functions](https://github.com/jncc/bare-peat-mapping-pilot). A set of R functions developed for a [JNCC pilot study](https://hub.jncc.gov.uk/assets/958df51f-2e7c-4d2b-92f0-eac84c2a86af) on using EO to monitor peatland condition. Functions include detecting bare peat in Sentinel-2 imagery using Random Forest classification and regression modelling. `R` `JNCC` `copernicus-user-uptake`
93 | - ['CUUPeatApp_map_prep'](https://github.com/jncc/cuu-peatland-mapping/blob/master/scripts/CUUPeatApp_map_prep.R). Prepares Sentinel-2 and bare peat layers for use in the Bare Peat Mapper app, using functions provided in the ['habitat-condition-monitoring'](https://github.com/jncc/habitat-condition-monitoring) package. `R` `JNCC` `copernicus-user-uptake`
94 | - Markdown documentation detailing the process of using Sentinel-2 imagery and a spatial framework of polygons to study change in bare peat at the following sites:
95 | - Caithness and East Sutherland, Scotland [fine-scale mapping](https://github.com/jncc/cuu-peatland-mapping/blob/master/site%20docs/FR_CES_Fine.Rmd) and [time-series modelling](https://github.com/jncc/cuu-peatland-mapping/blob/master/site%20docs/FR_CES_Broad.Rmd)
96 | - Dark Peak, England [fine-scale mapping](https://github.com/jncc/cuu-peatland-mapping/blob/master/site%20docs/NE_DarkPeak_Fine.Rmd) and [time-series modelling](https://github.com/jncc/cuu-peatland-mapping/blob/master/site%20docs/NE_DarkPeak_Broad.Rmd)
97 | - Humberhead NNR, England [fine-scale mapping](https://github.com/jncc/cuu-peatland-mapping/blob/master/site%20docs/NE_Humberhead_Fine.Rmd) and [time-series modelling](https://github.com/jncc/cuu-peatland-mapping/blob/master/site%20docs/NE_Humberhead_Broad.Rmd)
98 | - Brecon Beacons, Wales [fine-scale mapping](https://github.com/jncc/cuu-peatland-mapping/blob/master/site%20docs/WG_Brecon_Fine.Rmd) and [time-series modelling](https://github.com/jncc/cuu-peatland-mapping/blob/master/site%20docs/WG_Brecon_Broad.Rmd).
99 |
100 | ### Burn mapping
101 | Code developed by Nature.Scot as part of the Copernicus User Uptake project on upland burn mapping from Sentinel 2.
102 | The code has been developed in Python in Jupyter notebooks designed to work in a Google Colabs environment, though it should only need minor changes to work in other environments. Project still in progress so code may change.
103 | - [Burn extent indices](https://github.com/duncansnh/burn-mapping/blob/master/CUU_burn_extent_indices.ipynb) - Script to create indices from ARD of 10 bands from Sentinel 2. Creates rasters float 32. `copernicus-user-uptake` `Python` `Nature.Scot`
104 | - [Burn extent box plots of pixel values](https://github.com/duncansnh/burn-mapping/blob/master/CUU_burn_extent_pixel_box_plots.ipynb) - Script to extract pixel values from a raster relating to a set of training polygons and then generate box plots using seaborn python package. `copernicus-user-uptake` `Python` `Nature.Scot`
105 | - [Burn extent image thresholding](https://github.com/duncansnh/burn-mapping/blob/master/CUU_burn_extent_image_thresholding.ipynb) - Script to threshold an input image based on one or more spectral index thresholds `copernicus-user-uptake` `Python` `Nature.Scot`
106 |
107 | Code developed by Pixalytics and EnviroSAR for the Defra EO Centre of Excellence R&D project: 'Upland Burn Detection with Radar'
108 | A [set of Jupyter notebooks and example data](https://github.com/pixalytics-ltd/upland-burn-detection) to:
109 | - download Sentinel-1 ARD for a user-defined area and timeframe `Python` `Defra`
110 | - process Sentinel-1 coherence data for a user-defined area and timeframe `Python` `Defra`
111 | - analyse the ARD and coherence data and generate an interactive map of burns `Python` `Defra`
112 | - automate detection of burns from Sentinel-1 data based on threshold values `Python` `Defra`
113 |
114 | ### Habitat mapping
115 | - The Living England project, led by Natural England, is a multi-year programme delivering a satellite-derived national habitat layer in support of the Environmental Land Management System (ELMS) and the National Capital and Ecosystem Assessment (NCEA) Pilot. The project uses European Space Agency Sentinel-1 and Senetinel-2 imagery, alongside additional open source datasets, within a Random Forest machine learning algorithm to classify land segments into one of a defined list of habitat classes (currently UKBAP), achieving an accuracy of 84% for the latest iteration (2019/20). For further information please contact earth.observation@naturalengland.org.uk quoting "Living England" in the subject line. `R` `Natural England`
116 |
117 | ### Water body monitoring
118 | - [Monitoring extent of water bodies using Sentinel-1](https://github.com/karensnh/Monitoring-extent-of-water-bodies-using-Sentinel-1) scripts developed by [NatureScot](https://www.nature.scot/) can be used for classification of Sentinel-1 on JASMIN using the ARD held on CEDA. Delineating land/water boundaries has many applications including flood mapping and monitoring habitat for aquatic species. `Python` `NatureScot`
119 |
120 | ---
121 |
122 | ## GitHub accounts of relevant organisations
123 | - [Nature.Scot](https://github.com/Scottish-Natural-Heritage) - Scotland's Nature Agency [homepage](https://www.nature.scot/)
124 | - [defra](https://github.com/defra) - UK government department responsible for safeguarding our natural environment, supporting our food & farming industry, and sustaining a thriving rural economy. [homepage](https://www.gov.uk/government/organisations/department-for-environment-food-rural-affairs)
125 | - [CefasRepRes](https://github.com/CefasRepRes) - Cefas is a world leader in marine science and technology, providing innovative solutions for the aquatic environment, biodiversity and food security [homepage](https://www.cefas.co.uk/)
126 | - [cedadev](https://github.com/cedadev) - Centre for Environmental Data Analysis Developers [homepage](http://www.ceda.ac.uk/)
127 |
128 | ## Other useful Earth Observation GitHub links
129 | - [Awesome-EO-Code](https://github.com/acgeospatial/awesome-earthobservation-code) - A curated list of awesome tools, tutorials, code, helpful projects, links, stuff about Earth Observation and Geospatial stuff!
130 | - [Awesome-SAR](https://github.com/RadarCODE/awesome-sar) - A curated list of awesome synthetic aperture radar (SAR) software, libraries and resources.
131 |
132 | End
133 |
134 |
135 | [Contribution guidelines for this project](CONTRIBUTING.md)
136 |
137 |
138 |
139 | This work is licensed under a
140 | [Creative Commons Attribution 4.0 International License][cc-by].
141 |
142 | ![CC_BY][cc-by-shield]
143 |
144 | [![CC BY 4.0][cc-by-image]][cc-by]
145 |
146 | [cc-by]: http://creativecommons.org/licenses/by/4.0/
147 | [cc-by-image]: https://i.creativecommons.org/l/by/4.0/88x31.png
148 | [cc-by-shield]: https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg
149 |
150 |
151 |
152 |
--------------------------------------------------------------------------------
/S1_S2_ARD_authors.txt:
--------------------------------------------------------------------------------
1 | Authors
2 | -------
3 |
4 | * Alex Kilcoyne, Natural England
5 | * Becky Trippier, JNCC
6 | * Dan Colson, JNCC
7 | * Duncan Blake, Nature.Scot
8 | * Ed Williamson, CEDA
9 | * Gemma Hoyes, Newcastle University (MSc student 2020)
10 | * Graham French, JNCC
11 | * Guy Picton-Phillips, Natural England
12 | * James Fitton, University College Cork and Dynamic Coast
13 | * Karen Frake, Natural England
14 | * Kostas Sideris, JNCC
15 | * Richard Alexander
16 | * Sam Franklin, CGI
17 |
--------------------------------------------------------------------------------
/code/geotiffjs_example/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Sentinel 2 thumbnail example with geotiff.js
7 |
The thumbnail may take a few seconds to load...
8 |
9 |
10 |
101 |
102 |
--------------------------------------------------------------------------------
/code/geotiffjs_example/readme.md:
--------------------------------------------------------------------------------
1 | Accessing ARD over HTTP using geotiff.js
2 | ========================================
3 |
4 | The Sentinel 1 and 2 ARD are stored in [CEDA](https://archive.ceda.ac.uk/) in [COG](https://www.cogeo.org/) format, which allows you to use HTTP range requests to retrieve data for just the areas/bands you need instead of downloading the whole file. CEDA have very kindly implemented an allow all CORS policy which means you can now do this entirely from a browser.
5 |
6 | This example shows the process of creating true colour Sentinel 2 thumbnails using ARD hosted in CEDA, generated entirely within the browser. [`geotiff.js`](https://geotiffjs.github.io/) is used to handle the HTTP range requests to enable us to retrieve data just for our area of interest (within an ARD file) and our bands of interest.
7 |
8 | We've created a very basic example in a self contained `index.html` file which can be found alongside this readme. Simply open it in a web browser to see it running (open dev tools to see logs in the console).
9 |
10 | Preparing geotiff files for HTTP range requests
11 | -----------------------------------------------
12 | If you're only intending to use the ARD in CEDA, you can skip this section. If you want to host your own data, you'll need to ensure your files are in COG (Cloud Optimised Geotiff) format. HTTP range requests will still work with non-COG files but more (if not all) of the file will be downloaded so it'll be less efficient.
13 |
14 | It's also a good idea to add some more overviews while you're at it:
15 |
16 | gdaladdo -r nearest inputfile.tif 2 4 8 16 32 64 128 256 512
17 |
18 | Then to process to COG with GDAL 3.1+ (more details on the [cogeo.org](https://www.cogeo.org/developers-guide.html) site):
19 |
20 | gdal_translate -of "COG" -co "COMPRESS=DEFLATE" -co "BIGTIFF=YES" inputfile.tif outputfile.tif
21 |
22 | To validate it, you can use the [`validate_cloud_optimized_geotiff.py`](https://github.com/OSGeo/gdal/blob/master/gdal/swig/python/gdal-utils/osgeo_utils/samples/validate_cloud_optimized_geotiff.py) script:
23 |
24 | python validate_cloud_optimized_geotiff.py outputfile.tif
25 |
26 | | Note that the script has been updated for GDAL 3.1+. If you have an older copy saved somewhere, you'll want to update it.
27 |
28 | When hosting the files, you'll want to check that your server supports byte-range requests, and if you plan to send the requests from the client side, then you may also need to configure [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS).
29 |
30 | Using geotiff.js to retrieve chunks of data
31 | -------------------------------------------
32 | For full documentation, refer to the [geotiff.js site](https://geotiffjs.github.io/).
33 |
34 | `geotiff.js` is a very handy Javascript library which can be used to read raw data from geotiff files. In this case we're using it to read data remotely from the CEDA archive, letting it handle the logic of range requests.
35 |
36 | First set up the data source and get the image object (there might be multiple images in a file).
37 |
38 | let tiff = await GeoTIFF.fromUrl(url);
39 | let image = await tiff.getImage();
40 |
41 | Then get the raster data. Here we're giving a pixel window which is a subset of the whole image, and a list of samples/bands.
42 |
43 | let data = await image.readRasters({
44 | window: pixelBbox,
45 | samples: [2, 1, 0]
46 | });
47 |
48 | The example included in `index.html` also shows the calculations for converting an OSGB bounding box to a pixel bounding box.
49 |
50 | Visualising the data as a true colour thumbnail
51 | -----------------------------------------------
52 | The returned `data` data structure includes the red, green, and blue band pixel level values, in top left to bottom right order. I.e. `data[0][0]` is the red value of the first pixel, `data[1][0]` is the green value of the first pixel, and so on. We also know the width and height of the thumbnail, so we have everything we need to draw a pixel by pixel image.
53 |
54 | We can do this using the HTML Canvas element.
55 |
56 | let canvas = document.createElement('canvas')
57 | canvas.width = thumbnailPixelWidth
58 | canvas.height = thumbnailPixelHeight
59 |
60 | let ctx = canvas.getContext("2d")
61 |
62 | To draw a pixel to the canvas, first set the colour using the retrieved rgb values, and then draw it as a 1px by 1px rectangle at the required location. E.g. for the first pixel
63 |
64 | ctx.fillStyle = `rgb(${data[0][0]}, ${data[1][0]}, ${data[2][0]}, 1)`
65 | ctx.fillRect(0, 0, 1, 1)
66 |
67 | | The last argument in rgb() is the alpha value, which can be set to 0 for no data values.
68 |
69 | Then it's just a case of looping to do this for the rest of the pixels (you can see this done in the `index.html` file).
70 |
71 | Finally, you may want to return the thumbnail as a data URL so that you can pass it to an image element, and so handle it as a standard image instead of a canvas element.
72 |
73 | let imageElement = new Image(thumbnailPixelWidth, thumbnailPixelHeight)
74 | imageElement.src = canvas.toDataURL("image/png")
75 |
--------------------------------------------------------------------------------
/images/All_logos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/All_logos.png
--------------------------------------------------------------------------------
/images/Department_for_Environment,_Food_and_Rural_Affairs_logo.svg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/Department_for_Environment,_Food_and_Rural_Affairs_logo.svg.png
--------------------------------------------------------------------------------
/images/Logos_updated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/Logos_updated.png
--------------------------------------------------------------------------------
/images/ceda_logo_transp_black_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/ceda_logo_transp_black_1.png
--------------------------------------------------------------------------------
/images/contributing/01_fork.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/contributing/01_fork.png
--------------------------------------------------------------------------------
/images/contributing/02_fork.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/contributing/02_fork.png
--------------------------------------------------------------------------------
/images/contributing/03_fork.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/contributing/03_fork.png
--------------------------------------------------------------------------------
/images/fpa-logo-web.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/fpa-logo-web.jpg
--------------------------------------------------------------------------------
/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/logo.png
--------------------------------------------------------------------------------
/images/maintaining/01_editing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/01_editing.png
--------------------------------------------------------------------------------
/images/maintaining/02_editing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/02_editing.png
--------------------------------------------------------------------------------
/images/maintaining/03_editing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/03_editing.png
--------------------------------------------------------------------------------
/images/maintaining/04_editing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/04_editing.png
--------------------------------------------------------------------------------
/images/maintaining/05_downloading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/05_downloading.png
--------------------------------------------------------------------------------
/images/maintaining/06_git_desk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/06_git_desk.png
--------------------------------------------------------------------------------
/images/maintaining/07_git_desk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/07_git_desk.png
--------------------------------------------------------------------------------
/images/maintaining/08_git_desk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/08_git_desk.png
--------------------------------------------------------------------------------
/images/maintaining/09_git_desk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/09_git_desk.png
--------------------------------------------------------------------------------
/images/maintaining/10_git_desk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/10_git_desk.png
--------------------------------------------------------------------------------
/images/maintaining/11_git_desk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/11_git_desk.png
--------------------------------------------------------------------------------
/images/maintaining/12_git_desk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/12_git_desk.png
--------------------------------------------------------------------------------
/images/maintaining/13_git_desk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/13_git_desk.png
--------------------------------------------------------------------------------
/images/maintaining/14_git_cmd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/14_git_cmd.png
--------------------------------------------------------------------------------
/images/maintaining/15_git_cmd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/15_git_cmd.png
--------------------------------------------------------------------------------
/images/maintaining/16_git_cmd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/16_git_cmd.png
--------------------------------------------------------------------------------
/images/maintaining/17_git_cmd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/17_git_cmd.png
--------------------------------------------------------------------------------
/images/maintaining/18_git_cmd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/18_git_cmd.png
--------------------------------------------------------------------------------
/images/maintaining/19_git_cmd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/19_git_cmd.png
--------------------------------------------------------------------------------
/images/maintaining/20_edit_mk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/20_edit_mk.png
--------------------------------------------------------------------------------
/images/maintaining/21_version.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/21_version.png
--------------------------------------------------------------------------------
/images/maintaining/22_version.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/22_version.png
--------------------------------------------------------------------------------
/images/maintaining/23_version.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jncc/s1-s2-ard-code-list/d82f2a66154fd8e9046743496e914ebf08b7310f/images/maintaining/23_version.png
--------------------------------------------------------------------------------