[OSGeoLive] #2330: opendatacube jupyter notebooks

OSGeoLive trac_osgeolive at osgeo.org
Wed Aug 3 21:55:20 PDT 2022


#2330: opendatacube jupyter notebooks
-----------------------------------+----------------------------
 Reporter:  darkblueb              |       Owner:  osgeolive@…
     Type:  enhancement            |      Status:  new
 Priority:  major                  |   Milestone:  OSGeoLive15.0
Component:  OSGeoLive              |  Resolution:
 Keywords:  jupyter, opendatacube  |
-----------------------------------+----------------------------
Comment (by darkblueb):

 **ol15** build 167s
 {{{
 user at osgeolive:~$ ./do_setup_datacube.sh
 CREATE EXTENSION
 CREATE EXTENSION
 2022-08-04 04:52:11,495 8363 datacube INFO Running datacube command:
 /usr/bin/datacube -v system init
 Initialising database...
 2022-08-04 04:52:11,991 8363 datacube.drivers.postgres._core INFO Ensuring
 user roles.
 2022-08-04 04:52:11,997 8363 datacube.drivers.postgres._core INFO Creating
 schema.
 2022-08-04 04:52:11,998 8363 datacube.drivers.postgres._core INFO Creating
 tables.
 2022-08-04 04:52:12,028 8363 datacube.drivers.postgres._core INFO Creating
 triggers.
 2022-08-04 04:52:12,032 8363 datacube.drivers.postgres._core INFO Creating
 added column.
 2022-08-04 04:52:12,033 8363 datacube.drivers.postgres._core INFO Adding
 role grants.
 2022-08-04 04:52:12,035 8363 datacube.index.postgres.index INFO Adding
 default metadata types.
 Created.
 Checking indexes/views.
 2022-08-04 04:52:12,217 8363 datacube.drivers.postgres._api INFO Checking
 dynamic views/indexes. (rebuild views=True, indexes=False)
 Done.
 Adding "clip_landsat" (this might take a while) DONE
 }}}

 {{{
 user at osgeolive:~$ cat do_setup_datacube.sh
 #!/bin/sh

 createdb datacube
 psql datacube -c 'create extension postgis'
 psql datacube -c 'create extension hstore'

 ##---------------------------------------------
 mkdir ~/.config/datacube

 cat << EOF > ~/.config/datacube/landsat-clip.yml
 name: clip_landsat
 description: example ortho imagery
 metadata_type: eo3

 license: CC-BY-4.0

 metadata:
   product:
     name: clip_landsat

 storage:
   crs: EPSG:32619
   resolution:
     longitude: 28.497418829384827
     latitude: -28.503958771796388

 measurements:
   - name: imagery
     dtype: uint8
     nodata: -32768.0
     units: "meter"

 EOF

 #----------------------------------------------
 cat << EOF >  ~/.config/datacube/datacube.conf
 [datacube]
 db_database: datacube

 # A blank host will use a local socket. Specify a hostname (such as
 localhost) to use TCP.
 db_hostname:

 # Credentials are optional: you might have other Postgres authentication
 configured.
 # The default username otherwise is the current user id.
 db_username: user
 db_password: user
 EOF

 ##-------------------------------------------------
 USER=user
 DCONF=/home/${USER}/.config/datacube
 export DATACUBE_CONFIG_PATH=${DCONF}/datacube.conf

 datacube -v system init

 datacube product add ${DCONF}/landsat-clip.yml

 }}}
-- 
Ticket URL: <https://trac.osgeo.org/osgeolive/ticket/2330#comment:7>
OSGeoLive <https://live.osgeo.org/>
self-contained bootable DVD, USB thumb drive or Virtual Machine based on Lubuntu, that allows you to try a wide variety of open source geospatial software without installing anything.


More information about the osgeolive mailing list