You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: USING.rst
+180Lines changed: 180 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -267,6 +267,8 @@ Once the data cube definition is created, you can trigger a data cube using the
267
267
if you would like to generate data cube using a different STAC provider. Remember that the ``--collection`` must exists.
268
268
269
269
270
+
.. _create_sentinel:
271
+
270
272
Creating data cube Sentinel 2
271
273
-----------------------------
272
274
@@ -545,3 +547,181 @@ You can change any parameter with the command ``cube-builder configure`` with ``
545
547
Be aware of what you are changing to do not affect the integrity of data cube.
546
548
For example, changing the masking ``clear_data`` when there is a already area generated.
547
549
Make sure to re-generate all the periods and tiles again.
550
+
551
+
552
+
553
+
Advanced User Guide
554
+
-------------------
555
+
556
+
Generate data cubes from local dir
557
+
++++++++++++++++++++++++++++++++++
558
+
559
+
.. versionadded:: 1.0.0
560
+
561
+
.. note::
562
+
563
+
To proceed this step, you will need to have a set of files in disk.
564
+
We will not provide this files since its just a briefing of this feature. You may consider
565
+
to have own files individually.
566
+
567
+
568
+
With latest change of ``Cube-Builder`` (1.0), the user can generate data cubes using local directories containing
569
+
images. This feature is useful to generate data cubes when the user has a bunch of image files locally and would like
570
+
to apply temporal composition function over these files. In this case, a ``STAC Server`` is not required.
571
+
This feature can be achieved using parameters ``--local DIRECTORY`` and ``--format PATH_TO_FORMAT.json``.
572
+
It follows the signature of `GDALCubes Formats <https://github.com/appelmar/gdalcubes/tree/master/formats>`_ to read
573
+
directories.
574
+
Essentially, a format contains the following properties:
575
+
576
+
- ``images`` (REQUIRED): Object context representing how to seek for any image in disk.
577
+
578
+
- ``pattern`` (REQUIRED)
579
+
- ``datetime`` (REQUIRED): Object context describing how to identify data times from any directory path or file path.
580
+
581
+
- ``pattern`` (REQUIRED): A regex expression describing how to match datetime.
582
+
- ``format`` (REQUIRED): ISO Format to get data time from `str`.
583
+
584
+
- ``bands`` (REQUIRED): The data set bands that will be captured while recurring disk. You can also add extra fields to increment metadata of band. The following internal props are required:
585
+
586
+
- ``pattern``: Regex pattern to identify band in disk.
587
+
- ``nodata``: No data value for band.
588
+
- ``tags`` (OPTIONAL): List of keywords describing the given format.
589
+
- ``description`` (OPTIONAL): A detailed multi-line description to fully explain the format.
590
+
591
+
You can check a minimal example in ``examples/formats/bdc-sentinel-2-l2a-cogs.json``, which offers support to
592
+
locate ``Sentinel-2`` Cloud Optimized GeoTIFF files. You may also take a look in `GDALCubes Formats <https://github.com/appelmar/gdalcubes/tree/master/formats>`_
593
+
for others formats.
594
+
595
+
For this example, lets create a simple sentinel-2 data cube called ``S2-LOCAL-16D``. The signature is similar from
596
+
:ref:`create_sentinel`. We just need to change the cube parameters to something like::
"description": "This data cube contains all available images from Sentinel-2, resampled to 10 meters of spatial resolution, reprojected, cropped and mosaicked to BDC_SM grid and time composed each 16 days using LCF temporal composition function.",
0 commit comments