|
37 | 37 | */ |
38 | 38 | v_package_log_prop_text varchar2(30); |
39 | 39 | function package_log_property_text return varchar2; |
40 | | - /* |
41 | | - * undocumented function store_local_datum_name |
42 | | - * |
43 | | - * If p_vertical_datum_id is not a standard vertical datum id, then store the |
44 | | - * value as the local datum name for the location and return 'LOCAL'. |
| 40 | + /** |
| 41 | + * Normalizes and stores the local vertical datum for a location. |
| 42 | + * <ul> |
| 43 | + * <li>If P_Vertical_Datum_Id is some recognized form of 'NGVD29' or 'NAVD88' then stores the normalized form in AT_PHYSICAL_LOCATION.</li> |
| 44 | + * <li>Otherwise |
| 45 | + * <ul> |
| 46 | + * <li>Stores 'LOCAL' in AT_PHYSICAL_LOCATION</li> |
| 47 | + * <li>Stores P_Vertical_Datum_Id in AT_VERT_DATUM_LOCAL if not 'LOCAL' or 'OTHER'</li> |
| 48 | + * </ul></li> |
| 49 | + * </ul> |
45 | 50 | * |
46 | | - * Otherwise return p_vertical_datum_id unchanged. |
| 51 | + * @param p_location_code The unique numeric identifier associated with the location in the database |
| 52 | + * @param p_vertical_datum_id The vertical datum identifier |
| 53 | + * @return The value stored in AT_PHYSICAL_LOCATION: 'NGVD29', 'NAVD88', or 'LOCAL' |
47 | 54 | */ |
48 | 55 | function store_local_datum_name( |
49 | 56 | p_location_code in integer, |
50 | 57 | p_vertical_datum_id in varchar2) |
51 | 58 | return varchar2 deterministic; |
52 | | - |
| 59 | + /** |
| 60 | + * Normalizes recognized forms of 'NGVD29' and 'NAVD88' (accepts any case and space or hyphen before digits) and converts 'OTHER' to 'LOCAL'. |
| 61 | + * If P_Vertical_Datum_Id is not recognized as one of these forms its value is returned unaltered. |
| 62 | + * |
| 63 | + * @param p_vertical_datum_id The vertical datum id to normalize. |
| 64 | + * @return 'NGVD29', 'NAVD88', 'LOCAL', or p_vertical_datum_id |
| 65 | + */ |
| 66 | + function normalize_vertical_datum_in( |
| 67 | + p_vertical_datum_id in varchar2) |
| 68 | + return varchar2 deterministic; |
| 69 | + /** |
| 70 | + * Normalizes recognized forms of 'NGVD-29' and 'NAVD-88' (accepts any case and space or lack of hyphen before digits) and converts 'LOCAL' to 'OTHER'. |
| 71 | + * If P_Vertical_Datum_Id is not recognized as one of these forms its value is returned unaltered. |
| 72 | + * |
| 73 | + * @param p_vertical_datum_id The vertical datum id to normalize. |
| 74 | + * @return 'NGVD29', 'NAVD88', 'LOCAL', or p_vertical_datum_id |
| 75 | + */ |
| 76 | + function normalize_vertical_datum_out( |
| 77 | + p_vertical_datum_id in varchar2) |
| 78 | + return varchar2 deterministic; |
53 | 79 | /** |
54 | 80 | * Clears all session-level caches associated with this package |
55 | 81 | */ |
|
2097 | 2123 | p_office_id in varchar2 default null) |
2098 | 2124 | return varchar2; |
2099 | 2125 | /** |
2100 | | - * Retrieves a XML string containing the elevation, native datum, and elevation offsets to other datums for the specified location |
| 2126 | + * Retrieves a XML string containing the elevation, native datum, and current elevation offsets to other datums for the specified location |
2101 | 2127 | * |
2102 | 2128 | * @since CWMS 2.2 |
2103 | 2129 | * |
|
2110 | 2136 | p_location_code in number, |
2111 | 2137 | p_unit in varchar2); |
2112 | 2138 | /** |
2113 | | - * Retrieves a XML string containing the elevation, native datum, and elevation offsets to other datums for the specified location or locations. |
| 2139 | + * Retrieves a XML string containing the elevation, native datum, and current elevation offsets to other datums for the specified location or locations. |
2114 | 2140 | * The in and out parmeters are limited to 4000 characters since they are of type varchar2. |
2115 | 2141 | * |
2116 | 2142 | * @since CWMS 2.2 |
|
2171 | 2197 | p_unit in varchar2, |
2172 | 2198 | p_office_id in varchar2 default null); |
2173 | 2199 | /** |
2174 | | - * Retrieves a XML string containing the elevation, native datum, and elevation offsets to other datums for the specified location or locations |
| 2200 | + * Retrieves a XML string containing the elevation, native datum, and current elevation offsets to other datums for the specified location or locations |
2175 | 2201 | * The in and out parmeters (except p_unit) are not limited in length. |
2176 | 2202 | * |
2177 | 2203 | * @param p_vert_datum_info The XML-encoded vertical datum information string. If p_location_id is a recordset the XML root element will be |
|
2230 | 2256 | p_unit in varchar2, |
2231 | 2257 | p_office_id in clob default null); |
2232 | 2258 | /** |
2233 | | - * Returns a XML string containing the elevation, native datum, and elevation offsets to other datums for the specified location |
| 2259 | + * Returns a XML string containing the elevation, native datum, and current elevation offsets to other datums for the specified location |
2234 | 2260 | * |
2235 | 2261 | * @since CWMS 2.2 |
2236 | 2262 | * |
|
2244 | 2270 | p_unit in varchar2) |
2245 | 2271 | return varchar2; |
2246 | 2272 | /** |
2247 | | - * Returns a XML string containing the elevation, native datum, and elevation offsets to other datums for the specified location |
| 2273 | + * Returns a XML string containing the elevation, native datum, and current elevation offsets to other datums for the specified location |
2248 | 2274 | * |
2249 | 2275 | * @since CWMS 2.2 |
2250 | 2276 | * |
@@ -2304,6 +2330,177 @@ AS |
2304 | 2330 | p_unit in varchar2, |
2305 | 2331 | p_office_id in varchar2 default null) |
2306 | 2332 | return varchar2; |
| 2333 | + /** |
| 2334 | + * Returns a XML string containing the elevation, native datum, and series of elevation offsets to other datums for the specified location. |
| 2335 | + * |
| 2336 | + * @param p_location_code The unique numeric code that identifies the location in the database |
| 2337 | + * @param p_unit The unit to return the elevation and elevation offsets in |
| 2338 | + * |
| 2339 | + * @return The XML-encoded vertical datum information string in the following format: |
| 2340 | + * <pre><big> |
| 2341 | + * <vertical-datum-info-series office="SWT" unit="ft"> |
| 2342 | + * <location>TestLoc1</location> |
| 2343 | + * <native-datum>OTHER</native-datum> |
| 2344 | + * <elevation>500</elevation> |
| 2345 | + * <local-datum-name>TestDatum</local-datum-name> |
| 2346 | + * <offset time="2000-01-01T00:00:00Z" estimate="false"> |
| 2347 | + * <to-datum>NGVD29</to-datum> |
| 2348 | + * <value>1.1</value> |
| 2349 | + * <description>1st Offset</description> |
| 2350 | + * </offset> |
| 2351 | + * <offset time="2000-01-01T00:00:00Z" estimate="true"> |
| 2352 | + * <to-datum>NAVD88</to-datum> |
| 2353 | + * <value>1.15</value> |
| 2354 | + * <description/> |
| 2355 | + * </offset> |
| 2356 | + * <offset time="2010-01-01T00:00:00Z" estimate="false"> |
| 2357 | + * <to-datum>NGVD29</to-datum> |
| 2358 | + * <value>1.3</value> |
| 2359 | + * <description>2nd Offset</description> |
| 2360 | + * </offset> |
| 2361 | + * <offset time="2010-01-01T00:00:00Z" estimate="true"> |
| 2362 | + * <to-datum>NAVD88</to-datum> |
| 2363 | + * <value>1.35</value> |
| 2364 | + * <description/> |
| 2365 | + * </offset> |
| 2366 | + * <offset time="2012-05-11T00:00:00Z" estimate="false"> |
| 2367 | + * <to-datum>NAVD88</to-datum> |
| 2368 | + * <value>1.785</value> |
| 2369 | + * <description/> |
| 2370 | + * </offset> |
| 2371 | + * <offset time="2020-01-01T00:00:00Z" estimate="false"> |
| 2372 | + * <to-datum>NGVD29</to-datum> |
| 2373 | + * <value>1.5</value> |
| 2374 | + * <description>3rd Offset</description> |
| 2375 | + * </offset> |
| 2376 | + * <offset time="2020-01-01T00:00:00Z" estimate="false"> |
| 2377 | + * <to-datum>NAVD88</to-datum> |
| 2378 | + * <value>1.985</value> |
| 2379 | + * <description/> |
| 2380 | + * </offset> |
| 2381 | + * </vertical-datum-info-series> |
| 2382 | + * </big></pre> |
| 2383 | + */ |
| 2384 | + function get_vertical_datum_info_series_f( |
| 2385 | + p_location_code in number, |
| 2386 | + p_unit in varchar2) |
| 2387 | + return clob; |
| 2388 | + /** |
| 2389 | + * Returns a XML string containing the elevation, native datum, and series of elevation offsets to other datums for the specified location. |
| 2390 | + * |
| 2391 | + * @param p_location_id The text name the location |
| 2392 | + * @param p_unit The unit to return the elevation and elevation offsets in |
| 2393 | + * @param p_office_id The office that owns the location. If not specified or NULL, the session user's default office is used. |
| 2394 | + * |
| 2395 | + * @return The XML-encoded vertical datum information string in the following format: |
| 2396 | + * <pre><big> |
| 2397 | + * <vertical-datum-info-series office="SWT" unit="ft"> |
| 2398 | + * <location>TestLoc1</location> |
| 2399 | + * <native-datum>OTHER</native-datum> |
| 2400 | + * <elevation>500</elevation> |
| 2401 | + * <local-datum-name>TestDatum</local-datum-name> |
| 2402 | + * <offset time="2000-01-01T00:00:00Z" estimate="false"> |
| 2403 | + * <to-datum>NGVD29</to-datum> |
| 2404 | + * <value>1.1</value> |
| 2405 | + * <description>1st Offset</description> |
| 2406 | + * </offset> |
| 2407 | + * <offset time="2000-01-01T00:00:00Z" estimate="true"> |
| 2408 | + * <to-datum>NAVD88</to-datum> |
| 2409 | + * <value>1.15</value> |
| 2410 | + * <description/> |
| 2411 | + * </offset> |
| 2412 | + * <offset time="2010-01-01T00:00:00Z" estimate="false"> |
| 2413 | + * <to-datum>NGVD29</to-datum> |
| 2414 | + * <value>1.3</value> |
| 2415 | + * <description>2nd Offset</description> |
| 2416 | + * </offset> |
| 2417 | + * <offset time="2010-01-01T00:00:00Z" estimate="true"> |
| 2418 | + * <to-datum>NAVD88</to-datum> |
| 2419 | + * <value>1.35</value> |
| 2420 | + * <description/> |
| 2421 | + * </offset> |
| 2422 | + * <offset time="2012-05-11T00:00:00Z" estimate="false"> |
| 2423 | + * <to-datum>NAVD88</to-datum> |
| 2424 | + * <value>1.785</value> |
| 2425 | + * <description/> |
| 2426 | + * </offset> |
| 2427 | + * <offset time="2020-01-01T00:00:00Z" estimate="false"> |
| 2428 | + * <to-datum>NGVD29</to-datum> |
| 2429 | + * <value>1.5</value> |
| 2430 | + * <description>3rd Offset</description> |
| 2431 | + * </offset> |
| 2432 | + * <offset time="2020-01-01T00:00:00Z" estimate="false"> |
| 2433 | + * <to-datum>NAVD88</to-datum> |
| 2434 | + * <value>1.985</value> |
| 2435 | + * <description/> |
| 2436 | + * </offset> |
| 2437 | + * </vertical-datum-info-series> |
| 2438 | + * </big></pre> |
| 2439 | + */ |
| 2440 | + function get_vertical_datum_info_series_f( |
| 2441 | + p_location_id in varchar2, |
| 2442 | + p_unit in varchar2, |
| 2443 | + p_office_id in varchar2) |
| 2444 | + return clob; |
| 2445 | + /** |
| 2446 | + * Sets the vertical datum info for a location, overwriting any existing vertical datum info with the following exceptions: |
| 2447 | + * <ul> |
| 2448 | + * <li>A missing (null) elevation in the XML will not overwrite an existing elevation in the database</li> |
| 2449 | + * <li>A missing (null) local datum name (if the native datum in 'LOCAL' or 'OTHER') will not overwrite an existing local datum name in the database</li> |
| 2450 | + * </ul> |
| 2451 | + * The vertical datum information is specified in the following format: |
| 2452 | + * <pre><big> |
| 2453 | + * <vertical-datum-info-series office="SWT" unit="ft"> |
| 2454 | + * <location>TestLoc1</location> |
| 2455 | + * <native-datum>OTHER</native-datum> |
| 2456 | + * <elevation>500</elevation> |
| 2457 | + * <local-datum-name>TestDatum</local-datum-name> |
| 2458 | + * <offset time="2000-01-01T00:00:00Z" estimate="false"> |
| 2459 | + * <to-datum>NGVD29</to-datum> |
| 2460 | + * <value>1.1</value> |
| 2461 | + * <description>1st Offset</description> |
| 2462 | + * </offset> |
| 2463 | + * <offset time="2000-01-01T00:00:00Z" estimate="true"> |
| 2464 | + * <to-datum>NAVD88</to-datum> |
| 2465 | + * <value>1.15</value> |
| 2466 | + * <description/> |
| 2467 | + * </offset> |
| 2468 | + * <offset time="2010-01-01T00:00:00Z" estimate="false"> |
| 2469 | + * <to-datum>NGVD29</to-datum> |
| 2470 | + * <value>1.3</value> |
| 2471 | + * <description>2nd Offset</description> |
| 2472 | + * </offset> |
| 2473 | + * <offset time="2010-01-01T00:00:00Z" estimate="true"> |
| 2474 | + * <to-datum>NAVD88</to-datum> |
| 2475 | + * <value>1.35</value> |
| 2476 | + * <description/> |
| 2477 | + * </offset> |
| 2478 | + * <offset time="2012-05-11T00:00:00Z" estimate="false"> |
| 2479 | + * <to-datum>NAVD88</to-datum> |
| 2480 | + * <value>1.785</value> |
| 2481 | + * <description/> |
| 2482 | + * </offset> |
| 2483 | + * <offset time="2020-01-01T00:00:00Z" estimate="false"> |
| 2484 | + * <to-datum>NGVD29</to-datum> |
| 2485 | + * <value>1.5</value> |
| 2486 | + * <description>3rd Offset</description> |
| 2487 | + * </offset> |
| 2488 | + * <offset time="2020-01-01T00:00:00Z" estimate="false"> |
| 2489 | + * <to-datum>NAVD88</to-datum> |
| 2490 | + * <value>1.985</value> |
| 2491 | + * <description/> |
| 2492 | + * </offset> |
| 2493 | + * </vertical-datum-info-series> |
| 2494 | + * </big></pre> |
| 2495 | + * Note that specifying an XML instance with no <pre><big><offset></big></pre> elements will remove all vertical datum offsets for the location from the database. |
| 2496 | + * |
| 2497 | + * @param p_vert_datum_info The vertical datum information in the format above |
| 2498 | + * @param p_fail_if_exists A flag ('T'/'F') specifying whether to fail if existing vertical datum information would be overwritten. |
| 2499 | + */ |
| 2500 | + procedure set_vertical_datum_info_series( |
| 2501 | + p_vert_datum_info in varchar2, |
| 2502 | + p_fail_if_exists in varchar2); |
| 2503 | + |
2307 | 2504 | /** |
2308 | 2505 | * Sets vertical datum info for one or more locations |
2309 | 2506 | * |
|
0 commit comments