comparison flys-artifacts/doc/conf/meta-data.xml @ 5364:51db7fbc2e77

Add HWS Lines and HWS Points folder structures to the datacage
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 21 Mar 2013 16:52:07 +0100
parents d43ef9f709cd
children f099ca10684e
comparison
equal deleted inserted replaced
5363:7b35f2c070c3 5364:51db7fbc2e77
1258 </floodplain> 1258 </floodplain>
1259 </dc:if> 1259 </dc:if>
1260 </dc:elements> 1260 </dc:elements>
1261 </dc:context> 1261 </dc:context>
1262 </dc:macro> 1262 </dc:macro>
1263
1264 <dc:macro name="hwslines_by_kind">
1265 <dc:comment>
1266 Call from a context where fed_name hws_kind hws_name and river_id is
1267 availble
1268 </dc:comment>
1269 <Durchlass>
1270 <dc:elements filter="$hws_kind=1">
1271 <hws>
1272 <dc:attribute name="factory" value="wmshwslinesfactory"/>
1273 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1274 <dc:attribute name="name" value="${hws_name}"/>
1275 </hws>
1276 </dc:elements>
1277 </Durchlass>
1278 <Damm>
1279 <dc:elements filter="$hws_kind=2">
1280 <hws>
1281 <dc:attribute name="factory" value="wmshwslinesfactory"/>
1282 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1283 <dc:attribute name="name" value="${hws_name}"/>
1284 </hws>
1285 </dc:elements>
1286 </Damm>
1287 <Graben>
1288 <dc:elements filter="$hws_kind=3">
1289 <hws>
1290 <dc:attribute name="factory" value="wmshwslinesfactory"/>
1291 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1292 <dc:attribute name="name" value="${hws_name}"/>
1293 </hws>
1294 </dc:elements>
1295 </Graben>
1296 </dc:macro>
1297
1263 <dc:macro name="hwslines"> 1298 <dc:macro name="hwslines">
1264 <dc:context> 1299 <hws_lines>
1265 <dc:statement> 1300 <official>
1266 SELECT count(*) as km_exists, name as name 1301 <dc:context>
1267 FROM hws_lines WHERE river_id = ${river_id} GROUP BY name 1302 <dc:statement>
1268 </dc:statement> 1303 SELECT DISTINCT
1269 <dc:elements> 1304 fs.name AS fed_name,
1270 <dc:if test="$km_exists>0"> 1305 fs.id AS fed_id
1271 <line> 1306 FROM hws_lines hws
1272 <dc:attribute name="factory" value="wmshwslinesfactory"/> 1307 JOIN fed_states fs ON hws.fed_state_id = fs.id
1273 <dc:attribute name="ids" value="${river_id};${name}"/> 1308 WHERE river_id = ${river_id}
1274 <dc:attribute name="name" value="${name}"/> 1309 AND hws.official=1
1275 </line> 1310 </dc:statement>
1276 </dc:if> 1311 <dc:elements>
1312 <dc:context>
1313 <dc:statement>
1314 SELECT DISTINCT
1315 name AS hws_name,
1316 kind_id AS hws_kind
1317 FROM hws_lines
1318 WHERE river_id = ${river_id}
1319 AND official=1
1320 AND fed_state_id = ${fed_id} ORDER BY name
1321 </dc:statement>
1322 <fedstate>
1323 <dc:attribute name="description" value="${fed_name}"/>
1324 <dc:call-macro name="hwslines_by_kind"/>
1325 </fedstate>
1326 </dc:context>
1327 </dc:elements>
1328 </dc:context>
1329 <dc:context>
1330 <dc:statement>
1331 SELECT distinct
1332 name AS hws_name,
1333 kind_id AS hws_kind
1334 FROM hws_lines
1335 WHERE river_id = ${river_id}
1336 AND official=1
1337 AND fed_state_id IS NULL
1338 ORDER BY name
1339 </dc:statement>
1340 <hws_fed_unknown>
1341 <dc:call-macro name="hwslines_by_kind"/>
1342 </hws_fed_unknown>
1343 </dc:context>
1344 </official>
1345 <inofficial>
1346 <dc:context>
1347 <dc:statement>
1348 SELECT DISTINCT
1349 fs.name AS fed_name,
1350 fs.id AS fed_id
1351 FROM hws_lines hws
1352 JOIN fed_states fs ON hws.fed_state_id = fs.id
1353 WHERE river_id = ${river_id}
1354 AND hws.official=0
1355 </dc:statement>
1356 <dc:elements>
1357 <dc:context>
1358 <dc:statement>
1359 SELECT DISTINCT
1360 name AS hws_name,
1361 kind_id AS hws_kind
1362 FROM hws_lines
1363 WHERE river_id = ${river_id}
1364 AND official=0
1365 AND fed_state_id = ${fed_id} ORDER BY name
1366 </dc:statement>
1367 <fedstate>
1368 <dc:attribute name="description" value="${fed_name}"/>
1369 <dc:call-macro name="hwslines_by_kind"/>
1370 </fedstate>
1371 </dc:context>
1372 </dc:elements>
1373 </dc:context>
1374 <dc:context>
1375 <dc:statement>
1376 SELECT distinct
1377 name AS hws_name,
1378 kind_id AS hws_kind
1379 FROM hws_lines
1380 WHERE river_id = ${river_id}
1381 AND official=0
1382 AND fed_state_id IS NULL ORDER BY name
1383 </dc:statement>
1384 <hws_fed_unknown>
1385 <dc:call-macro name="hwslines_by_kind"/>
1386 </hws_fed_unknown>
1387 </dc:context>
1388 </inofficial>
1389 </hws_lines>
1390 </dc:macro>
1391
1392 <dc:macro name="hwspoints_by_kind">
1393 <dc:comment>
1394 Call from a context where fed_name hws_kind hws_name and river_id is
1395 availble
1396 </dc:comment>
1397 <Durchlass>
1398 <dc:elements filter="$hws_kind=1">
1399 <hws>
1400 <dc:attribute name="factory" value="wmshwspointsfactory"/>
1401 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1402 <dc:attribute name="name" value="${hws_name}"/>
1403 </hws>
1277 </dc:elements> 1404 </dc:elements>
1278 </dc:context> 1405 </Durchlass>
1406 <Damm>
1407 <dc:elements filter="$hws_kind=2">
1408 <hws>
1409 <dc:attribute name="factory" value="wmshwspointsfactory"/>
1410 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1411 <dc:attribute name="name" value="${hws_name}"/>
1412 </hws>
1413 </dc:elements>
1414 </Damm>
1415 <Graben>
1416 <dc:elements filter="$hws_kind=3">
1417 <hws>
1418 <dc:attribute name="factory" value="wmshwspointsfactory"/>
1419 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1420 <dc:attribute name="name" value="${hws_name}"/>
1421 </hws>
1422 </dc:elements>
1423 </Graben>
1279 </dc:macro> 1424 </dc:macro>
1425
1280 <dc:macro name="hwspoints"> 1426 <dc:macro name="hwspoints">
1281 <dc:context> 1427 <hws_points>
1282 <dc:statement> 1428 <official>
1283 SELECT count(*) as km_exists, name as name 1429 <dc:context>
1284 FROM hws_points WHERE river_id = ${river_id} GROUP BY name 1430 <dc:statement>
1285 </dc:statement> 1431 SELECT DISTINCT
1286 <dc:elements> 1432 fs.name AS fed_name,
1287 <dc:if test="$km_exists>0"> 1433 fs.id AS fed_id
1288 <line> 1434 FROM hws_points hws
1289 <dc:attribute name="factory" value="wmshwspointsfactory"/> 1435 JOIN fed_states fs ON hws.fed_state_id = fs.id
1290 <dc:attribute name="ids" value="${river_id};${name}"/> 1436 WHERE river_id = ${river_id}
1291 <dc:attribute name="name" value="${name}"/> 1437 AND hws.official=1
1292 </line> 1438 </dc:statement>
1293 </dc:if> 1439 <dc:elements>
1294 </dc:elements> 1440 <dc:context>
1295 </dc:context> 1441 <dc:statement>
1296 </dc:macro> 1442 SELECT DISTINCT
1443 name AS hws_name,
1444 kind_id AS hws_kind
1445 FROM hws_points
1446 WHERE river_id = ${river_id}
1447 AND official=1
1448 AND fed_state_id = ${fed_id} ORDER BY name
1449 </dc:statement>
1450 <fedstate>
1451 <dc:attribute name="description" value="${fed_name}"/>
1452 <dc:call-macro name="hwspoints_by_kind"/>
1453 </fedstate>
1454 </dc:context>
1455 </dc:elements>
1456 </dc:context>
1457 <dc:context>
1458 <dc:statement>
1459 SELECT distinct
1460 name AS hws_name,
1461 kind_id AS hws_kind
1462 FROM hws_points
1463 WHERE river_id = ${river_id}
1464 AND official=1
1465 AND fed_state_id IS NULL
1466 ORDER BY name
1467 </dc:statement>
1468 <hws_fed_unknown>
1469 <dc:call-macro name="hwspoints_by_kind"/>
1470 </hws_fed_unknown>
1471 </dc:context>
1472 </official>
1473 <inofficial>
1474 <dc:context>
1475 <dc:statement>
1476 SELECT DISTINCT
1477 fs.name AS fed_name,
1478 fs.id AS fed_id
1479 FROM hws_points hws
1480 JOIN fed_states fs ON hws.fed_state_id = fs.id
1481 WHERE river_id = ${river_id}
1482 AND hws.official=0
1483 </dc:statement>
1484 <dc:elements>
1485 <dc:context>
1486 <dc:statement>
1487 SELECT DISTINCT
1488 name AS hws_name,
1489 kind_id AS hws_kind
1490 FROM hws_points
1491 WHERE river_id = ${river_id}
1492 AND official=0
1493 AND fed_state_id = ${fed_id} ORDER BY name
1494 </dc:statement>
1495 <fedstate>
1496 <dc:attribute name="description" value="${fed_name}"/>
1497 <dc:call-macro name="hwspoints_by_kind"/>
1498 </fedstate>
1499 </dc:context>
1500 </dc:elements>
1501 </dc:context>
1502 <dc:context>
1503 <dc:statement>
1504 SELECT distinct
1505 name AS hws_name,
1506 kind_id AS hws_kind
1507 FROM hws_points
1508 WHERE river_id = ${river_id}
1509 AND official=0
1510 AND fed_state_id IS NULL ORDER BY name
1511 </dc:statement>
1512 <hws_fed_unknown>
1513 <dc:call-macro name="hwspoints_by_kind"/>
1514 </hws_fed_unknown>
1515 </dc:context>
1516 </inofficial>
1517 </hws_points>
1518 </dc:macro>
1519
1520
1297 <dc:macro name="flood-map-buildings"> 1521 <dc:macro name="flood-map-buildings">
1298 <dc:context> 1522 <dc:context>
1299 <dc:statement> 1523 <dc:statement>
1300 SELECT count(*) as km_exists, name as name 1524 SELECT count(*) as km_exists, name as name
1301 FROM buildings WHERE river_id = ${river_id} GROUP BY name 1525 FROM buildings WHERE river_id = ${river_id} GROUP BY name
1452 </riveraxis> 1676 </riveraxis>
1453 <dc:call-macro name="flood-map-km"/> 1677 <dc:call-macro name="flood-map-km"/>
1454 <dc:call-macro name="flood-map-qps"/> 1678 <dc:call-macro name="flood-map-qps"/>
1455 </kilometrage> 1679 </kilometrage>
1456 <hws> 1680 <hws>
1457 <hws_lines> 1681 <dc:call-macro name="hwslines"/>
1458 <dc:call-macro name="hwslines"/> 1682 <dc:call-macro name="hwspoints"/>
1459 </hws_lines>
1460 <hws_points>
1461 <dc:call-macro name="hwspoints"/>
1462 </hws_points>
1463 </hws> 1683 </hws>
1464 <dc:call-macro name="flood-map-uesk"/> 1684 <dc:call-macro name="flood-map-uesk"/>
1465 <gaugelocations> 1685 <gaugelocations>
1466 <dc:call-macro name="flood-map-gaugelocations"/> 1686 <dc:call-macro name="flood-map-gaugelocations"/>
1467 </gaugelocations> 1687 </gaugelocations>

http://dive4elements.wald.intevation.org