Mercurial > dive4elements > river
comparison artifacts/doc/conf/meta-data.xml @ 8121:82af749d5ab3
Add SQ time interval to selection tree in datacage for sediment loads.
author | "Tom Gottfried <tom@intevation.de>" |
---|---|
date | Fri, 22 Aug 2014 17:43:36 +0200 |
parents | b57f4bcd0f6f |
children | aca5d1c87755 |
comparison
equal
deleted
inserted
replaced
8120:b57f4bcd0f6f | 8121:82af749d5ab3 |
---|---|
1448 </dc:group> | 1448 </dc:group> |
1449 </dc:if> | 1449 </dc:if> |
1450 </dc:macro> | 1450 </dc:macro> |
1451 | 1451 |
1452 <dc:macro name="sedimentloads-filter"> | 1452 <dc:macro name="sedimentloads-filter"> |
1453 <years> | 1453 <dc:group expr="concat('SQ ', dc:date-format('yyyy', $sqstart), '-', |
1454 <dc:filter expr="string-length(dc:get('endyear')) = 0" > | 1454 dc:date-format('yyyy', $sqstop))"> |
1455 <dc:macro-body/> | 1455 <sq_time description="{dc:group-key()}"> |
1456 </dc:filter> | 1456 <years> |
1457 </years> | 1457 <dc:filter expr="string-length(dc:get('endyear')) = 0" > |
1458 <epochs> | 1458 <dc:macro-body/> |
1459 <dc:filter expr="string-length(dc:get('endyear')) > 0" > | 1459 </dc:filter> |
1460 <dc:macro-body/> | 1460 </years> |
1461 </dc:filter> | 1461 <epochs> |
1462 </epochs> | 1462 <dc:filter expr="string-length(dc:get('endyear')) > 0" > |
1463 <dc:macro-body/> | |
1464 </dc:filter> | |
1465 </epochs> | |
1466 </sq_time> | |
1467 </dc:group> | |
1463 </dc:macro> | 1468 </dc:macro> |
1464 | 1469 |
1465 <dc:macro name="sedimentloads"> | 1470 <dc:macro name="sedimentloads"> |
1466 <dc:comment> | 1471 <dc:comment> |
1467 This is the macro for static datacage "Sedimentloads". | 1472 This is the macro for static datacage "Sedimentloads". |
1475 SELECT DISTINCT | 1480 SELECT DISTINCT |
1476 sy.id AS syid, | 1481 sy.id AS syid, |
1477 sy.description AS description, | 1482 sy.description AS description, |
1478 ti.start_time AS startyear, | 1483 ti.start_time AS startyear, |
1479 ti.stop_time AS endyear, | 1484 ti.stop_time AS endyear, |
1485 sq.start_time AS sqstart, | |
1486 sq.stop_time AS sqstop, | |
1480 gf.name AS fraction | 1487 gf.name AS fraction |
1481 FROM sediment_load sy | 1488 FROM sediment_load sy |
1482 JOIN sediment_load_values syv | 1489 JOIN sediment_load_values syv |
1483 ON sy.id = syv.sediment_load_id | 1490 ON sy.id = syv.sediment_load_id |
1484 JOIN measurement_station ms | 1491 JOIN measurement_station ms |
1485 ON ms.id = syv.measurement_station_id | 1492 ON ms.id = syv.measurement_station_id |
1486 JOIN rivers r ON ms.river_id = r.id | 1493 JOIN rivers r ON ms.river_id = r.id |
1487 JOIN time_intervals ti ON sy.time_interval_id = ti.id | 1494 JOIN time_intervals ti ON sy.time_interval_id = ti.id |
1495 JOIN time_intervals sq ON sy.sq_time_interval_id = sq.id | |
1488 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id | 1496 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id |
1489 WHERE r.id = ${river_id} | 1497 WHERE r.id = ${river_id} |
1490 AND ms.station BETWEEN ${fromkm} AND ${tokm} | 1498 AND ms.station BETWEEN ${fromkm} AND ${tokm} |
1491 ORDER BY fraction, startyear DESC, endyear DESC | 1499 ORDER BY sqstart DESC, sqstop DESC, |
1500 fraction, startyear DESC, endyear DESC | |
1492 </dc:statement> | 1501 </dc:statement> |
1493 <dc:call-macro name="sedimentloads-filter"> | 1502 <dc:call-macro name="sedimentloads-filter"> |
1494 <dc:call-macro name="loads"> | 1503 <dc:call-macro name="loads"> |
1495 <dc:call-macro name="load"/> | 1504 <dc:call-macro name="load"/> |
1496 </dc:call-macro> | 1505 </dc:call-macro> |
1503 SELECT DISTINCT | 1512 SELECT DISTINCT |
1504 sy.id AS syid, | 1513 sy.id AS syid, |
1505 sy.description AS description, | 1514 sy.description AS description, |
1506 ti.start_time AS startyear, | 1515 ti.start_time AS startyear, |
1507 ti.stop_time AS endyear, | 1516 ti.stop_time AS endyear, |
1517 sq.start_time AS sqstart, | |
1518 sq.stop_time AS sqstop, | |
1508 gf.name AS fraction | 1519 gf.name AS fraction |
1509 FROM sediment_load_ls sy | 1520 FROM sediment_load_ls sy |
1510 JOIN rivers r ON sy.river_id = r.id | 1521 JOIN rivers r ON sy.river_id = r.id |
1511 JOIN sediment_load_ls_values syv | 1522 JOIN sediment_load_ls_values syv |
1512 ON sy.id = syv.sediment_load_ls_id | 1523 ON sy.id = syv.sediment_load_ls_id |
1513 JOIN time_intervals ti ON sy.time_interval_id = ti.id | 1524 JOIN time_intervals ti ON sy.time_interval_id = ti.id |
1525 JOIN time_intervals sq ON sy.sq_time_interval_id = sq.id | |
1514 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id | 1526 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id |
1515 WHERE r.id = ${river_id} | 1527 WHERE r.id = ${river_id} |
1516 AND syv.station BETWEEN ${fromkm} AND ${tokm} | 1528 AND syv.station BETWEEN ${fromkm} AND ${tokm} |
1517 ORDER BY fraction, startyear DESC, endyear DESC | 1529 ORDER BY sqstart DESC, sqstop DESC, |
1530 fraction, startyear DESC, endyear DESC | |
1518 </dc:statement> | 1531 </dc:statement> |
1519 <dc:call-macro name="sedimentloads-filter"> | 1532 <dc:call-macro name="sedimentloads-filter"> |
1520 <dc:call-macro name="loads"> | 1533 <dc:call-macro name="loads"> |
1521 <dc:call-macro name="load_ls"/> | 1534 <dc:call-macro name="load_ls"/> |
1522 </dc:call-macro> | 1535 </dc:call-macro> |