Changes between Version 67 and Version 68 of PetascopeDevGuide


Ignore:
Timestamp:
Dec 30, 2015 3:14:16 PM (21 months ago)
Author:
pbaumann
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PetascopeDevGuide

    v67 v68  
    135135For a concrete example of metadata for a coverage, please run our [RasdamanTestSuites#Petascopetests systemtests], then checkout the data for the inserted coverages, possibly with the help of our [wiki:PetascopeUserGuide#SQLmacros stored procedures].
    136136
    137 === Updating the schema ===
     137=== SQL macros ===
     138
     139A first set of SQL macros is made available for users (and devs) in order to ease the analysis of the (currently only gridded-) coverage metadata in ''petascopedb'', and they are hereby explained with examples.
     140
     141 `getCrs('<coverage_name>')` ::
     142    Returns the ordered sequence of single CRS URIs which together constitute the (composed) native CRS of the coverage (such URIs for single CRSs will we shown together on a single compound URI (`def/crs-compound?`) in the WCS responses):
     143{{{
     144petascopedb=# SELECT * FROM getCrs('eobstest');
     145 id |                                       uri                                       
     146----+----------------------------------------------------------------------------------
     147 11 | http://localhost:8080/def/crs/OGC/0/Temporal?epoch="1950-01-01T00:00:00"&uom="d"
     148 12 | http://localhost:8080/def/crs/EPSG/0/4326
     149(2 rows)
     150}}}
     151 `getDomainSet('<coverage_name>')` ::
     152   Returnes the CRS coordinates of grid origin and of every offset vector of the coverage, ordered by the order of grid axis inside ''rasdaman'':
     153{{{
     154petascopedb=# SELECT * FROM getDomainSet('eobstest');
     155 rasdaman_order | grid_origin | offset_vector
     156----------------+-------------+---------------
     157              0 | {0,75.5,25} | {1,0,0}
     158              1 | {0,75.5,25} | {0,0,0.5}
     159              2 | {0,75.5,25} | {0,-0.5,0}
     160(3 rows)
     161}}}
     162 `getRangeSet('<coverage_name>')` ::
     163   Returns the collection and the internal marray (its OID) associated with the coverage; optionally the ''rasdaman'' base type can be set:
     164{{{
     165petascopedb=# SELECT * FROM getRangeSet('eobstest');
     166 coverage name | collection name | collection OID | base_type
     167---------------+-----------------+----------------+-----------
     168 eobstest      | eobstest        |         176641 |
     169(1 row)
     170}}}
     171 `getRangeType('<coverage_name>')` ::
     172    Returns a description of principal SWE metadata for each component of the coverage's range (that is, each band or channel):
     173{{{
     174petascopedb=# SELECT * FROM getRangeType('rgb');
     175 component order | name  | SWE type |   data type   | UoM  | allowed interval(s)
     176-----------------+-------+----------+---------------+------+---------------------
     177               0 | red   | Quantity | unsigned char | 10^0 | (0,255)
     178               1 | green | Quantity | unsigned char | 10^0 | (0,255)
     179               2 | blue  | Quantity | unsigned char | 10^0 | (0,255)
     180(3 rows)
     181}}}
     182
     183Further macros will be developed, but please contact the [MailingLists mailing lists] if you want to suggest/request a specific change to existing macros, or a new one.
     184
     185
     186== Updating the schema ==
    138187
    139188Different versions of the database are tracked in the table __'''`ps_dbupdates`'''__, which stores the version number `<N>`__`+1`__ as a simple integer value.
     
    167216A final note: to avoid clashes with old existing tables during the upgrade while not breaking running services, new tables have a temporary `ps9` prefix while co-existing with the other pre-upgrade tables: at the end of a successful [browser:applications/petascope/src/main/db/petascope/update8.sh upgrade], such tables (+ primary indexes) are renamed back to the usual `ps` prefix. Some non-primary indexes and constraints might still harmlessly have `ps9` prefix though. Check the [https://groups.google.com/d/msg/rasdaman-dev/M0eibKBS16A/VvTVASuR0r4J discussion] in the mailing list for further insights.
    168217
    169 === Limitations ===
    170 
     218== Limitations ==
    171219The current schema supports gridded and multipoint coverages. However, it is designed to be extensible to further types in the [http://www.schemacentral.com/sc/niem21/e-gml32_AbstractCoverage.html coverage hierarchy].
    172220
     
    174222
    175223Finally, just SWE ''quantities'' are currently supported: other kinds of SWE data fields (''category'', ''count'', etc.) can be easily extended though. SWE metadata is partially configurable (#582) and also currently partially supported by Petascope (#573).
     224
     225=== legacy (v8.x) ===
     226
     227Release 9.0 of rasdaman included a complete re-design of the Petascope database schema.
     228For v8.x devs, documentation of the old database schema can be downloaded from [attachment:schema8.zip here].
    176229
    177230== WCPS grammar ==
     
    206259 * [PetascopeTimeHandling Time handling]
    207260 * [https://groups.google.com/d/msg/rasdaman-dev/i5gm84T1EoU/fe6RhdKp-tMJ Petascope coverage model]
    208  * ...
    209261
    210262== Tickets ==