Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Wit, Allard de
grompy
Commits
b040846d
Commit
b040846d
authored
Apr 18, 2021
by
Wit, Allard de
Browse files
- Updated the readme on grompy commandline
parent
5e1f40c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
b040846d
...
...
@@ -28,7 +28,7 @@ This includes the paths to the different CSV files, the path to the shapefile wi
the URI for the database where the data have to be written. The
`grompy.yaml`
file is the entry point for all
other grompy operations as well as the
`DataAccessProvider`
.
The
`grompy.yaml`
file can be generated with the command
`grompy init <data path>`
and for doing so, grompy assumes
The
`grompy.yaml`
file can be generated with the command
`grompy init
<year>
<data path>`
and for doing so, grompy assumes
a certain folder structure which looks like this:
```
<data path> /BRP/gewaspercelen_<year>.shp
...
...
@@ -36,11 +36,13 @@ a certain folder structure which looks like this:
/Radar/ - CSV with radar data
```
In practice it is most convenient to keep the
`grompy.yaml`
file together with the data. So change directory
In practice it is most convenient to keep the
`grompy.yaml`
file together with the data and use paths relative
to the location of the
`grompy.yaml`
file. In this way you can copy to the grompy.yaml file and the corresponding
database to another location without having to edit the
`grompy.yaml`
file. So change directory
to the data folder and execute:
```
commandline
cd <data path>
grompy init .
grompy init
2019
.
```
The init command creates the
`grompy.yaml`
and sets the path to the inputs/outputs based on the input
...
...
@@ -49,30 +51,30 @@ for `<data path>`. In this case, the current directory `.`. The `grompy.yaml` no
grompy
:
version
:
1.0
parcel_info
:
dsn
:
sqlite:///
/home/wit015/Data/groenmonitor
/parcel_info.db3
counts_file
:
/home/wit015/Data/groenmonitor
/Optisch/perceelscount.csv
shape_file
:
/home/wit015/Data/groenmonitor
/BRP/gewaspercelen_2019.shp
dsn
:
sqlite:///
.
/parcel_info.db3
counts_file
:
.
/Optisch/perceelscount.csv
shape_file
:
.
/BRP/gewaspercelen_2019.shp
table_name
:
parcel_info
datasets
:
sentinel2_reflectance_values
:
dsn
:
sqlite:///
/home/wit015/Data/groenmonitor
/sentinel2_reflectance_values.db3
dsn
:
sqlite:///
.
/sentinel2_reflectance_values.db3
bands
:
NDVI
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_mean_2019_ADC.csv
B02
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_mean_B02_2019_ADC.csv
B03
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_mean_B03_2019_ADC.csv
B04
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_mean_B04_2019_ADC.csv
B05
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_mean_B05_2019_ADC.csv
B06
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_mean_B06_2019_ADC.csv
B07
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_mean_B07_2019_ADC.csv
B08
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_mean_B08_2019_ADC.csv
B11
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_mean_B11_2019_ADC.csv
B12
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_mean_B12_2019_ADC.csv
B8A
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_mean_B8A_2019_ADC.csv
NDVI
:
.
/Optisch/zonal_stats_mean_2019_ADC.csv
B02
:
.
/Optisch/zonal_stats_mean_B02_2019_ADC.csv
B03
:
.
/Optisch/zonal_stats_mean_B03_2019_ADC.csv
B04
:
.
/Optisch/zonal_stats_mean_B04_2019_ADC.csv
B05
:
.
/Optisch/zonal_stats_mean_B05_2019_ADC.csv
B06
:
.
/Optisch/zonal_stats_mean_B06_2019_ADC.csv
B07
:
.
/Optisch/zonal_stats_mean_B07_2019_ADC.csv
B08
:
.
/Optisch/zonal_stats_mean_B08_2019_ADC.csv
B11
:
.
/Optisch/zonal_stats_mean_B11_2019_ADC.csv
B12
:
.
/Optisch/zonal_stats_mean_B12_2019_ADC.csv
B8A
:
.
/Optisch/zonal_stats_mean_B8A_2019_ADC.csv
sentinel2_reflectance_std
:
dsn
:
sqlite:///
/home/wit015/Data/groenmonitor
/sentinel2_reflectance_std.db3
dsn
:
sqlite:///
.
/sentinel2_reflectance_std.db3
bands
:
NDVI
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_std_2019_ADC.csv
B02
:
/home/wit015/Data/groenmonitor
/Optisch/zonal_stats_std_B02_2019_ADC.csv
NDVI
:
.
/Optisch/zonal_stats_std_2019_ADC.csv
B02
:
.
/Optisch/zonal_stats_std_B02_2019_ADC.csv
...
```
The
`grompy.yaml`
file specifies several sections:
...
...
@@ -103,13 +105,13 @@ The `grompy.yaml` is a relatively complex input structure and manually checking
Therefore, grompy can check if the YAML file is OK by executing:
```
commandline
grompy check
grompy check
<grompy_yaml>
```
It assumes that the
`grompy.yaml`
resides in the current directory. Grompy will now read the YAML and carry out
several checks, including:
Grompy will now read the YAML and carry out several checks, including:
-
If files exists.
-
If connections to database can be opened.
-
If the CSV files of the different datasets all have the same number of lines.
-
If the shapefile with parcel info has the required attributes.
Grompy will display a lot of output on the screen. If everything is fine, the last line will show:
```
commandline
...
...
@@ -125,8 +127,7 @@ run `grompy check` first.
### loading
The final step is to load the parcel information and satellite observations into the database tables. This can be
done with the
`grompy load`
command. Also here grompy assumes that the
`grompy.yaml`
file resides in the current
directory. Grompy will now show the following output:
done with the
`grompy load <grompy_yaml>`
command. Grompy will now show the following output:
```
commandline
Start loading parcel information. This will take some time...
Starting loading of: sentinel1_backscatter
...
...
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