/usr/include/rasterlite2/rasterlite2.h is in librasterlite2-dev 1.0.0~rc0+devel1-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 | /*
rasterlite2 -- main header file
version 0.1, 2013 March 29
Author: Sandro Furieri a.furieri@lqt.it
-----------------------------------------------------------------------------
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the RasterLite2 library
The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2013
the Initial Developer. All Rights Reserved.
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
*/
/**
\file rasterlite2.h
Main RasterLite2 header file
*/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifdef _WIN32
#ifdef DLL_EXPORT
#define RL2_DECLARE __declspec(dllexport)
#else
#define RL2_DECLARE extern
#endif
#else
#define RL2_DECLARE __attribute__ ((visibility("default")))
#endif
#endif
#ifndef _RASTERLITE2_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _RASTERLITE2_H
#endif
#ifdef __cplusplus
extern "C"
{
#endif
#include "rasterlite2/sqlite.h"
/** RasterLite2 flag: FALSE */
#define RL2_FALSE 0
/** RasterLite2 flag: TRUE */
#define RL2_TRUE 1
/** RasterLite2 ret-value: OK (success) */
#define RL2_OK 0
/** RasterLite2 ret-value: ERROR (failure) */
#define RL2_ERROR -1
/** RasterLite2 constant: INVALID/UNDEFINED Pyramid Level */
#define RL_INVALID_PYRAMID_LEVEL -1
/** RasterLite2 constant: Sample Type UNKNOWN */
#define RL2_SAMPLE_UNKNOWN 0xa0
/** RasterLite2 constant: Sample Type 1-bit */
#define RL2_SAMPLE_1_BIT 0xa1
/** RasterLite2 constant: Sample Type 2-bit */
#define RL2_SAMPLE_2_BIT 0xa2
/** RasterLite2 constant: Sample Type 4-bit */
#define RL2_SAMPLE_4_BIT 0xa3
/** RasterLite2 constant: Sample Type 8 bit Integer */
#define RL2_SAMPLE_INT8 0xa4
/** RasterLite2 constant: Sample Type 8 bit Unsigned Integer */
#define RL2_SAMPLE_UINT8 0xa5
/** RasterLite2 constant: Sample Type 16 bit Integer */
#define RL2_SAMPLE_INT16 0xa6
/** RasterLite2 constant: Sample Type 16 bit Unsigned Integer */
#define RL2_SAMPLE_UINT16 0xa7
/** RasterLite2 constant: Sample Type 32 bit Integer */
#define RL2_SAMPLE_INT32 0xa8
/** RasterLite2 constant: Sample Type 32 bit Unsigned Integer */
#define RL2_SAMPLE_UINT32 0xa9
/** RasterLite2 constant: Sample Type Floating Point Single Precision */
#define RL2_SAMPLE_FLOAT 0xaa
/** RasterLite2 constant: Sample Type Floating Point Double Precision */
#define RL2_SAMPLE_DOUBLE 0xab
/** RasterLite2 constant: Pixel Type UNKNOWN */
#define RL2_PIXEL_UNKNOWN 0x10
/** RasterLite2 constant: Pixel Type Monochrome - Bilevel */
#define RL2_PIXEL_MONOCHROME 0x11
/** RasterLite2 constant: Pixel Type Palette based */
#define RL2_PIXEL_PALETTE 0x12
/** RasterLite2 constant: Pixel Type Grayscale */
#define RL2_PIXEL_GRAYSCALE 0x13
/** RasterLite2 constant: Pixel Type Red-Green-Blue */
#define RL2_PIXEL_RGB 0x14
/** RasterLite2 constant: Pixel Type Multiband (arbitrary) */
#define RL2_PIXEL_MULTIBAND 0x15
/** RasterLite2 constant: Pixel Type Data-Grid */
#define RL2_PIXEL_DATAGRID 0x16
/** RasterLite2 constant: Opaque Pixel */
#define RL2_PIXEL_OPAQUE 0x80
/** RasterLite2 constant: Transparent Pixel */
#define RL2_PIXEL_TRANSPARENT 0x40
/** RasterLite2 constant: Compression UNKNOWN */
#define RL2_COMPRESSION_UNKNOWN 0x20
/** RasterLite2 constant: Compression None */
#define RL2_COMPRESSION_NONE 0x21
/** RasterLite2 constant: Compression Deflate Delta (zip) */
#define RL2_COMPRESSION_DEFLATE 0x22
/** RasterLite2 constant: Compression Deflate noDelta (zip) */
#define RL2_COMPRESSION_DEFLATE_NO 0xd2
/** RasterLite2 constant: Compression LZMA Delta */
#define RL2_COMPRESSION_LZMA 0x23
/** RasterLite2 constant: Compression LZMA noDelta */
#define RL2_COMPRESSION_LZMA_NO 0xd3
/** RasterLite2 constant: Compression GIF */
#define RL2_COMPRESSION_GIF 0x24
/** RasterLite2 constant: Compression PNG */
#define RL2_COMPRESSION_PNG 0x25
/** RasterLite2 constant: Compression JPEG */
#define RL2_COMPRESSION_JPEG 0x26
/** RasterLite2 constant: Compression WEBP (lossy mode) */
#define RL2_COMPRESSION_LOSSY_WEBP 0x27
/** RasterLite2 constant: Compression WEBP (lossless mode) */
#define RL2_COMPRESSION_LOSSLESS_WEBP 0x28
/** RasterLite2 constant: Compression CCITTFAX3 */
#define RL2_COMPRESSION_CCITTFAX3 0x29
/** RasterLite2 constant: Compression CCITTFAX4 */
#define RL2_COMPRESSION_CCITTFAX4 0x30
/** RasterLite2 constant: Compression LZW */
#define RL2_COMPRESSION_LZW 0x31
/** RasterLite2 constant: Compression CHARLS */
#define RL2_COMPRESSION_CHARLS 0x32
/** RasterLite2 constant: Compression JPEG2000 (lossy mode) */
#define RL2_COMPRESSION_LOSSY_JP2 0x33
/** RasterLite2 constant: Compression JPEG2000 (lossless mode) */
#define RL2_COMPRESSION_LOSSLESS_JP2 0x34
/** RasterLite2 constant: UNKNOWN number of Bands */
#define RL2_BANDS_UNKNOWN 0x00
/** RasterLite2 constant: Red Band */
#define RL2_RED_BAND 0
/** RasterLite2 constant: Green Band */
#define RL2_GREEN_BAND 1
/** RasterLite2 constant: Blue Band */
#define RL2_BLUE_BAND 2
/** RasterLite2 constant: Grayscale Band */
#define RL2_GRAYSCALE_BAND 0
/** RasterLite2 constant: Data-Grid Band */
#define RL2_DATAGRID_BAND 0
/** RasterLite2 constant: Monochrome Band */
#define RL2_MONOCHROME_BAND 0
/** RasterLite2 constant: Palette Band */
#define RL2_PALETTE_BAND 0
/** RasterLite2 constant: No Georeferencing infos */
#define RL2_GEOREFERENCING_NONE -1
/** RasterLite2 constant: Undefined Tile size */
#define RL2_TILESIZE_UNDEFINED 0
/** RasterLite2 constant: reproduction scale 1:1 */
#define RL2_SCALE_1 0x31
/** RasterLite2 constant: reproduction scale 1:2 */
#define RL2_SCALE_2 0x32
/** RasterLite2 constant: reproduction scale 1:4 */
#define RL2_SCALE_4 0x33
/** RasterLite2 constant: reproduction scale 1:8 */
#define RL2_SCALE_8 0x34
/** RasterLite2 constant: output format UNKNOWN */
#define RL2_OUTPUT_FORMAT_UNKNOWN 0x70
/** RasterLite2 constant: output format JPEG */
#define RL2_OUTPUT_FORMAT_JPEG 0x71
/** RasterLite2 constant: output format PNG */
#define RL2_OUTPUT_FORMAT_PNG 0x72
/** RasterLite2 constant: output format TIFF */
#define RL2_OUTPUT_FORMAT_TIFF 0x73
/** RasterLite2 constant: output format PDF */
#define RL2_OUTPUT_FORMAT_PDF 0x74
/** RasterLite2 constant: contrast enhancement NONE */
#define RL2_CONTRAST_ENHANCEMENT_NONE 0x90
/** RasterLite2 constant: contrast enhancement NORMALIZE */
#define RL2_CONTRAST_ENHANCEMENT_NORMALIZE 0x91
/** RasterLite2 constant: contrast enhancement HISTOGRAM */
#define RL2_CONTRAST_ENHANCEMENT_HISTOGRAM 0x92
/** RasterLite2 constant: contrast enhancement GAMMA-VALUE */
#define RL2_CONTRAST_ENHANCEMENT_GAMMA 0x93
/** RasterLite2 constant: GroupRenderer - RasterLayer */
#define RL2_GROUP_RENDERER_RASTER_LAYER 0xba
/** ResterLite2 constant: GroupRenderer - VectorLayer */
#define RL2_GROUP_RENDERER_VECTOR_LAYER 0xbb
/** RasterLite2 constants: unknown Symbolizer type */
#define RL2_UNKNOWN_SYMBOLIZER 0xa0
/** RasterLite2 constants: Point Symbolizer type */
#define RL2_POINT_SYMBOLIZER 0xa1
/** RasterLite2 constants: Line Symbolizer type */
#define RL2_LINE_SYMBOLIZER 0xa2
/** RasterLite2 constants: Polygon Symbolizer type */
#define RL2_POLYGON_SYMBOLIZER 0xa3
/** RasterLite2 constants: Text Symbolizer type */
#define RL2_TEXT_SYMBOLIZER 0xa4
/** RasterLite2 constants: unknown Stroke Linejoin */
#define RL2_STROKE_LINEJOIN_UNKNOWN 0x50
/** RasterLite2 constants: Stroke Linejoin - Mitre */
#define RL2_STROKE_LINEJOIN_MITRE 0x51
/** RasterLite2 constants: Stroke Linejoin - Round */
#define RL2_STROKE_LINEJOIN_ROUND 0x52
/** RasterLite2 constants: Stroke Linejoin - Bevel */
#define RL2_STROKE_LINEJOIN_BEVEL 0x53
/** RasterLite2 constants: unknown Stroke Linecap */
#define RL2_STROKE_LINECAP_UNKNOWN 0x60
/** RasterLite2 constants: Stroke Linecap - Butt */
#define RL2_STROKE_LINECAP_BUTT 0x61
/** RasterLite2 constants: Stroke Linecap - Round */
#define RL2_STROKE_LINECAP_ROUND 0x62
/** RasterLite2 constants: Stroke Linecap - Square */
#define RL2_STROKE_LINECAP_SQUARE 0x63
/** RasterLite2 constants: unknown Mark */
#define RL2_GRAPHIC_MARK_UNKNOWN 0x70
/** RasterLite2 constants: the well-known Square Mark */
#define RL2_GRAPHIC_MARK_SQUARE 0x71
/** RasterLite2 constants: the well-known Circle Mark */
#define RL2_GRAPHIC_MARK_CIRCLE 0x72
/** RasterLite2 constants: the well-known Triangle Mark */
#define RL2_GRAPHIC_MARK_TRIANGLE 0x73
/** RasterLite2 constants: the well-known Star Mark */
#define RL2_GRAPHIC_MARK_STAR 0x74
/** RasterLite2 constants: the well-known Cross Mark */
#define RL2_GRAPHIC_MARK_CROSS 0x75
/** RasterLite2 constants: the well-known X Mark */
#define RL2_GRAPHIC_MARK_X 0x76
/** Rasterlite2 constants: Font Style Normal */
#define RL2_FONT_STYLE_NORMAL 0x30
/** Rasterlite2 constants: Font Style Italic */
#define RL2_FONT_STYLE_ITALIC 0x31
/** Rasterlite2 constants: Font Style Oblique */
#define RL2_FONT_STYLE_OBLIQUE 0x32
/** Rasterlite2 constants: Font Weight Normal */
#define RL2_FONT_WEIGHT_NORMAL 0x40
/** Rasterlite2 constants: Font Weight Bold */
#define RL2_FONT_WEIGHT_BOLD 0x41
/** Rasterlite2 constants: LabelPlacement: Unknwn */
#define RL2_LABEL_PLACEMENT_UNKNOWN 0x53
/** Rasterlite2 constants: LabelPlacement: PointPlacement */
#define RL2_LABEL_PLACEMENT_POINT 0x54
/** Rasterlite2 constants: LabelPlacement: LinePlacement */
#define RL2_LABEL_PLACEMENT_LINE 0x55
/**
Typedef for RL2 Pixel object (opaque, hidden)
\sa rl2PixelPtr
*/
typedef struct rl2_pixel rl2Pixel;
/**
Typedef for RL2 Pixel object pointer (opaque, hidden)
\sa rl2Pixel
*/
typedef rl2Pixel *rl2PixelPtr;
/**
Typedef for RL2 Palette object (opaque, hidden)
\sa rl2PalettePtr
*/
typedef struct rl2_palette rl2Palette;
/**
Typedef for RL2 Pixel object pointer (opaque, hidden)
\sa rl2Palette
*/
typedef rl2Palette *rl2PalettePtr;
/**
Typedef for RL2 Raster object (opaque, hidden)
\sa rl2RasterPtr
*/
typedef struct rl2_raster rl2Raster;
/**
Typedef for RL2 Raster object pointer (opaque, hidden)
\sa rl2Raster
*/
typedef rl2Raster *rl2RasterPtr;
/**
Typedef for RL2 Section object (opaque, hidden)
\sa rl2SectionPtr
*/
typedef struct rl2_section rl2Section;
/**
Typedef for RL2 Section object pointer (opaque, hidden)
\sa rl2Section
*/
typedef rl2Section *rl2SectionPtr;
/**
Typedef for RL2 Coverage object (opaque, hidden)
\sa rl2CoveragePtr
*/
typedef struct rl2_coverage rl2Coverage;
/**
Typedef for RL2 Coverage object pointer (opaque, hidden)
\sa rl2Coverage
*/
typedef rl2Coverage *rl2CoveragePtr;
/**
Typedef for RL2 Vector Layer object (opaque, hidden)
\sa rl2VectorLayerPtr
*/
typedef struct rl2_vector_layer rl2VectorLayer;
/**
Typedef for RL2 Vector Layer object pointer (opaque, hidden)
\sa rl2VectorLayer
*/
typedef rl2VectorLayer *rl2VectorLayerPtr;
/**
Typedef for RL2 CoverageStyle object (opaque, hidden)
\sa rl2CoverageStylePtr
*/
typedef struct rl2_coverage_style rl2CoverageStyle;
/**
Typedef for RL2 CoverageStyle object pointer (opaque, hidden)
\sa rl2CoverageStyle
*/
typedef rl2CoverageStyle *rl2CoverageStylePtr;
/**
Typedef for RL2 RasterSymbolizer object (opaque, hidden)
\sa rl2RasterSymbolizerPtr
*/
typedef struct rl2_raster_symbolizer rl2RasterSymbolizer;
/**
Typedef for RL2 RasterSymbolizer object pointer (opaque, hidden)
\sa rl2RasterSymbolizer
*/
typedef rl2RasterSymbolizer *rl2RasterSymbolizerPtr;
/**
Typedef for RL2 Rule Like Arguments object (opaque, hidden)
\sa rl2SRuleLikeArgsPtr
*/
typedef struct rl2_rule_like_args rl2RuleLikeArgs;
/**
Typedef for RL2 RuleLikeArgs object pointer (opaque, hidden)
\sa rl2RuleLikeArgs
*/
typedef rl2RuleLikeArgs *rl2RuleLikeArgsPtr;
/**
Typedef for RL2 Rule Between Arguments object (opaque, hidden)
\sa rl2SRuleBetweenArgsPtr
*/
typedef struct rl2_rule_between_args rl2RuleBetweenArgs;
/**
Typedef for RL2 RuleBetweenArgs object pointer (opaque, hidden)
\sa rl2RuleBetweenArgs
*/
typedef rl2RuleBetweenArgs *rl2RuleBetweenArgsPtr;
/**
Typedef for RL2 Rule Single Argument object (opaque, hidden)
\sa rl2SRuleSingleArgPtr
*/
typedef struct rl2_rule_single_arg rl2RuleSingleArg;
/**
Typedef for RL2 RuleSingleArg object pointer (opaque, hidden)
\sa rl2RuleSingleArg
*/
typedef rl2RuleSingleArg *rl2RuleSingleArgPtr;
/**
Typedef for RL2 VariantArray object (opaque, hidden)
\sa rl2VariantArrayPtr
*/
typedef struct rl2_variant_array rl2VariantArray;
/**
Typedef for RL2 VariantArray object pointer (opaque, hidden)
\sa rl2VariantArray
*/
typedef rl2VariantArray *rl2VariantArrayPtr;
/**
Typedef for RL2 StyleRule object (opaque, hidden)
\sa rl2StyleRulePtr
*/
typedef struct rl2_style_rule rl2StyleRule;
/**
Typedef for RL2 StyleRule object pointer (opaque, hidden)
\sa rl2StyleRule
*/
typedef rl2StyleRule *rl2StyleRulePtr;
/**
Typedef for RL2 FeatureTypeStyle object (opaque, hidden)
\sa rl2FeatureTypeStylePtr
*/
typedef struct rl2_feature_type_style rl2FeatureTypeStyle;
/**
Typedef for RL2 FeatureTypeStyle object pointer (opaque, hidden)
\sa rl2FeatureTypeStyle
*/
typedef rl2FeatureTypeStyle *rl2FeatureTypeStylePtr;
/**
Typedef for RL2 VectorSymbolizer object (opaque, hidden)
\sa rl2VectorSymbolizerPtr
*/
typedef struct rl2_vector_symbolizer rl2VectorSymbolizer;
/**
Typedef for RL2 VectorSymbolizer object pointer (opaque, hidden)
\sa rl2VectorSymbolizer
*/
typedef rl2VectorSymbolizer *rl2VectorSymbolizerPtr;
/**
Typedef for RL2 PointSymbolizer object (opaque, hidden)
\sa rl2PointSymbolizerPtr
*/
typedef struct rl2_point_symbolizer rl2PointSymbolizer;
/**
Typedef for RL2 PointSymbolizer object pointer (opaque, hidden)
\sa rl2PointSymbolizer
*/
typedef rl2PointSymbolizer *rl2PointSymbolizerPtr;
/**
Typedef for RL2 LineSymbolizer object (opaque, hidden)
\sa rl2LineSymbolizerPtr
*/
typedef struct rl2_line_symbolizer rl2LineSymbolizer;
/**
Typedef for RL2 LineSymbolizer object pointer (opaque, hidden)
\sa rl2LineSymbolizer
*/
typedef rl2LineSymbolizer *rl2LineSymbolizerPtr;
/**
Typedef for RL2 PolygonSymbolizer object (opaque, hidden)
\sa rl2PolygonSymbolizerPtr
*/
typedef struct rl2_polygon_symbolizer rl2PolygonSymbolizer;
/**
Typedef for RL2 PolygonSymbolizer object pointer (opaque, hidden)
\sa rl2PolygonSymbolizer
*/
typedef rl2PolygonSymbolizer *rl2PolygonSymbolizerPtr;
/**
Typedef for RL2 TextSymbolizer object (opaque, hidden)
\sa rl2TextSymbolizerPtr
*/
typedef struct rl2_text_symbolizer rl2TextSymbolizer;
/**
Typedef for RL2 TextSymbolizer object pointer (opaque, hidden)
\sa rl2TextSymbolizer
*/
typedef rl2TextSymbolizer *rl2TextSymbolizerPtr;
/**
Typedef for RL2 GroupStyle object (opaque, hidden)
\sa rl2GroupStylePtr
*/
typedef struct rl2_group_style rl2GroupStyle;
/**
Typedef for RL2 GroupStyle object pointer (opaque, hidden)
\sa rl2GroupStyle
*/
typedef rl2GroupStyle *rl2GroupStylePtr;
/**
Typedef for RL2 GroupRender object (opaque, hidden)
\sa rl2GroupRendererPtr
*/
typedef struct rl2_group_renderer rl2GroupRenderer;
/**
Typedef for RL2 GroupRenderer object pointer (opaque, hidden)
\sa rl2GroupRenderer
*/
typedef rl2GroupRenderer *rl2GroupRendererPtr;
/**
Typedef for RL2 TIFF Origin object (opaque, hidden)
\sa rl2TiffOriginPtr
*/
typedef struct rl2_tiff_origin rl2TiffOrigin;
/**
Typedef for RL2 TIFF Origin object pointer (opaque, hidden)
\sa rl2TiffOrigin
*/
typedef rl2TiffOrigin *rl2TiffOriginPtr;
/**
Typedef for RL2 TIFF Destination object (opaque, hidden)
\sa rl2TiffDestinationPtr
*/
typedef struct rl2_tiff_destination rl2TiffDestination;
/**
Typedef for RL2 TIFF Destination object pointer (opaque, hidden)
\sa rl2TiffDestination
*/
typedef rl2TiffDestination *rl2TiffDestinationPtr;
/**
Typedef for RL2 ASCII Grid Origin object (opaque, hidden)
\sa rl2AsciiGridOriginPtr
*/
typedef struct rl2_ascii_origin rl2AsciiGridOrigin;
/**
Typedef for RL2 ASCII Grid Origin object pointer (opaque, hidden)
\sa rl2AsciiGridOrigin
*/
typedef rl2AsciiGridOrigin *rl2AsciiGridOriginPtr;
/**
Typedef for RL2 ASCII Grid Destination object (opaque, hidden)
\sa rl2AsciiGridDestinationPtr
*/
typedef struct rl2_ascii_destination rl2AsciiGridDestination;
/**
Typedef for RL2 ASCII Grid Destination object pointer (opaque, hidden)
\sa rl2AsciiHridDestination
*/
typedef rl2AsciiGridOrigin *rl2AsciiGridDestinationPtr;
/**
Typedef for RL2 Raster Statistics object (opaque, hidden)
\sa rl2RasterStatisticsPtr
*/
typedef struct rl2_raster_statistics rl2RasterStatistics;
/**
Typedef for RL2 Raster Statistics object pointer (opaque, hidden)
\sa rl2RasterStatistics
*/
typedef rl2RasterStatistics *rl2RasterStatisticsPtr;
/**
Typedef for RL2 in-memory PDF target object
\sa rl2MemPtrPtr
*/
typedef struct rl2_mem_pdf_target rl2MemPdf;
/**
Typedef for RL2 in-memory PDF target
\sa rl2MemPtr
*/
typedef rl2MemPdf *rl2MemPdfPtr;
/**
Releases (frees) dynamic memory allocated by RasterLite2
\param p pointer to the dynamic memory block to be released.
*/
RL2_DECLARE void rl2_free (void *ptr);
/**
Return the target CPU name.
\return the target CPU string.
*/
RL2_DECLARE const char *rl2_target_cpu (void);
/**
Return the current library version.
\return the version string.
*/
RL2_DECLARE const char *rl2_version (void);
#ifdef LOADABLE_EXTENSION
RL2_DECLARE int
sqlite3_rasterlite_init (sqlite3 * db, char **pzErrMsg,
const sqlite3_api_routines * pApi);
#endif
/**
Initializes the internal private memory block supporting each RL2 connection
\sa rl2_init, rl2_private_cleanup
*/
RL2_DECLARE void *rl2_alloc_private (void);
/**
Initializes the library
\param db_handle handle to the current SQLite connection
\param ptr a memory pointer returned by rl2_alloc_private()
\param verbose if TRUE a short start-up message is shown on stderr
\note you are always expected to explicitly call this function
before attempting to call any RasterLite-2 own function.
*/
RL2_DECLARE void rl2_init (sqlite3 * db_handle, const void *ptr,
int verbose);
/**
Cleanup the internal private memory block supporting each RL2 connection
This function performs general cleanup, essentially undoing the effect
of rl2_init().
\param ptr the same memory pointer passed to the corresponding call to
rl2_init() and rl2_alloc_private()
\sa rl2_init_ex, rl2_alloc_private
*/
RL2_DECLARE void rl2_cleanup_private (const void *ptr);
/**
Testing if a given codec/compressor is actually supported by the library
\param compression e.g. RL2_COMPRESSION_NONE or RL2_COMPRESSION_DEFLATE
\return RL2_TRUE or RL2_FALSE on success: RL2_ERROR on invalid/unknown
compriosson.
*/
RL2_DECLARE int rl2_is_supported_codec (unsigned char compression);
/**
Allocates and initializes a new Pixel object
\param sample_type one of RL2_SAMPLE_1_BIT, RL2_SAMPLE_2_BIT, RL2_SAMPLE_4_BIT,
RL2_SAMPLE_INT8, RL2_SAMPLE_UINT8, RL2_SAMPLE_INT16, RL2_SAMPLE_UINT16,
RL2_SAMPLE_INT32, RL2_SAMPLE_UINT32, RL2_SAMPLE_FLOAT or RL2_SAMPLE_DOUBLE.
\param pixel_type one of RL2_PIXEL_MONOCHROME, RL2_PIXEL_PALETTE, RL2_PIXEL_GRAYSCALE,
RL2_PIXEL_RGB, RL2_PIXEL_MULTIBAND, RL2_PIXEL_DATAGRID.
\param num_samples number of samples per pixel (aka Bands)
\return the pointer to newly created Pixel Object: NULL on failure.
\sa rl2_destroy_pixel, rl2_compare_pixels, rl2_get_pixel_type,
rl2_get_pixel_sample_1bit,
rl2_set_pixel_sample_1bit, rl2_get_pixel_sample_2bit,
rl2_set_pixel_sample_2bit, rl2_get_pixel_sample_4bit,
rl2_set_pixel_sample_4bit, rl2_get_pixel_sample_int8,
rl2_set_pixel_sample_uint8, rl2_get_pixel_sample_int16,
rl2_set_pixel_sample_uint16, rl2_get_pixel_sample_int32,
rl2_set_pixel_sample_uint32, rl2_get_pixel_sample_float,
rl2_set_pixel_sample_float, rl2_get_pixel_sample_double,
rl2_set_pixel_sample_double, rl2_is_pixel_transparent,
rl2_is_pixel_opaque, rl2_set_pixel_transparent,
rl2_set_pixel_opaque
\note you are responsible to destroy (before or after) any allocated
Pixel object.
*/
RL2_DECLARE rl2PixelPtr
rl2_create_pixel (unsigned char sample_type, unsigned char pixel_type,
unsigned char num_samples);
RL2_DECLARE rl2PixelPtr rl2_clone_pixel (rl2PixelPtr org);
RL2_DECLARE rl2PixelPtr rl2_create_triple_band_pixel (rl2PixelPtr org,
unsigned char
red_band,
unsigned char
green_band,
unsigned char
blue_band);
RL2_DECLARE rl2PixelPtr rl2_create_mono_band_pixel (rl2PixelPtr org,
unsigned char
mono_band);
/**
Destroys a Pixel Object
\param pxl pointer to object to be destroyed
\sa rl2_create_pixel
*/
RL2_DECLARE void rl2_destroy_pixel (rl2PixelPtr pxl);
/**
Testing if two different Pixels are exactly the same
\param pxl1 pointer to the first Pixel Object.
\param pxl2 pointer to the second Pixel Object.
\return RL2_TRUE or RL2_FALSE; RL2_ERROR if any error is encountered.
\sa rl2_create_pixel
*/
RL2_DECLARE int rl2_compare_pixels (rl2PixelPtr pxl1, rl2PixelPtr pxl2);
/**
Retrieving the Sample Type from a Pixel Object
\param pxl pointer to the Pixel Object.
\param sample_type on completion the variable referenced by this
pointer will contain the Sampe Type.
\param pixel_type on completion the variable referenced by this
pointer will contain the Pixel Type.
\param num_bands on completion the variable referenced by this
pointer will contain the Number of Bands.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_pixel
*/
RL2_DECLARE int rl2_get_pixel_type (rl2PixelPtr pxl,
unsigned char *sample_type,
unsigned char *pixel_type,
unsigned char *num_bands);
/**
Retrieving the Pixel/Sample value from a Pixel Object [1 bit sample]
\param pxl pointer to the Pixel Object.
\param sample on completion the variable referenced by this
pointer will contain the Pixel/Sampe Value.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including querying a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_set_pixel_sample_1bit
*/
RL2_DECLARE int rl2_get_pixel_sample_1bit (rl2PixelPtr pxl,
unsigned char *sample);
/**
Assigning the Pixel/Sample value to a Pixel Object [1 bit sample]
\param pxl pointer to the Pixel Object.
\param sample the Pixel/Sampe Value to be set.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including referencing a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_get_pixel_sample_1bit
*/
RL2_DECLARE int rl2_set_pixel_sample_1bit (rl2PixelPtr pxl,
unsigned char sample);
/**
Retrieving the Pixel/Sample value from a Pixel Object [2 bit sample]
\param pxl pointer to the Pixel Object.
\param sample on completion the variable referenced by this
pointer will contain the Pixel/Sampe Value.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including querying a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_set_pixel_sample_2bit
*/
RL2_DECLARE int rl2_get_pixel_sample_2bit (rl2PixelPtr pxl,
unsigned char *sample);
/**
Assigning the Pixel/Sample value to a Pixel Object [2 bit sample]
\param pxl pointer to the Pixel Object.
\param sample the Pixel/Sampe Value to be set.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including referencing a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_get_pixel_sample_2bit
*/
RL2_DECLARE int rl2_set_pixel_sample_2bit (rl2PixelPtr pxl,
unsigned char sample);
/**
Retrieving the Pixel/Sample value from a Pixel Object [4 bit sample]
\param pxl pointer to the Pixel Object.
\param sample on completion the variable referenced by this
pointer will contain the Pixel/Sampe Value.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including querying a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_set_pixel_sample_4bit
*/
RL2_DECLARE int rl2_get_pixel_sample_4bit (rl2PixelPtr pxl,
unsigned char *sample);
/**
Assigning the Pixel/Sample value to a Pixel Object [4 bit sample]
\param pxl pointer to the Pixel Object.
\param sample the Pixel/Sampe Value to be set.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including referencing a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_get_pixel_sample_4bit
*/
RL2_DECLARE int rl2_set_pixel_sample_4bit (rl2PixelPtr pxl,
unsigned char sample);
/**
Retrieving the Pixel/Sample value from a Pixel Object [integer, 8 bit sample]
\param pxl pointer to the Pixel Object.
\param sample on completion the variable referenced by this
pointer will contain the Pixel/Sampe Value.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including querying a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_set_pixel_sample_int8
*/
RL2_DECLARE int rl2_get_pixel_sample_int8 (rl2PixelPtr pxl, char *sample);
/**
Assigning the Pixel/Sample value to a Pixel Object [integer, 8 bit sample]
\param pxl pointer to the Pixel Object.
\param sample the Pixel/Sampe Value to be set.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including referencing a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_get_pixel_sample_int8
*/
RL2_DECLARE int rl2_set_pixel_sample_int8 (rl2PixelPtr pxl, char sample);
/**
Retrieving the Pixel/Sample value from a Pixel Object [unsigned integer, 8 bit sample]
\param pxl pointer to the Pixel Object.
\param band the Sample/Band index (the first sample corresponds to index ZERO).
\param sample on completion the variable referenced by this
pointer will contain the Pixel/Sampe Value.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including querying a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_set_pixel_sample_uint8
*/
RL2_DECLARE int rl2_get_pixel_sample_uint8 (rl2PixelPtr pxl, int band,
unsigned char *sample);
/**
Assigning the Pixel/Sample value to a Pixel Object [unsigned integer, 8 bit sample]
\param pxl pointer to the Pixel Object.
\param band the Sample/Band index (the first sample corresponds to index ZERO).
\param sample the Pixel/Sampe Value to be set.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including referencing a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_get_pixel_sample_uint8
*/
RL2_DECLARE int rl2_set_pixel_sample_uint8 (rl2PixelPtr pxl, int band,
unsigned char sample);
/**
Retrieving the Pixel/Sample value from a Pixel Object [integer, 16 bit sample]
\param pxl pointer to the Pixel Object.
\param sample on completion the variable referenced by this
pointer will contain the Pixel/Sampe Value.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including querying a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_set_pixel_sample_int16
*/
RL2_DECLARE int rl2_get_pixel_sample_int16 (rl2PixelPtr pxl, short *sample);
/**
Assigning the Pixel/Sample value to a Pixel Object [integer, 16 bit sample]
\param pxl pointer to the Pixel Object.
\param sample the Pixel/Sampe Value to be set.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including referencing a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_get_pixel_sample_int16
*/
RL2_DECLARE int rl2_set_pixel_sample_int16 (rl2PixelPtr pxl, short sample);
/**
Retrieving the Pixel/Sample value from a Pixel Object [unsigned integer, 16 bit sample]
\param pxl pointer to the Pixel Object.
\param band the Sample/Band index (the first sample corresponds to index ZERO).
\param sample on completion the variable referenced by this
pointer will contain the Pixel/Sampe Value.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including querying a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_set_pixel_sample_uint16
*/
RL2_DECLARE int rl2_get_pixel_sample_uint16 (rl2PixelPtr pxl, int band,
unsigned short *sample);
/**
Assigning the Pixel/Sample value to a Pixel Object [unsigned integer, 16 bit sample]
\param pxl pointer to the Pixel Object.
\param band the Sample/Band index (the first sample corresponds to index ZERO).
\param sample the Pixel/Sampe Value to be set.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including referencing a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_get_pixel_sample_uint16
*/
RL2_DECLARE int rl2_set_pixel_sample_uint16 (rl2PixelPtr pxl, int band,
unsigned short sample);
/**
Retrieving the Pixel/Sample value from a Pixel Object [integer, 32 bit sample]
\param pxl pointer to the Pixel Object.
\param sample on completion the variable referenced by this
pointer will contain the Pixel/Sampe Value.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including querying a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_set_pixel_sample_int32
*/
RL2_DECLARE int rl2_get_pixel_sample_int32 (rl2PixelPtr pxl, int *sample);
/**
Assigning the Pixel/Sample value to a Pixel Object [integer, 32 bit sample]
\param pxl pointer to the Pixel Object.
\param sample the Pixel/Sampe Value to be set.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including referencing a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_get_pixel_sample_int32
*/
RL2_DECLARE int rl2_set_pixel_sample_int32 (rl2PixelPtr pxl, int sample);
/**
Retrieving the Pixel/Sample value from a Pixel Object [unsigned integer, 32 bit sample]
\param pxl pointer to the Pixel Object.
\param sample on completion the variable referenced by this
pointer will contain the Pixel/Sampe Value.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including querying a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_set_pixel_sample_uint32
*/
RL2_DECLARE int rl2_get_pixel_sample_uint32 (rl2PixelPtr pxl,
unsigned int *sample);
/**
Assigning the Pixel/Sample value to a Pixel Object [unsigned integer, 32 bit sample]
\param pxl pointer to the Pixel Object.
\param sample the Pixel/Sampe Value to be set.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including referencing a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_get_pixel_sample_uint32
*/
RL2_DECLARE int rl2_set_pixel_sample_uint32 (rl2PixelPtr pxl,
unsigned int sample);
/**
Retrieving the Pixel/Sample value from a Pixel Object [floating point, single precision sample]
\param pxl pointer to the Pixel Object.
\param sample on completion the variable referenced by this
pointer will contain the Pixel/Sampe Value.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including querying a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_set_pixel_sample_float
*/
RL2_DECLARE int rl2_get_pixel_sample_float (rl2PixelPtr pxl, float *sample);
/**
Assigning the Pixel/Sample value to a Pixel Object [floating point, single precision sample]
\param pxl pointer to the Pixel Object.
\param sample the Pixel/Sampe Value to be set.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including referencing a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_get_pixel_sample_float
*/
RL2_DECLARE int rl2_set_pixel_sample_float (rl2PixelPtr pxl, float sample);
/**
Retrieving the Pixel/Sample value from a Pixel Object [floating point, double precision sample]
\param pxl pointer to the Pixel Object.
\param sample on completion the variable referenced by this
pointer will contain the Pixel/Sampe Value.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including querying a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_set_pixel_sample_double
*/
RL2_DECLARE int rl2_get_pixel_sample_double (rl2PixelPtr pxl,
double *sample);
/**
Assigning the Pixel/Sample value to a Pixel Object [floating point, double precision sample]
\param pxl pointer to the Pixel Object.
\param sample the Pixel/Sampe Value to be set.
\return RL2_OK on success; RL2_ERROR if any error is encountered (this
including referencing a Pixel of mismatching PixelType).
\sa rl2_create_pixel, rl2_get_pixel_type, rl2_get_pixel_sample_double
*/
RL2_DECLARE int rl2_set_pixel_sample_double (rl2PixelPtr pxl,
double sample);
/**
Testing if a Pixel Object is Transparent
\param pxl pointer to the Pixel Object.
\param is_transparent on completion the variable referenced by this
pointer will contain RL2_TRUE or RL2_FALSE.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_pixel, rl2_is_pixel_opaque, rl2_set_pixel_transparent,
rl2_set_pixel_opaque
*/
RL2_DECLARE int rl2_is_pixel_transparent (rl2PixelPtr pxl,
int *is_transparent);
/**
Testing if a Pixel Object is Opaque
\param pxl pointer to the Pixel Object.
\param is_opaque on completion the variable referenced by this
pointer will contain RL2_TRUE or RL2_FALSE.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_pixel, rl2_is_pixel_transparent, rl2_set_pixel_transparent,
rl2_set_pixel_opaque
*/
RL2_DECLARE int rl2_is_pixel_opaque (rl2PixelPtr pxl, int *is_opaque);
/**
Forcing a Pixel Object to be Transparent
\param pxl pointer to the Pixel Object.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_pixel, rl2_is_pixel_opaque, rl2_is_pixel_transparent,
rl2_set_pixel_opaque
*/
RL2_DECLARE int rl2_set_pixel_transparent (rl2PixelPtr pxl);
/**
Forcing a Pixel Object to be Opaque
\param pxl pointer to the Pixel Object.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_pixel, rl2_is_pixel_opaque, rl2_is_pixel_transparent,
rl2_set_pixel_transparent
*/
RL2_DECLARE int rl2_set_pixel_opaque (rl2PixelPtr pxl);
/**
Allocates and initializes a new Palette object
\param num_entries total number of color entries for this Palette:
any valid palette should contain at least one entry and no more than 256 entries.
\return the pointer to newly created Palette Object: NULL on failure.
\sa rl2_destroy_palette, rl2_set_palette_color, rl2_get_palette_index,
rl2_set_palette_hexrgb, rl2_get_palette_entries, rl2_get_palette_colors,
rl2_get_palette_type
\note you are responsible to destroy (before or after) any allocated
Palette object.
*/
RL2_DECLARE rl2PalettePtr rl2_create_palette (int num_entries);
/**
Destroys a Palette Object
\param plt pointer to object to be destroyed
\sa rl2_create_palette
*/
RL2_DECLARE void rl2_destroy_palette (rl2PalettePtr plt);
/**
Assigns a Palette Color
\param plt pointer to the Palette Object
\param index references a Palette Entry [first Entry has index ZERO]
\param r Red component
\param g Green component
\param b Blue component
\return RL2_OK on success: RL2_ERROR on failure (invald Palette or invalid Index).
\sa rl2_create_palette, rl2_set_palette_hexrgb, rl2_get_palette_index,
rl2_get_palette_colors, rl2_get_palette_entries
*/
RL2_DECLARE int
rl2_set_palette_color (rl2PalettePtr plt, int index,
unsigned char r, unsigned char g,
unsigned char b);
/**
Assigns a Palette Color (Hex RGB)
\param plt pointer to the Palette Object
\param index references a Palette Entry [first Entry has index ZERO]
\param rgb an Hex RGB Color: "#ff0000" corresponds to Red, "#0000ff"
corresponds to Blue and so on.
\return RL2_OK on success: RL2_ERROR on failure (invald Palette or invalid Index).
\sa rl2_create_palette, rl2_set_palette_color, rl2_get_palette_index,
rl2_get_palette_colors, rl2_get_palette_entries
*/
RL2_DECLARE int
rl2_set_palette_hexrgb (rl2PalettePtr plt, int index, const char *rgb);
/**
Return the Palette Index corresponding to a given Color
\param plt pointer to the Palette Object
\param index on completion the variable referenced by this
pointer will contain the Index corresponding to the matching Entry.
\param r Red component
\param g Green component
\param b Blue component
\return RL2_OK on success: RL2_ERROR on failure (invald Palette or no matching Entry).
\sa rl2_create_palette
*/
RL2_DECLARE int
rl2_get_palette_index (rl2PalettePtr plt, unsigned char *index,
unsigned char r, unsigned char g,
unsigned char b);
/**
Retrieving the total number of Palette Entries
\param plt pointer to the Palette Object.
\param num_entries on completion the variable referenced by this
pointer will contain the total count of Colors.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_palette, rl2_get_palette_colors, rl2_set_palette_color,
rl2_set_palette_hexrgb
*/
RL2_DECLARE int rl2_get_palette_entries (rl2PalettePtr plt,
unsigned short *num_entries);
/**
Exports all Palette Colors as separate arrays for each component
\param plt pointer to the Palette Object
\param num_entries on completion the variable referenced by this
pointer will contain the total count of Colors (i.e. the size of each
one of the following arrays).
\param r on completion will point to an array of Red components
\param g on completion will point to an array of Green components
\param b on completion will point to an array of Blue components
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_palette
\note you are responsible to destroy (before or after) any array
created by rl2_get_palette_colors() by invoking rl2_free().
*/
RL2_DECLARE int
rl2_get_palette_colors (rl2PalettePtr plt, unsigned short *num_entries,
unsigned char **r, unsigned char **g,
unsigned char **b);
/**
Return the best fit Sample Type and Pixel Type for a given Palette Object
\param plt pointer to the Palette Object
\param sample_type on completion the variable referenced by this
pointer will contain the Sample Type corresponding to the Palette Object
(one of RL2_SAMPLE_1_BIT, RL2_SAMPLE_2_BIT, RL2_SAMPLE_4_BIT or RL2_SAMPLE_UINT8)
\param pixel_type on completion the variable referenced by this
pointer will contain the Pixel Type corresponding to the Palette Object
(one of RL2_PIXEL_PALETTE, RL2_PIXEL_MONOCHROME or RL2_PIXEL_GRAYSCALE)
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_palette
*/
RL2_DECLARE int
rl2_get_palette_type (rl2PalettePtr plt, unsigned char *sample_type,
unsigned char *pixel_type);
/**
Allocates and initializes a new Coverage object
\param name a text string intended to be the symbolic Coverage name.
\param sample_type one of RL2_SAMPLE_1_BIT, RL2_SAMPLE_2_BIT, RL2_SAMPLE_4_BIT,
RL2_SAMPLE_INT8, RL2_SAMPLE_UINT8, RL2_SAMPLE_INT16, RL2_SAMPLE_UINT16,
RL2_SAMPLE_INT32, RL2_SAMPLE_UINT32, RL2_SAMPLE_FLOAT or RL2_SAMPLE_DOUBLE.
\param pixel_type one of RL2_PIXEL_MONOCHROME, RL2_PIXEL_PALETTE, RL2_PIXEL_GRAYSCALE,
RL2_PIXEL_RGB, RL2_PIXEL_MULTIBAND, RL2_PIXEL_DATAGRID.
\param num_samples number of samples per pixel (aka Bands)
\param compression e.g. RL2_COMPRESSION_NONE or RL2_COMPRESSION_DEFLATE
\param quality compression quality factor (0-100); only meaningfull for
JPEG or WEBP lossy compressions, ignored in any other case.
\param tile_width the individual tile width in pixels.
\param tile_height the individual tile height in pixels.
\param no_data pointer to a Pixel Object indented as NO-DATA value;
could be eventually NULL if not required.
\return the pointer to newly created Coverage Object: NULL on failure.
\sa rl2_destroy_coverage, rl2_coverage_georeference, rl2_get_coverage_name,
rl2_get_coverage_type, rl2_get_coverage_compression,
rl2_is_coverage_uncompressed, rl2_is_coverage_compression_lossless,
rl2_is_coverage_compression_lossy, rl2_get_coverage_tile_size,
rl2_get_coverage_no_data, rl2_create_coverage_pixel,
rl2_get_coverage_srid, rl2_get_coverage_resolution
\note you are responsible to destroy (before or after) any allocated
Coverage object.
*/
RL2_DECLARE rl2CoveragePtr
rl2_create_coverage (const char *name, unsigned char sample_type,
unsigned char pixel_type,
unsigned char num_samples,
unsigned char compression, int quality,
unsigned int tile_width,
unsigned int tile_height, rl2PixelPtr no_data);
/**
Destroys a Coverage Object
\param cvg pointer to object to be destroyed
\sa rl2_create_coverage
*/
RL2_DECLARE void rl2_destroy_coverage (rl2CoveragePtr cvg);
/**
Assigns GeoReferencing parameters to a Coverage Object
\param cvg pointer to the Coverage Object.
\param srid a valid SRID identifier
\param horz_res horizontal pixel resolution: the size (measured
in map units) corresponding to a single Pixel at full
resolution.
\param vert_res vertical pixel resolution.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_coverage
*/
RL2_DECLARE int
rl2_coverage_georeference (rl2CoveragePtr cvg, int srid,
double horz_res, double vert_res);
/**
Gets the Policies from a Coverage Object
\param cvg pointer to the Coverage Object.
\param strict_resolution on completion the BOOLEAN variable referenced
by this pointer will contain the StrictResolution flag.
\param mixed_resolutions on completion the BOOLEAN variable referenced
by this pointer will contain the MixedResolutions flag.
\param section_paths on completion the BOOLEAN variable referenced
by this pointer will contain the SectionPaths flag.
\param section_md5 on completion the BOOLEAN variable referenced
by this pointer will contain the SectionMD5 flag.
\param section_summary on completion the BOOLEAN variable referenced
by this pointer will contain the SectionSummary flag.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_coverage, rl2_set_coverage_policies
*/
RL2_DECLARE int
rl2_get_coverage_policies (rl2CoveragePtr cvg, int *stric_resolution,
int *mixed_resolutions, int *section_paths,
int *section_md5, int *section_summary);
/**
Sets the Policies for a Coverage Object
\param cvg pointer to the Coverage Object.
\param strict_resolution the StrictResolution BOOLEAN flag.
\param mixed_resolutions the MixedResolutions BOOLEAN flag.
\param section_paths the SectionPaths BOOLEAN flag.
\param section_md5 the SectionMD5 BOOLEAN flag.
\param section_summary the SectionSummary BOOLEAN flag.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_coverage, rl2_get_coverage_policies
*/
RL2_DECLARE int
rl2_set_coverage_policies (rl2CoveragePtr cvg, int stric_resolution,
int mixed_resolutions, int section_paths,
int section_md5, int section_summary);
/**
Retrieving the Name from a Coverage Object
\param cvg pointer to the Coverage Object.
\return pointer to the Name text string; NULL if any error is encountered.
\sa rl2_create_coverage
*/
RL2_DECLARE const char *rl2_get_coverage_name (rl2CoveragePtr cvg);
/**
Retrieving the Sample Type from a Coverage Object
\param cvg pointer to the Coverage Object.
\param sample_type on completion the variable referenced by this
pointer will contain the Sampe Type.
\param pixel_type on completion the variable referenced by this
pointer will contain the Pixel Type.
\param num_bands on completion the variable referenced by this
pointer will contain the Number of Bands.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_coverage
*/
RL2_DECLARE int rl2_get_coverage_type (rl2CoveragePtr cvg,
unsigned char *sample_type,
unsigned char *pixel_type,
unsigned char *num_bands);
/**
Retrieving the Compression Type from a Coverage Object
\param cvg pointer to the Coverage Object.
\param compression on completion the variable referenced by this
pointer will contain the Compression Type.
\param quality on completion the variable referenced by this
pointer will contain the Compression Quality.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_coverage
*/
RL2_DECLARE int rl2_get_coverage_compression (rl2CoveragePtr cvg,
unsigned char *compression,
int *quality);
/**
Testing if a Coverage Object is uncompressed or compressed
\param cvg pointer to the Coverage Object.
\param is_uncompressed on completion the variable referenced by this
pointer will contain RL2_TRUE or RL2_FALSE.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_coverage
*/
RL2_DECLARE int rl2_is_coverage_uncompressed (rl2CoveragePtr cvg,
int *is_uncompressed);
/**
Testing if a Coverage Object adopts a lossless compression
\param cvg pointer to the Coverage Object.
\param is_lossless on completion the variable referenced by this
pointer will contain RL2_TRUE or RL2_FALSE.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_coverage
*/
RL2_DECLARE int rl2_is_coverage_compression_lossless (rl2CoveragePtr cvg,
int *is_lossless);
/**
Testing if a Coverage Object adopts a lossy compression
\param cvg pointer to the Coverage Object.
\param is_lossy on completion the variable referenced by this
pointer will contain RL2_TRUE or RL2_FALSE.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_coverage
*/
RL2_DECLARE int rl2_is_coverage_compression_lossy (rl2CoveragePtr cvg,
int *is_lossy);
/**
Retrieving the Tile Size from a Coverage Object
\param cvg pointer to the Coverage Object.
\param tile_width on completion the variable referenced by this
pointer will contain the coverage's Tile Width.
\param tile_height on completion the variable referenced by this
pointer will contain the coverage's Tile Height.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_coverage
*/
RL2_DECLARE int rl2_get_coverage_tile_size (rl2CoveragePtr cvg,
unsigned int *tile_width,
unsigned int *tile_height);
/**
Retrieving the NO-DATA Pixel value from a Coverage Object
\param cvg pointer to the Coverage Object.
\return pointer to the Pixel Object representing NO-DATA value;
NULL if any error is encountered or if the Coverage has no NO-DATA value.
\sa rl2_create_coverage
*/
RL2_DECLARE rl2PixelPtr rl2_get_coverage_no_data (rl2CoveragePtr cvg);
/**
Creates a new Pixel Object suitable for a given Coverage Object
\param cvg pointer to the Coverage Object.
\return pointer to the newly created Pixel Object; NULL if any error is encountered.
\sa rl2_create_coverage, rl2_create_pixel, rl2_destroy_pixel
\note you are responsible to destroy (before or after) the allocated
Pixel object.
*/
RL2_DECLARE rl2PixelPtr rl2_create_coverage_pixel (rl2CoveragePtr rst);
/**
Retrieving the SRID from a Coverage Object
\param cvg pointer to the Coverage Object.
\param srid on completion the variable referenced by this
pointer will contain the coverage's SRID.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_coverage, rl2_get_coverage_resolution
*/
RL2_DECLARE int rl2_get_coverage_srid (rl2CoveragePtr cvg, int *srid);
/**
Retrieving the base resolution from a Coverage Object
\param cvg pointer to the Coverage Object.
\param hResolution on completion the variable referenced by this
pointer will contain the coverage's horizontal resolution.
\param vResolution on completion the variable referenced by this
pointer will contain the coverage's vertical resolution.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_coverage, rl2_get_coverage_srid
*/
RL2_DECLARE int rl2_get_coverage_resolution (rl2CoveragePtr cvg,
double *hResolution,
double *vResolution);
/**
Allocates and initializes a new Vector Layer object
\param f_table_name a text string containing the Table name.
\param f_geometry_column a text string containing the Geometry Column name
\param geometry_type the numeric ID of some Geometry class; one between
GAIA_POINT, GAIA_LINESTRING, GAIA_POLYGON and alike.
\param srid the SRID value
\param spatial_index one of GAIA_SPATIAL_INDEX_NONE, GAIA_SPATIAL_INDEX_RTREE
or GAIA_SPATIAL_INDEX_MBRCACHE
\return the pointer to newly created Vector Layer Object: NULL on failure.
\sa rl2_destroy_vector_layer, rl2_get_vector_table_name,
rl2_get_vector_geometry_name, rl2_get_vector_geometry_type,
rl2_get_vector_srid, rl2_get_vector_spatial_index
\note you are responsible to destroy (before or after) any allocated
Vector Layer object.
*/
RL2_DECLARE rl2VectorLayerPtr
rl2_create_vector_layer (const char *f_table_name,
const char *f_geometry_column,
unsigned short geometry_type, int srid,
unsigned char spatial_index);
/**
Destroys a Vector Layer Object
\param vector pointer to object to be destroyed
\sa rl2_create_vector_layer
*/
RL2_DECLARE void rl2_destroy_vector_layer (rl2VectorLayerPtr vector);
/**
Retrieving the Table name from a Vector Layer Object
\param vector pointer to the Vector Layer Object.
\return pointer to the Table name text string; NULL if any error is
encountered.
\sa rl2_create_vector_layer, rl2_get_vector_geometry_name
*/
RL2_DECLARE const char *rl2_get_vector_table_name (rl2VectorLayerPtr
vector);
/**
Retrieving the Geometry Column name from a Vector Layer Object
\param vector pointer to the Vector Layer Object.
\return pointer to the Geometry Column name text string; NULL if any
error is encountered.
\sa rl2_create_vector_layer, rl2_get_vector_table_name
*/
RL2_DECLARE const char *rl2_get_vector_geometry_name (rl2VectorLayerPtr
vector);
/**
Retrieving the Geometry Type from a Vector Layer Object
\param vector pointer to the Vector Layer Object.
\param geometry_type on completion the variable referenced by this
pointer will contain the Geometry Type.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_vector_layer
*/
RL2_DECLARE int rl2_get_vector_geometry_type (rl2VectorLayerPtr vector,
unsigned short
*geometry_type);
/**
Retrieving the SRID from a Vector Layer Object
\param vector pointer to the Vector Layer Object.
\param srid on completion the variable referenced by this
pointer will contain the SRID.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_vector_layer
*/
RL2_DECLARE int rl2_get_vector_srid (rl2VectorLayerPtr vector, int *srid);
/**
Retrieving the Spatial Index type from a Vector Layer Object
\param vector pointer to the Vector Layer Object.
\param idx on completion the variable referenced by this
pointer will contain the Spatial Index type.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_vector_layer
*/
RL2_DECLARE int rl2_get_vector_spatial_index (rl2VectorLayerPtr vector,
unsigned char *idx);
/**
Allocates and initializes a new Section object
\param name a text string intended to be the symbolic Section name.
\param compression e.g. RL2_COMPRESSION_NONE or RL2_COMPRESSION_DEFLATE
\param tile_width the individual tile width in pixels.
\param tile_height the individual tile height in pixels.
\param rst pointer to a Raster Object.
\return the pointer to newly created Section Object: NULL on failure.
\sa rl2_destroy_section, rl2_get_section_name, rl2_get_section_compression,
rl2_is_section_uncompressed, rl2_is_section_compression_lossless,
rl2_is_section_compression_lossy, rl2_get_section_tile_width,
rl2_get_section_tile_height, rl2_get_section_raster,
rl2_section_from_gif, rl2_section_from_png, rl2_section_from_jpeg,
rl2_section_from_webp, rl2_section_to_gif, rl2_section_to_png,
rl2_section_to_jpeg, rl2_section_to_lossy_webp,
rl2_section_to_lossless_webp
\note you are responsible to destroy (before or after) any allocated
Section object.
*/
RL2_DECLARE rl2SectionPtr
rl2_create_section (const char *name, unsigned char compression,
unsigned int tile_width,
unsigned int tile_height, rl2RasterPtr rst);
/**
Allocates and initializes a new Section object from an external GIF image
\param path pathname leading to the external GIF image.
\return the pointer to newly created Section Object: NULL on failure.
\sa rl2_destroy_section, rl2_create_section, rl2_section_to_gif
\note you are responsible to destroy (before or after) any allocated
Section object.
*/
RL2_DECLARE rl2SectionPtr rl2_section_from_gif (const char *path);
/**
Allocates and initializes a new Section object from an external PMG image
\param path pathname leading to the external PNG image.
\return the pointer to newly created Section Object: NULL on failure.
\sa rl2_destroy_section, rl2_create_section, rl2_section_to_png
\note you are responsible to destroy (before or after) any allocated
Section object.
*/
RL2_DECLARE rl2SectionPtr rl2_section_from_png (const char *path);
/**
Allocates and initializes a new Section object from an external JPEG image
\param path pathname leading to the external JPEG image.
\return the pointer to newly created Section Object: NULL on failure.
\sa rl2_destroy_section, rl2_create_section, rl2_section_to_jpeg
\note you are responsible to destroy (before or after) any allocated
Section object.
*/
RL2_DECLARE rl2SectionPtr rl2_section_from_jpeg (const char *path);
/**
Allocates and initializes a new Section object from an external WEBP image
\param path pathname leading to the external WEBP image.
\return the pointer to newly created Section Object: NULL on failure.
\sa rl2_destroy_section, rl2_create_section, rl2_section_to_lossy_webp,
rl2_section_to_lossless_webp
\note you are responsible to destroy (before or after) any allocated
Section object.
*/
RL2_DECLARE rl2SectionPtr rl2_section_from_webp (const char *path);
/**
Allocates and initializes a new Section object from an external
Jpeg2000 image
\param path pathname leading to the external Jpeg2000 image.
\param sample_type one of RL2_SAMPLE_UINT8 or RL2_SAMPLE_INT16.
\param pixel_type one of RL2_PIXEL_GRAYSCALE, RL2_PIXEL_RGB,
RL2_PIXEL_MULTIBAND, RL2_PIXEL_DATAGRID.
\param num_samples number of samples per pixel (aka Bands).
\return the pointer to newly created Section Object: NULL on failure.
\sa rl2_destroy_section, rl2_create_section, rl2_section_to_lossy_jpeg2000,
rl2_section_to_lossless_jpeg2000
\note you are responsible to destroy (before or after) any allocated
Section object.
*/
RL2_DECLARE rl2SectionPtr rl2_section_from_jpeg2000 (const char *path,
unsigned char
sample_type,
unsigned char
pixel_type,
unsigned char
num_samples);
/**
Exports a Section object as an external GIF image
\param scn pointer to the Section Object.
\param path pathname leading to the external GIF image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section, rl2_section_from_gif
*/
RL2_DECLARE int rl2_section_to_gif (rl2SectionPtr scn, const char *path);
/**
Exports a Section object as an external PNG image
\param scn pointer to the Section Object.
\param path pathname leading to the external PNG image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section, rl2_section_from_png
*/
RL2_DECLARE int rl2_section_to_png (rl2SectionPtr scn, const char *path);
/**
Exports a Section object as an external JPEG image
\param scn pointer to the Section Object.
\param path pathname leading to the external JPEG image.
\param quality compression quality factor (0-100).
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section, rl2_section_from_jpeg
*/
RL2_DECLARE int
rl2_section_to_jpeg (rl2SectionPtr scn, const char *path, int quality);
/**
Exports a Section object as an external WEBP (lossy) image
\param scn pointer to the Section Object.
\param path pathname leading to the external WEBP image.
\param quality compression quality factor (0-100).
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section, rl2_section_from_jpeg
*/
RL2_DECLARE int rl2_section_to_lossy_webp (rl2SectionPtr scn,
const char *path, int quality);
/**
Exports a Section object as an external WEBP (lossless) image
\param scn pointer to the Section Object.
\param path pathname leading to the external WEBP image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section, rl2_section_from_webp
*/
RL2_DECLARE int rl2_section_to_lossless_webp (rl2SectionPtr scn,
const char *path);
/**
Exports a Section object as an external Jpeg2000 (lossy) image
\param scn pointer to the Section Object.
\param path pathname leading to the external Jpeg2000 image.
\param quality compression quality factor (0-100).
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section, rl2_section_from_jpeg
*/
RL2_DECLARE int rl2_section_to_lossy_jpeg2000 (rl2SectionPtr scn,
const char *path,
int quality);
/**
Exports a Section object as an external Jpeg2000 (lossless) image
\param scn pointer to the Section Object.
\param path pathname leading to the external Jpeg2000 image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section, rl2_section_from_webp
*/
RL2_DECLARE int rl2_section_to_lossless_jpeg2000 (rl2SectionPtr scn,
const char *path);
/**
Destroys a Section Object
\param scn pointer to object to be destroyed
\sa rl2_create_section
*/
RL2_DECLARE void rl2_destroy_section (rl2SectionPtr scn);
/**
Retrieving the Name from a Section Object
\param scn pointer to the Section Object.
\return pointer to the Name text string; NULL if any error is encountered.
\sa rl2_create_section
*/
RL2_DECLARE const char *rl2_get_section_name (rl2SectionPtr scn);
/**
Retrieving the Compression Type from a Section Object
\param scn pointer to the Section Object.
\param compression on completion the variable referenced by this
pointer will contain the section's Compression Type.
\param rst pointer to the Raster Object.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section
*/
RL2_DECLARE int rl2_get_section_compression (rl2SectionPtr scn,
unsigned char *compression);
/**
Testing if a Section Object is uncompressed or compressed
\param scn pointer to the Section Object.
\param is_uncompressed on completion the variable referenced by this
pointer will contain RL2_TRUE or RL2_FALSE.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section
*/
RL2_DECLARE int rl2_is_section_uncompressed (rl2SectionPtr scn,
int *is_uncompressed);
/**
Testing if a Section Object adopts a lossless compression
\param scn pointer to the Section Object.
\param is_lossless on completion the variable referenced by this
pointer will contain RL2_TRUE or RL2_FALSE.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section
*/
RL2_DECLARE int rl2_is_section_compression_lossless (rl2SectionPtr scn,
int *is_lossless);
/**
Testing if a Section Object adopts a lossy compression
\param scn pointer to the Section Object.
\param is_lossy on completion the variable referenced by this
pointer will contain RL2_TRUE or RL2_FALSE.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section
*/
RL2_DECLARE int rl2_is_section_compression_lossy (rl2SectionPtr scn,
int *is_lossy);
/**
Retrieving the Tile Size from a Section Object
\param scn pointer to the Section Object.
\param tile_width on completion the variable referenced by this
pointer will contain the section's Tile Width.
\param tile_height on completion the variable referenced by this
pointer will contain the section's Tile Height.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_section
*/
RL2_DECLARE int rl2_get_section_tile_size (rl2SectionPtr scn,
unsigned int *tile_width,
unsigned int *tile_height);
/**
Return a reference to the Raster Object encapsulated within a Section Object
\param cvg pointer to the Section Object.
\return pointer to the Raster Object; NULL if any error is encountered.
\sa rl2_create_section
\note full ownership of the referenced Raster Object will still belong to the Section Object.
*/
RL2_DECLARE rl2RasterPtr rl2_get_section_raster (rl2SectionPtr scn);
/**
Allocates and initializes a new Raster object
\param width Raster Width (in pixels).
\param height Raster Height (in pixels).
\param sample_type one of RL2_SAMPLE_1_BIT, RL2_SAMPLE_2_BIT, RL2_SAMPLE_4_BIT,
RL2_SAMPLE_INT8, RL2_SAMPLE_UINT8, RL2_SAMPLE_INT16, RL2_SAMPLE_UINT16,
RL2_SAMPLE_INT32, RL2_SAMPLE_UINT32, RL2_SAMPLE_FLOAT or RL2_SAMPLE_DOUBLE.
\param pixel_type one of RL2_PIXEL_MONOCHROME, RL2_PIXEL_PALETTE, RL2_PIXEL_GRAYSCALE,
RL2_PIXEL_RGB, RL2_PIXEL_MULTIBAND, RL2_PIXEL_DATAGRID.
\param num_samples number of samples per pixel (aka Bands)
\param bufpix pointer to the Buffer containing all Pixels
\param bufpix_size size (in bytes) of the above Buffer
\param palette pointer to a Palette object (NULL is the Pixel Type doesn't require a Palette)
\param mask pointer to an optional Transparency Mask (may be NULL if no Mask is required)
\param mask_size size (in bytes) of the above Mask (ZERO if no Mask is required)
\param no_data pointer to a Pixel Object indented as NO-DATA value;
could be eventually NULL if not required.
\return the pointer to newly created Raster Object: NULL on failure.
\sa rl2_destroy_raster, rl2_get_raster_size,
rl2_get_raster_raster_type, rl2_get_raster_pixel_type,
rl2_get_raster_bands, rl2_get_raster_no_data, rl2_get_raster_srid,
rl2_get_raster_horizontal_resolution, rl2_get_raster_vertical_resolution,
rl2_get_raster_minX, rl2_get_raster_minY, rl2_get_raster_maxX,
rl2_get_raster_maxY, rl2_create_raster_pixel,
rl2_raster_georeference_center, rl2_raster_georeference_upper_left,
rl2_raster_georeference_lower_left, rl2_raster_georeference_upper_right,
rl2_raster_georeference_lower_right, rl2_raster_georeference_frame,
rl2_raster_data_to_1bit, rl2_raster_data_to_2bit, rl2_raster_data_to_4bit,
rl2_raster_data_to_int8, rl2_raster_data_to_uint8, rl2_raster_data_to_int16,
rl2_raster_data_to_uint16, rl2_raster_data_to_int32, rl2_raster_data_to_uint32,
rl2_raster_data_to_float, rl2_raster_data_to_double, rl2_raster_band_to_uint8,
rl2_raster_band_to_uint16, rl2_raster_bands_to_RGB, rl2_raster_to_gif,
rl2_raster_to_png, rl2_raster_to_jpeg, rl2_raster_to_lossless_webp,
rl2_raster_to_lossy_webp, rl2_raster_from_gif, rl2_raster_from_png,
rl2_raster_from_jpeg, rl2_raster_from_webp, rl2_raster_from_tiff
\note you are responsible to destroy (before or after) any allocated
Raster object.
*/
RL2_DECLARE rl2RasterPtr
rl2_create_raster (unsigned int width, unsigned int height,
unsigned char sample_type, unsigned char pixel_type,
unsigned char num_samples, unsigned char *bufpix,
int bufpix_size, rl2PalettePtr palette,
unsigned char *mask, int mask_size,
rl2PixelPtr no_data);
/**
Allocates and initializes a new Raster object
\param width Raster Width (in pixels).
\param height Raster Height (in pixels).
\param sample_type one of RL2_SAMPLE_1_BIT, RL2_SAMPLE_2_BIT, RL2_SAMPLE_4_BIT,
RL2_SAMPLE_INT8, RL2_SAMPLE_UINT8, RL2_SAMPLE_INT16, RL2_SAMPLE_UINT16,
RL2_SAMPLE_INT32, RL2_SAMPLE_UINT32, RL2_SAMPLE_FLOAT or RL2_SAMPLE_DOUBLE.
\param pixel_type one of RL2_PIXEL_MONOCHROME, RL2_PIXEL_PALETTE, RL2_PIXEL_GRAYSCALE,
RL2_PIXEL_RGB, RL2_PIXEL_MULTIBAND, RL2_PIXEL_DATAGRID.
\param num_samples number of samples per pixel (aka Bands)
\param bufpix pointer to the Buffer containing all Pixels
\param bufpix_size size (in bytes) of the above Buffer
\param palette pointer to a Palette object (NULL is the Pixel Type doesn't require a Palette)
\param alpha pointer to an optional Alpha Mask (may be NULL if no Mask is required)
\param alpha_size size (in bytes) of the above Mask (ZERO if no Mask is required)
\param no_data pointer to a Pixel Object indented as NO-DATA value;
could be eventually NULL if not required.
\return the pointer to newly created Raster Object: NULL on failure.
\sa rl2_destroy_raster, rl2_get_raster_size,
rl2_get_raster_raster_type, rl2_get_raster_pixel_type,
rl2_get_raster_bands, rl2_get_raster_no_data, rl2_get_raster_srid,
rl2_get_raster_horizontal_resolution, rl2_get_raster_vertical_resolution,
rl2_get_raster_minX, rl2_get_raster_minY, rl2_get_raster_maxX,
rl2_get_raster_maxY, rl2_create_raster_pixel,
rl2_raster_georeference_center, rl2_raster_georeference_upper_left,
rl2_raster_georeference_lower_left, rl2_raster_georeference_upper_right,
rl2_raster_georeference_lower_right, rl2_raster_georeference_frame,
rl2_raster_data_to_1bit, rl2_raster_data_to_2bit, rl2_raster_data_to_4bit,
rl2_raster_data_to_int8, rl2_raster_data_to_uint8, rl2_raster_data_to_int16,
rl2_raster_data_to_uint16, rl2_raster_data_to_int32, rl2_raster_data_to_uint32,
rl2_raster_data_to_float, rl2_raster_data_to_double, rl2_raster_band_to_uint8,
rl2_raster_band_to_uint16, rl2_raster_bands_to_RGB, rl2_raster_to_gif,
rl2_raster_to_png, rl2_raster_to_jpeg, rl2_raster_to_lossless_webp,
rl2_raster_to_lossy_webp, rl2_raster_from_gif, rl2_raster_from_png,
rl2_raster_from_jpeg, rl2_raster_from_webp, rl2_raster_from_tiff
\note you are responsible to destroy (before or after) any allocated
Raster object.
*/
RL2_DECLARE rl2RasterPtr
rl2_create_raster_alpha (unsigned int width, unsigned int height,
unsigned char sample_type,
unsigned char pixel_type,
unsigned char num_samples,
unsigned char *bufpix, int bufpix_size,
rl2PalettePtr palette, unsigned char *alpha,
int alpha_size, rl2PixelPtr no_data);
/**
Destroys a Raster Object
\param rst pointer to object to be destroyed
\sa rl2_create_raster
*/
RL2_DECLARE void rl2_destroy_raster (rl2RasterPtr rst);
/**
Retrieving the Width/height dimensions from a Raster Object
\param rst pointer to the Raster Object.
\param width on completion the variable referenced by this
pointer will contain the raster's Width.
\param height on completion the variable referenced by this
pointer will contain the raster's Height.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster
*/
RL2_DECLARE int rl2_get_raster_size (rl2RasterPtr rst,
unsigned int *width,
unsigned int *height);
/**
Retrieving the Sample Type from a Raster Object
\param rst pointer to the Raster Object.
\param sample_type on completion the variable referenced by this
pointer will contain the Sampe Type.
\param pixel_type on completion the variable referenced by this
pointer will contain the Pixel Type.
\param num_bands on completion the variable referenced by this
pointer will contain the Number of Bands.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster
*/
RL2_DECLARE int rl2_get_raster_type (rl2RasterPtr rst,
unsigned char *sample_type,
unsigned char *pixel_type,
unsigned char *num_bands);
/**
Explicitly sets the NO-DATA Pixel value for a Raster Object
\param rst pointer to the Raster Object.
\param no_data pointer to a Pixel Object
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_get_raster_no_data
*/
RL2_DECLARE int rl2_set_raster_no_data (rl2RasterPtr rst,
rl2PixelPtr no_data);
/**
Retrieving the NO-DATA Pixel value from a Raster Object
\param rst pointer to the Raster Object.
\return pointer to the Pixel Object representing NO-DATA value;
NULL if any error is encountered or if the Raster has no NO-DATA value.
\sa rl2_create_raster, rl2_set_raster_no_data
*/
RL2_DECLARE rl2PixelPtr rl2_get_raster_no_data (rl2RasterPtr rst);
/**
Retrieving the SRID from a Raster Object
\param rst pointer to the Raster Object.
\param srid on completion the variable referenced by this
pointer will contain the raster's SRID.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster
*/
RL2_DECLARE int rl2_get_raster_srid (rl2RasterPtr rst, int *srid);
/**
Retrieving the Pixel resolution from a Raster Object
\param rst pointer to the Raster Object.
\param hResolution on completion the variable referenced by this
pointer will contain the raster's Horizontal Resolution.
\param vResolution on completion the variable referenced by this
pointer will contain the raster's Vertical Resolution.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster
*/
RL2_DECLARE int rl2_get_raster_resolution (rl2RasterPtr rst,
double *hResolution,
double *vResolution);
/**
Retrieving the full extent from a Raster Object
\param rst pointer to the Raster Object.
\param minX on completion the variable referenced by this
pointer will contain the raster's minimum X coordinate.
\param minY on completion the variable referenced by this
pointer will contain the raster's minimum Y coordinate.
\param maxX on completion the variable referenced by this
pointer will contain the raster's maximum X coordinate.
\param maxY on completion the variable referenced by this
pointer will contain the raster's maximum Y coordinate.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster
*/
RL2_DECLARE int rl2_get_raster_extent (rl2RasterPtr rst,
double *minX, double *minY,
double *maxX, double *maxY);
/**
Creates a new Pixel Object suitable for a given Raster Object
\param rst pointer to the Raster Object.
\return pointer to the newly created Pixel Object; NULL if any error is encountered.
\sa rl2_create_raster, rl2_create_pixel, rl2_destroy_pixel
\note you are responsible to destroy (before or after) the allocated
Pixel object.
*/
RL2_DECLARE rl2PixelPtr rl2_create_raster_pixel (rl2RasterPtr rst);
/**
Georeferencing a Raster Object (by specifying its Center Point)
\param rst pointer to the Raster Object.
\param srid the SRID value
\param horz_res horizontal pixel resolution: the size (measured
in map units) corresponding to a single Pixel.
\param vert_res vertical pixel resolution.
\param cx map X coordinate corresponding to the Raster's center point.
\param cy map Y coordinate corresponding to the Raster's center point.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_georeference_upper_left,
rl2_raster_georeference_lower_left, rl2_raster_georeference_upper_right,
rl2_raster_georeference_lower_right, rl2_raster_georeference_frame
*/
RL2_DECLARE int
rl2_raster_georeference_center (rl2RasterPtr rst, int srid,
double horz_res, double vert_res,
double cx, double cy);
/**
Georeferencing a Raster Object (by specifying its Upper-Left Corner)
\param rst pointer to the Raster Object.
\param srid the SRID value
\param horz_res horizontal pixel resolution: the size (measured
in map units) corresponding to a single Pixel.
\param vert_res vertical pixel resolution.
\param x map X coordinate corresponding to the Raster's upper-left corner.
\param y map Y coordinate corresponding to the Raster's upper-left corner.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_georeference_center,
rl2_raster_georeference_lower_left, rl2_raster_georeference_upper_right,
rl2_raster_georeference_lower_right, rl2_raster_georeference_frame
*/
RL2_DECLARE int
rl2_raster_georeference_upper_left (rl2RasterPtr rst, int srid,
double horz_res, double vert_res,
double x, double y);
/**
Georeferencing a Raster Object (by specifying its Lower-Left Corner)
\param rst pointer to the Raster Object.
\param srid the SRID value
\param horz_res horizontal pixel resolution: the size (measured
in map units) corresponding to a single Pixel.
\param vert_res vertical pixel resolution.
\param x map X coordinate corresponding to the Raster's lower-left corner.
\param y map Y coordinate corresponding to the Raster's lower-left corner.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_georeference_center,
rl2_raster_georeference_upper_left, rl2_raster_georeference_upper_right,
rl2_raster_georeference_lower_right, rl2_raster_georeference_frame
*/
RL2_DECLARE int
rl2_raster_georeference_lower_left (rl2RasterPtr rst, int srid,
double horz_res, double vert_res,
double x, double y);
/**
Georeferencing a Raster Object (by specifying its Upper-Right Corner)
\param rst pointer to the Raster Object.
\param srid the SRID value
\param horz_res horizontal pixel resolution: the size (measured
in map units) corresponding to a single Pixel.
\param vert_res vertical pixel resolution.
\param x map X coordinate corresponding to the Raster's upper-right corner.
\param y map Y coordinate corresponding to the Raster's upper-right corner.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_georeference_center, rl2_raster_georeference_upper_left,
rl2_raster_georeference_lower_left, rl2_raster_georeference_lower_right,
rl2_raster_georeference_frame
*/
RL2_DECLARE int
rl2_raster_georeference_upper_right (rl2RasterPtr rst, int srid,
double horz_res, double vert_res,
double x, double y);
/**
Georeferencing a Raster Object (by specifying its Lower-Right Corner)
\param rst pointer to the Raster Object.
\param srid the SRID value
\param horz_res horizontal pixel resolution: the size (measured
in map units) corresponding to a single Pixel.
\param vert_res vertical pixel resolution.
\param x map X coordinate corresponding to the Raster's lower-right corner.
\param y map Y coordinate corresponding to the Raster's lower-right corner.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_georeference_center, rl2_raster_georeference_upper_left,
rl2_raster_georeference_upper_right, rl2_raster_georeference_lower_left,
rl2_raster_georeference_frame
*/
RL2_DECLARE int
rl2_raster_georeference_lower_right (rl2RasterPtr rst, int srid,
double horz_res, double vert_res,
double x, double y);
/**
Georeferencing a Raster Object (by specifying its Corners)
\param rst pointer to the Raster Object.
\param srid the SRID value
\param min_x map X coordinate corresponding to the Raster's lower-left corner.
\param min_y map Y coordinate corresponding to the Raster's lower-letf corner.
\param max_x map X coordinate corresponding to the Raster's upper-right corner.
\param max_y map Y coordinate corresponding to the Raster's upper-right corner.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_georeference_center, rl2_raster_georeference_upper_left,
rl2_raster_georeference_upper_right, rl2_raster_georeference_lower_left,
rl2_raster_georeference_lower_right
*/
RL2_DECLARE int
rl2_raster_georeference_frame (rl2RasterPtr rst, int srid, double min_x,
double min_y, double max_x,
double max_y);
/**
Retrieves a Pixel from a Raster Object
\param rst pointer to the Raster Object.
\param pxl pointer to an already allocated Pixel Object receiving the pixel's
values from the raster.
\param row pixel's row number.
\param col pixel's column numer: pixels are structured as a rectangular array.
Pixel [0,0] is always positioned on the raster's left-upper corner.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_create_pixel, rl2_get_raster_size,
rl2_set_raster_pixel
*/
RL2_DECLARE int
rl2_get_raster_pixel (rl2RasterPtr rst, rl2PixelPtr pxl,
unsigned int row, unsigned int col);
/**
Retrieves a Pixel from a Raster Object
\param rst pointer to the Raster Object.
\param pxl pointer to a Pixel Object containing the pixel's
values to be stored within the raster.
\param row pixel's row number.
\param col pixel's column numer: pixels are structured as a rectangular array.
Pixel [0,0] is always positioned on the raster's left-upper corner.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_create_pixel, rl2_get_raster_size,
rl2_get_raster_pixel
*/
RL2_DECLARE int
rl2_set_raster_pixel (rl2RasterPtr rst, rl2PixelPtr pxl,
unsigned int row, unsigned int col);
/**
Encodes a Raster Object into the corresponding BLOB serialized format
\param rst pointer to the Raster Object.
\param compression e.g. RL2_COMPRESSION_NONE or RL2_COMPRESSION_DEFLATE
\param blob_odd on completion will point to the created encoded BLOB ("odd" half).
\param blob_odd_sz on completion the variable referenced by this
pointer will contain the size (in bytes) of the "odd" BLOB.
\param blob_even on completion will point to the created encoded BLOB ("even" half).
\param blob_even_sz on completion the variable referenced by this
pointer will contain the size (in bytes) of the "even" BLOB.
\param quality compression quality factor (0-100); only meaningfull for
JPEG or WEBP lossy compressions, ignored in any other case.
\param litte_endian (boolean) accordingly to required BLOB endianness.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_decode, rl2_get_raster_statistics
\note both "odd" and "even" BLOB objects corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocations in
the most appropriate way.
\note some specific encoding doesn't require the "even" BLOB; so be prepared
to get a NULL pointer in this case.
*/
RL2_DECLARE int
rl2_raster_encode (rl2RasterPtr rst, int compression,
unsigned char **blob_odd, int *blob_odd_sz,
unsigned char **blob_even, int *blob_even_sz,
int quality, int little_endian);
/**
Tests a Raster Tile Object for validity - BLOB serialized format
\param level Pyramid level index (full resolution always corresponds to the ZERO index)
\param tile_width the individual tile width in pixels.
\param tile_height the individual tile height in pixels.
\param blob_odd pointer to the encoded BLOB ("odd" half).
\param blob_odd_sz size (in bytes) of the "odd" BLOB.
\param blob_even pointer to the encoded BLOB ("even" half): could be NULL.
\param blob_even_sz size (in bytes) of the "even" BLOB: could be ZERO.
\param sample_type sample type of the belonging Coverage
\param pixel_type pixel type of the belonging Coverage
\param num_bands number of bands of the belonging Coverage
\param compression of the belonging Coverage
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_encode, rl2_get_raster_statistics
\note you are responsible to destroy (before or after) any allocated
Raster object.
\note some specific encoding doesn't require the "even" BLOB; in this case
you should set blob_even to NULL and blob_even_sz to ZERO.
*/
RL2_DECLARE int
rl2_is_valid_dbms_raster_tile (unsigned short level,
unsigned int tile_width,
unsigned int tile_height,
const unsigned char *blob_odd,
int blob_odd_sz,
const unsigned char *blob_even,
int blob_even_sz,
unsigned char sample_type,
unsigned char pixel_type,
unsigned char num_bands,
unsigned char compression);
/**
Decodes a Raster Object from the corresponding BLOB serialized format
\param scale image ratio: one of RL2_SCALE_1 (1:1), RL2_SCALE_2 (1:2),
RL2_SCALE_4 (1:4) or RL2_SCALE_8 (1:8)
\param blob_odd pointer to the encoded BLOB ("odd" half).
\param blob_odd_sz size (in bytes) of the "odd" BLOB.
\param blob_even pointer to the encoded BLOB ("even" half): could be NULL.
\param blob_even_sz size (in bytes) of the "even" BLOB: could be ZERO.
\param palette pointer to a Palette object (could be NULL, but it could
be strictly required by Palette-based tiles)
\return the pointer to newly created Raster Object: NULL on failure.
\sa rl2_create_raster, rl2_raster_encode, rl2_get_raster_statistics,
rl2_is_valid_dbms_raster_tile
\note you are responsible to destroy (before or after) any allocated
Raster object.
\note some specific encoding doesn't require the "even" BLOB; in this case
you should set blob_even to NULL and blob_even_sz to ZERO.
*/
RL2_DECLARE rl2RasterPtr
rl2_raster_decode (int scale, const unsigned char *blob_odd,
int blob_odd_sz, const unsigned char *blob_even,
int blob_even_sz, rl2PalettePtr palette);
/**
Allocates and initializes a new Raster Statistics object
\param sample_type one of RL2_SAMPLE_1_BIT, RL2_SAMPLE_2_BIT, RL2_SAMPLE_4_BIT,
RL2_SAMPLE_INT8, RL2_SAMPLE_UINT8, RL2_SAMPLE_INT16, RL2_SAMPLE_UINT16,
RL2_SAMPLE_INT32, RL2_SAMPLE_UINT32, RL2_SAMPLE_FLOAT or RL2_SAMPLE_DOUBLE.
\param num_samples number of samples per pixel (aka Bands)
\return the pointer to newly created Raster Statistics Object: NULL on failure.
\sa rl2_destroy_raster_statistic, rl2_get_raster_statistics
\note you are responsible to destroy (before or after) any allocated
Raster Statistics object.
*/
RL2_DECLARE rl2RasterStatisticsPtr rl2_create_raster_statistics (unsigned
char
sample_type,
unsigned
char
num_samples);
/**
Destroys a Raster Statistics Object
\param stats pointer to object to be destroyed
\sa rl2_create_raster_statistics
*/
RL2_DECLARE void rl2_destroy_raster_statistics (rl2RasterStatisticsPtr
stats);
/**
Computes the Raster Statistics from BLOB serialized format
\param blob_odd pointer to the encoded BLOB ("odd" half).
\param blob_odd_sz size (in bytes) of the "odd" BLOB.
\param blob_even pointer to the encoded BLOB ("even" half): could be NULL.
\param blob_even_sz size (in bytes) of the "even" BLOB: could be ZERO.
\param palette pointer to a Palette object (could be NULL, but it could
be strictly required by Palette-based tiles)
\param no_data NO-DATA pixel value (could be eventually NULL)
\return the pointer to newly created Raster Statistics Object: NULL on failure.
\sa rl2_destroy_raster_statistics, rl2_aggregate_raster_statistics,
rl2_serialize_dbms_raster_statistics, rl2_deserialize_dbms_raster_statistics,
rl2_get_raster_statistics_summary, rl2_get_band_statistics
\note you are responsible to destroy (before or after) any allocated
Raster Statistics object.
*/
RL2_DECLARE rl2RasterStatisticsPtr
rl2_get_raster_statistics (const unsigned char *blob_odd,
int blob_odd_sz,
const unsigned char *blob_even,
int blob_even_sz, rl2PalettePtr palette,
rl2PixelPtr no_data);
/**
Computes the Raster Statistics from a Raster object
\param raster pointer to a valid Raster object
\return the pointer to newly created Raster Statistics Object: NULL on failure.
\sa rl2_destroy_raster_statistics, rl2_get_band_statistics
\note you are responsible to destroy (before or after) any allocated
Raster Statistics object.
*/
RL2_DECLARE rl2RasterStatisticsPtr rl2_build_raster_statistics (rl2RasterPtr
raster,
rl2PixelPtr
noData);
/**
Encodes a Raster Statistics Object into the corresponding BLOB serialized format
\param stats pointer to the Raster Statistics Object.
\param blob on completion will point to the created encoded BLOB.
\param blob_sz on completion the variable referenced by this
pointer will contain the size (in bytes) of the BLOB.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster_statistics, rl2_get_raster_statistics,
rl2_deserialize_dbms_raster_statistics, rl2_is_valid_dbms_raster_statistics
\note the returned BLOB object corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
*/
RL2_DECLARE int
rl2_serialize_dbms_raster_statistics (rl2RasterStatisticsPtr stats,
unsigned char **blob,
int *blob_sz);
/**
Tests a Raster Statistics Object for validity - BLOB serialized format
\param blob pointer to the encoded BLOB encoded object.
\param blob_sz size (in bytes) of the BLOB encoded object.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster_statistics, rl2_get_raster_statistics,
rl2_deserialize_dbms_raster_statistics, rl2_is_valid_dbms_raster_statistics
\note the returned BLOB object corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
*/
RL2_DECLARE int
rl2_is_valid_dbms_raster_statistics (const unsigned char *blob,
int blob_sz,
unsigned char sample_type,
unsigned char num_bands);
/**
Decodes a Raster Statistics Object from the corresponding BLOB serialized format
\param blob pointer to the encoded BLOB encoded object.
\param blob_sz size (in bytes) of the BLOB encoded object.
\return the pointer to newly created Raster Statistics Object: NULL on failure.
\sa rl2_create_raster_statistics, rl2_serialize_dbms_raster_statistics,
rl2_get_raster_statistics_summary, rl2_get_band_statistics
\note you are responsible to destroy (before or after) any allocated
Raster Statistics object.
*/
RL2_DECLARE rl2RasterStatisticsPtr
rl2_deserialize_dbms_raster_statistics (const unsigned char *blob,
int blob_sz);
/**
Encodes a Raster Statistics Object into the corresponding BLOB serialized format
\param stats_in pointer to the input Raster Statistics Object.
\param stats_out pointer to the output Raster Statistics Object.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster_statistics, rl2_get_raster_statistics,
rl2_get_raster_statistics_summary, rl2_get_band_statistics
*/
RL2_DECLARE int
rl2_aggregate_raster_statistics (rl2RasterStatisticsPtr stats_in,
rl2RasterStatisticsPtr stats_out);
/**
Return summary values from a Raster Statistics Object
\param stats pointer to the input Raster Statistics Object.
\param no_data on completion the variable referenced by this
pointer will contain the total count of NO-DATA pixels.
\param count on completion the variable referenced by this
pointer will contain the total count of valid pixels.
\param sample_type on completion the variable referenced by this
pointer will contain the Sampe Type.
\param num_bands on completion the variable referenced by this
pointer will contain the Number of Bands.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster_statistics, rl2_get_raster_statistics,
rl2_aggregate_raster_statistics, rl2_get_band_statistics
*/
RL2_DECLARE int
rl2_get_raster_statistics_summary (rl2RasterStatisticsPtr stats,
double *no_data, double *count,
unsigned char *sample_type,
unsigned char *num_bands);
/**
Return summary values from a single Band (Raster Statistics Object)
\param stats pointer to the input Raster Statistics Object.
\param band Band index.
\param min on completion the variable referenced by this
pointer will contain the minimum pixel value.
\param max on completion the variable referenced by this
pointer will contain the maximum pixel value.
\param mean on completion the variable referenced by this
pointer will contain the mean of all pixel values.
\param variance on completion the variable referenced by this
pointer will contain the Variance.
\param standard_deviation on completion the variable referenced by this
pointer will contain the Standard Deviation.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster_statistics, rl2_get_raster_statistics,
rl2_aggregate_raster_statistics, rl2_get_raster_statistics_summary
*/
RL2_DECLARE int
rl2_get_band_statistics (rl2RasterStatisticsPtr stats,
unsigned char band, double *min, double *max,
double *mean, double *variance,
double *standard_deviation);
/**
Creates an RGB pixel array from a Raster
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_RGBA, rl2_raster_data_to_ARGB,
rl2_raster_data_to_BGR, rl2_raster_data_to_BGRA
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Pixel components are always organized as RGBRGBRGB....RGB
*/
RL2_DECLARE int
rl2_raster_data_to_RGB (rl2RasterPtr rst, unsigned char **buffer,
int *buf_size);
/**
Creates an RGBA pixel array from a Raster
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_RGB, rl2_raster_data_to_ARGB,
rl2_raster_data_to_BGR, rl2_raster_data_to_BGRA
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Pixel components are always organized as RGBARGBARGBA....RGBA
*/
RL2_DECLARE int
rl2_raster_data_to_RGBA (rl2RasterPtr rst, unsigned char **buffer,
int *buf_size);
/**
Creates an ARGB pixel array from a Raster
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_RGB, rl2_raster_data_to_RGBA,
rl2_raster_data_to_BGR, rl2_raster_data_to_BGRA
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Pixel components are always organized as ARGBARGBARGB....ARGB
*/
RL2_DECLARE int
rl2_raster_data_to_ARGB (rl2RasterPtr rst, unsigned char **buffer,
int *buf_size);
/**
Creates an BGR pixel array from a Raster
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_RGB, rl2_raster_data_to_RGBA,
rl2_raster_data_to_ARGB, rl2_raster_data_to_BGRA
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Pixel components are always organized as BGRBGRBGR...BGR
*/
RL2_DECLARE int
rl2_raster_data_to_BGR (rl2RasterPtr rst, unsigned char **buffer,
int *buf_size);
/**
Creates an BGRA pixel array from a Raster
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_RGB, rl2_raster_data_to_RGBA,
rl2_raster_data_to_ARGB, rl2_raster_data_to_BGR
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Pixel components are always organized as BGRABGRABGRA...BGRA
*/
RL2_DECLARE int
rl2_raster_data_to_BGRA (rl2RasterPtr rst, unsigned char **buffer,
int *buf_size);
/**
Creates a pixel array from a Raster (1 bit per sample)
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_2bit, rl2_raster_data_to_4bit,
rl2_raster_data_to_int8, rl2_raster_data_to_uint8, rl2_raster_data_to_int16,
rl2_raster_data_to_uint16, rl2_raster_data_to_int32, rl2_raster_data_to_uint32,
rl2_raster_data_to_float, rl2_raster_data_to_double
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
*/
RL2_DECLARE int
rl2_raster_data_to_1bit (rl2RasterPtr rst, unsigned char **buffer,
int *buf_size);
/**
Creates a pixel array from a Raster (2 bit per sample)
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_1bit, rl2_raster_data_to_4bit,
rl2_raster_data_to_int8, rl2_raster_data_to_uint8, rl2_raster_data_to_int16,
rl2_raster_data_to_uint16, rl2_raster_data_to_int32, rl2_raster_data_to_uint32,
rl2_raster_data_to_float, rl2_raster_data_to_double
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
*/
RL2_DECLARE int
rl2_raster_data_to_2bit (rl2RasterPtr rst, unsigned char **buffer,
int *buf_size);
/**
Creates a pixel array from a Raster (4 bit per sample)
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_1bit, rl2_raster_data_to_2bit,
rl2_raster_data_to_int8, rl2_raster_data_to_uint8, rl2_raster_data_to_int16,
rl2_raster_data_to_uint16, rl2_raster_data_to_int32, rl2_raster_data_to_uint32,
rl2_raster_data_to_float, rl2_raster_data_to_double
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
*/
RL2_DECLARE int
rl2_raster_data_to_4bit (rl2RasterPtr rst, unsigned char **buffer,
int *buf_size);
/**
Creates a pixel array from a Raster (Integer, 8 bit sample)
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_1bit, rl2_raster_data_to_2bit,
rl2_raster_data_to_4bit, rl2_raster_data_to_uint8, rl2_raster_data_to_int16,
rl2_raster_data_to_uint16, rl2_raster_data_to_int32, rl2_raster_data_to_uint32,
rl2_raster_data_to_float, rl2_raster_data_to_double
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Endianness will always correspond to CPU natural architecture.
*/
RL2_DECLARE int
rl2_raster_data_to_int8 (rl2RasterPtr rst, char **buffer,
int *buf_size);
/**
Creates a pixel array from a Raster (unsigned Integer, 8 bit sample)
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_1bit, rl2_raster_data_to_2bit,
rl2_raster_data_to_4bit, rl2_raster_data_to_int8, rl2_raster_data_to_int16,
rl2_raster_data_to_uint16, rl2_raster_data_to_int32, rl2_raster_data_to_uint32,
rl2_raster_data_to_float, rl2_raster_data_to_double, rl2_raster_band_to_uint8
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Endianness will always correspond to CPU natural architecture.
*/
RL2_DECLARE int
rl2_raster_data_to_uint8 (rl2RasterPtr rst, unsigned char **buffer,
int *buf_size);
/**
Creates a pixel array from a Raster (Integer, 16 bit sample)
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_1bit, rl2_raster_data_to_2bit,
rl2_raster_data_to_4bit, rl2_raster_data_to_int8, rl2_raster_data_to_uint8,
rl2_raster_data_to_uint16, rl2_raster_data_to_int32, rl2_raster_data_to_uint32,
rl2_raster_data_to_float, rl2_raster_data_to_double
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Endianness will always correspond to CPU natural architecture.
*/
RL2_DECLARE int
rl2_raster_data_to_int16 (rl2RasterPtr rst, short **buffer,
int *buf_size);
/**
Creates a pixel array from a Raster (unsigned Integer, 16 bit sample)
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_1bit, rl2_raster_data_to_2bit,
rl2_raster_data_to_4bit, rl2_raster_data_to_int8, rl2_raster_data_to_uint8,
rl2_raster_data_to_int16, rl2_raster_data_to_int32, rl2_raster_data_to_uint32,
rl2_raster_data_to_float, rl2_raster_data_to_double, rl2_raster_band_to_uint16
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Endianness will always correspond to CPU natural architecture.
*/
RL2_DECLARE int
rl2_raster_data_to_uint16 (rl2RasterPtr rst, unsigned short **buffer,
int *buf_size);
/**
Creates a pixel array from a Raster (Integer, 32 bit sample)
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_1bit, rl2_raster_data_to_2bit,
rl2_raster_data_to_4bit, rl2_raster_data_to_int8, rl2_raster_data_to_uint8,
rl2_raster_data_to_int16, rl2_raster_data_to_uint16, rl2_raster_data_to_uint32,
rl2_raster_data_to_float, rl2_raster_data_to_double
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Endianness will always correspond to CPU natural architecture.
*/
RL2_DECLARE int
rl2_raster_data_to_int32 (rl2RasterPtr rst, int **buffer,
int *buf_size);
/**
Creates a pixel array from a Raster (unsigned Integer, 32 bit sample)
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_1bit, rl2_raster_data_to_2bit,
rl2_raster_data_to_4bit, rl2_raster_data_to_int8, rl2_raster_data_to_uint8,
rl2_raster_data_to_int16, rl2_raster_data_to_uint16, rl2_raster_data_to_int32,
rl2_raster_data_to_float, rl2_raster_data_to_double
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Endianness will always correspond to CPU natural architecture.
*/
RL2_DECLARE int
rl2_raster_data_to_uint32 (rl2RasterPtr rst, unsigned int **buffer,
int *buf_size);
/**
Creates a pixel array from a Raster (floating point, single precision sample)
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_1bit, rl2_raster_data_to_2bit,
rl2_raster_data_to_4bit, rl2_raster_data_to_int8, rl2_raster_data_to_uint8,
rl2_raster_data_to_int16, rl2_raster_data_to_uint16, rl2_raster_data_to_int32,
rl2_raster_data_to_uint32, rl2_raster_data_to_double
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Endianness will always correspond to CPU natural architecture.
*/
RL2_DECLARE int
rl2_raster_data_to_float (rl2RasterPtr rst, float **buffer,
int *buf_size);
/**
Creates a pixel array from a Raster (floating point, double precision sample)
\param rst pointer to the Raster Object.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_1bit, rl2_raster_data_to_2bit,
rl2_raster_data_to_4bit, rl2_raster_data_to_int8, rl2_raster_data_to_uint8,
rl2_raster_data_to_int16, rl2_raster_data_to_uint16, rl2_raster_data_to_int32,
rl2_raster_data_to_uint32, rl2_raster_data_to_float
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Endianness will always correspond to CPU natural architecture.
*/
RL2_DECLARE int
rl2_raster_data_to_double (rl2RasterPtr rst, double **buffer,
int *buf_size);
/**
Creates a pixel array from a Multiband Raster (unsigned Integer, 8 bit sample, single Band)
\param rst pointer to the Raster Object.
\param band the selected Sample/Band index (the first sample corresponds to index ZERO).
\param buffer on completion will point to the created pixel/Band array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel/Band array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_uint8, rl2_raster_band_to_uint16,
rl2_raster_bands_to_RGB
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Endianness will always correspond to CPU natural architecture.
*/
RL2_DECLARE int
rl2_raster_band_to_uint8 (rl2RasterPtr rst, int band,
unsigned char **buffer, int *buf_size);
/**
Creates a pixel array from a Multiband Raster (unsigned Integer, 16 bit sample, single Band)
\param rst pointer to the Raster Object.
\param band the selected Sample/Band index (the first sample corresponds to index ZERO).
\param buffer on completion will point to the created pixel/Band array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel/Band array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_uint16, rl2_raster_band_to_uint8,
rl2_raster_bands_to_RGB
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Endianness will always correspond to CPU natural architecture.
*/
RL2_DECLARE int
rl2_raster_band_to_uint16 (rl2RasterPtr rst, int band,
unsigned short **buffer, int *buf_size);
/**
Creates an RGB pixel array from a Multiband Raster
\param rst pointer to the Raster Object.
\param bandR an arbitrary Sample/Band index assumed to represent the Red Band
(the first sample corresponds to index ZERO).
\param bandG an arbitrary Sample/Band index assumed to represent the Green Band.
\param bandB an arbitrary Sample/Band index assumed to represent the Blue Band.
\param buffer on completion will point to the created pixel array.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the pixel array.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_data_to_uint8, rl2_raster_band_to_uint8,
\note the arrays returned by this function corresponds to dynamic memory;
you are responsible for properly freeing such dynamic allocation in
the most appropriate way.
\note pixels into the returned array will be tightly packed and will be
organized by increasing rows and columns; the first pixel will correspond
to Row=0,Column=0, the second pixel to Row=0,Column=1 and so on.
Pixel components are always organized as RGBRGBRGB....RGB
*/
RL2_DECLARE int
rl2_raster_bands_to_RGB (rl2RasterPtr rst, int bandR, int bandG,
int bandB, unsigned char **buffer,
int *buf_size);
/**
Exports a Raster object as an in-memory stored GIF image
\param rst pointer to the Raster Object.
\param buffer on completion will point to the memory block storing the created GIF image.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the GIF image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_from_gif
*/
RL2_DECLARE int
rl2_raster_to_gif (rl2RasterPtr rst, unsigned char **gif,
int *gif_size);
/**
Allocates and initializes a new Raster object from an in-memory stored GIF image
\param gif pointer to the memory block storing the input GIF image.
\param gif_size size (in bytes) of the GIF image.
\return the pointer to newly created Raster Object: NULL on failure.
\sa rl2_destroy_raster, rl2_create_raster, rl2_raster_to_gif
\note you are responsible to destroy (before or after) any allocated
Raster object.
*/
RL2_DECLARE rl2RasterPtr rl2_raster_from_gif (const unsigned char *gif,
int gif_size);
/**
Exports a Raster object as an in-memory stored PNG image
\param rst pointer to the Raster Object.
\param buffer on completion will point to the memory block storing the created PNG image.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the PNG image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_from_png
*/
RL2_DECLARE int
rl2_raster_to_png (rl2RasterPtr rst, unsigned char **png,
int *png_size);
/**
Allocates and initializes a new Raster object from an in-memory stored PNG image
\param png pointer to the memory block storing the input PNG image.
\param png_size size (in bytes) of the PNG image.
\param alpha_mask set to TRUE if an eventual ALPHA mask should be
carefully preserved; otherwise a transparency mask will be assumed.
\return the pointer to newly created Raster Object: NULL on failure.
\sa rl2_destroy_raster, rl2_create_raster, rl2_raster_to_png
\note you are responsible to destroy (before or after) any allocated
Raster object.
*/
RL2_DECLARE rl2RasterPtr rl2_raster_from_png (const unsigned char *png,
int png_size, int alpha_mask);
/**
Exports a Raster object as an in-memory stored JPEG image
\param rst pointer to the Raster Object.
\param buffer on completion will point to the memory block storing the created JPEG image.
\param buf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the JPEG image.
\param quality compression quality factor (0-100)
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_from_jpeg
*/
RL2_DECLARE int
rl2_raster_to_jpeg (rl2RasterPtr rst, unsigned char **jpeg,
int *jpeg_size, int quality);
/**
Allocates and initializes a new Raster object from an in-memory stored JPEG image
\param jpeg pointer to the memory block storing the input JPEG image.
\param jpeg_size size (in bytes) of the JPEG image.
\return the pointer to newly created Raster Object: NULL on failure.
\sa rl2_destroy_raster, rl2_create_raster, rl2_raster_to_jpeg
\note you are responsible to destroy (before or after) any allocated
Raster object.
*/
RL2_DECLARE rl2RasterPtr
rl2_raster_from_jpeg (const unsigned char *jpeg, int jpeg_size);
/**
Exports a Raster object as an in-memory stored WEBP image (lossy compressed)
\param rst pointer to the Raster Object.
\param webp on completion will point to the memory block storing the created WEBP image.
\param webp_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the WEBP image.
\param quality compression quality factor (0-100)
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_from_webp, rl2_raster_to_lossless_webp
*/
RL2_DECLARE int
rl2_raster_to_lossy_webp (rl2RasterPtr rst, unsigned char **webp,
int *webp_size, int quality);
/**
Exports a Raster object as an in-memory stored WEBP image (lossless compressed)
\param rst pointer to the Raster Object.
\param webp on completion will point to the memory block storing the created WEBP image.
\param webp_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the WEBP image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_from_webp, rl2_raster_to_lossy_webp
*/
RL2_DECLARE int
rl2_raster_to_lossless_webp (rl2RasterPtr rst, unsigned char **webp,
int *webp_size);
/**
Allocates and initializes a new Raster object from an in-memory stored WEBP image
\param webp pointer to the memory block storing the input WEBP image.
\param webp_size size (in bytes) of the WEBP image.
\return the pointer to newly created Raster Object: NULL on failure.
\sa rl2_destroy_raster, rl2_create_raster, rl2_raster_to_lossy_webp,
rl2_raster_to_lossless_webp
\note you are responsible to destroy (before or after) any allocated
Raster object.
*/
RL2_DECLARE rl2RasterPtr
rl2_raster_from_webp (const unsigned char *webp, int webp_size);
/**
Exports a Raster object as an in-memory stored Jpeg2000 image (lossy compressed)
\param rst pointer to the Raster Object.
\param jpeg2000 on completion will point to the memory block storing the created
Jpeg2000 image.
\param jpeg2000_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the Jpeg2000 image.
\param quality compression quality factor (0-100)
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_from_jpeg2000, rl2_raster_to_lossless_jpeg2000
*/
RL2_DECLARE int
rl2_raster_to_lossy_jpeg2000 (rl2RasterPtr rst,
unsigned char **jpeg2000,
int *jpeg2000_size, int quality);
/**
Exports a Raster object as an in-memory stored Jpeg2000 image (lossless compressed)
\param rst pointer to the Raster Object.
\param jpeg2000 on completion will point to the memory block storing the created
Jpeg2000 image.
\param jpeg2000_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the WEBP image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_create_raster, rl2_raster_from_jpeg2000, rl2_raster_to_lossy_jpeg2000
*/
RL2_DECLARE int
rl2_raster_to_lossless_jpeg2000 (rl2RasterPtr rst,
unsigned char **jpeg2000,
int *jpeg20000_size);
/**
Allocates and initializes a new Raster object from an in-memory stored
Jpeg2000 image
\param jpeg2000 pointer to the memory block storing the input Jpeg2000 image.
\param jpeg2000_size size (in bytes) of the Jpeg2000 image.
\param sample_type one of RL2_SAMPLE_UINT8 or RL2_SAMPLE_INT16.
\param pixel_type one of RL2_PIXEL_GRAYSCALE, RL2_PIXEL_RGB,
RL2_PIXEL_MULTIBAND, RL2_PIXEL_DATAGRID.
\param num_samples number of samples per pixel (aka Bands).
\return the pointer to newly created Raster Object: NULL on failure.
\sa rl2_destroy_raster, rl2_create_raster, rl2_raster_to_lossy_jpeg2000,
rl2_raster_to_lossless_jpeg2000
\note you are responsible to destroy (before or after) any allocated
Raster object.
*/
RL2_DECLARE rl2RasterPtr
rl2_raster_from_jpeg2000 (const unsigned char *jpeg2000,
int jpeg2000_size, unsigned char sample_type,
unsigned char pixel_type,
unsigned char num_samples);
/**
Allocates and initializes a new Raster object from an in-memory stored TIFF image
\param webp pointer to the memory block storing the input TIFF image.
\param webp_size size (in bytes) of the WEBP image.
\return the pointer to newly created Raster Object: NULL on failure.
\sa rl2_destroy_raster, rl2_create_raster
\note you are responsible to destroy (before or after) any allocated
Raster object. Not all TIFF images are supported, but only the ones
actually corresponding to a visible image (RGB, Grayscale, Palette
and Monochrome).
*/
RL2_DECLARE rl2RasterPtr
rl2_raster_from_tiff (const unsigned char *tiff, int tiff_size);
RL2_DECLARE rl2PalettePtr rl2_get_raster_palette (rl2RasterPtr raster);
RL2_DECLARE rl2PalettePtr rl2_clone_palette (rl2PalettePtr palette);
RL2_DECLARE rl2CoveragePtr
rl2_create_coverage_from_dbms (sqlite3 * handle, const char *coverage);
RL2_DECLARE rl2VectorLayerPtr
rl2_create_vector_layer_from_dbms (sqlite3 * handle,
const char *coverage);
RL2_DECLARE int
rl2_find_matching_resolution (sqlite3 * handle, rl2CoveragePtr cvg,
int by_section, sqlite3_int64 section_id,
double *x_res, double *y_res,
unsigned char *level,
unsigned char *scale);
RL2_DECLARE int rl2_load_raw_raster_into_dbms (sqlite3 * sqlite,
int max_threads,
rl2CoveragePtr cvg,
const char *sctn_name,
rl2RasterPtr rst,
int pyramidize);
RL2_DECLARE int
rl2_get_raw_raster_data (sqlite3 * handle, int max_threads,
rl2CoveragePtr cvg, unsigned int width,
unsigned int height, double minx, double miny,
double maxx, double maxy, double x_res,
double y_res, unsigned char **buffer,
int *buf_size, rl2PalettePtr * palette,
unsigned char out_pixel);
RL2_DECLARE int
rl2_get_section_raw_raster_data (sqlite3 * handle, int max_threads,
rl2CoveragePtr cvg,
sqlite3_int64 section_id,
unsigned int width,
unsigned int height, double minx,
double miny, double maxx, double maxy,
double x_res, double y_res,
unsigned char **buffer, int *buf_size,
rl2PalettePtr * palette,
unsigned char out_pixel);
RL2_DECLARE int
rl2_get_triple_band_raw_raster_data (sqlite3 * handle,
rl2CoveragePtr cvg,
unsigned int width,
unsigned int height,
double minx, double miny,
double maxx, double maxy,
double x_res, double y_res,
unsigned char red_band,
unsigned char green_band,
unsigned char blue_band,
unsigned char **buffer,
int *buf_size,
rl2PixelPtr no_data);
RL2_DECLARE int
rl2_get_section_triple_band_raw_raster_data (sqlite3 * handle,
rl2CoveragePtr cvg,
sqlite3_int64 section_id,
unsigned int width,
unsigned int height,
double minx, double miny,
double maxx, double maxy,
double x_res, double y_res,
unsigned char red_band,
unsigned char green_band,
unsigned char blue_band,
unsigned char **buffer,
int *buf_size,
rl2PixelPtr no_data);
RL2_DECLARE int
rl2_get_mono_band_raw_raster_data (sqlite3 * handle,
rl2CoveragePtr cvg,
unsigned int width,
unsigned int height,
double minx, double miny,
double maxx, double maxy,
double x_res, double y_res,
unsigned char mono_band,
unsigned char **buffer,
int *buf_size, rl2PixelPtr no_data);
RL2_DECLARE int
rl2_get_section_mono_band_raw_raster_data (sqlite3 * handle,
rl2CoveragePtr cvg,
sqlite3_int64 section_id,
unsigned int width,
unsigned int height,
double minx, double miny,
double maxx, double maxy,
double x_res, double y_res,
unsigned char mono_band,
unsigned char **buffer,
int *buf_size,
rl2PixelPtr no_data);
RL2_DECLARE int
rl2_get_raw_raster_data_bgcolor (sqlite3 * handle, int max_threads,
rl2CoveragePtr cvg, unsigned int width,
unsigned int height, double minx,
double miny, double maxx, double maxy,
double x_res, double y_res,
unsigned char **buffer, int *buf_size,
rl2PalettePtr * palette,
unsigned char *out_pixel,
unsigned char bg_red,
unsigned char bg_green,
unsigned char bg_blue,
rl2RasterSymbolizerPtr style,
rl2RasterStatisticsPtr stats);
RL2_DECLARE int
rl2_get_raw_raster_data_mixed_resolutions (sqlite3 * handle,
int max_threads,
rl2CoveragePtr cvg,
unsigned int width,
unsigned int height,
double minx, double miny,
double maxx, double maxy,
double x_res, double y_res,
unsigned char **buffer,
int *buf_size,
rl2PalettePtr * palette,
unsigned char *out_pixel,
unsigned char bg_red,
unsigned char bg_green,
unsigned char bg_blue,
rl2RasterSymbolizerPtr style,
rl2RasterStatisticsPtr
stats);
RL2_DECLARE int
rl2_create_dbms_coverage (sqlite3 * handle, const char *coverage,
unsigned char sample, unsigned char pixel,
unsigned char num_bands,
unsigned char compression, int quality,
unsigned int tile_width,
unsigned int tile_height, int srid,
double x_res, double y_res,
rl2PixelPtr no_data, rl2PalettePtr palette,
int strict_resolution, int mixed_resolutions,
int section_paths, int section_md5,
int section_summary);
RL2_DECLARE int
rl2_set_dbms_coverage_default_bands (sqlite3 * handle,
const char *coverage,
unsigned char red_band,
unsigned char green_band,
unsigned char blue_band,
unsigned char nir_band);
RL2_DECLARE int
rl2_get_dbms_coverage_default_bands (sqlite3 * handle,
const char *coverage,
unsigned char *red_band,
unsigned char *green_band,
unsigned char *blue_band,
unsigned char *nir_band);
RL2_DECLARE int
rl2_enable_dbms_coverage_auto_ndvi (sqlite3 * handle,
const char *coverage, int on_off);
RL2_DECLARE int
rl2_is_dbms_coverage_auto_ndvi_enabled (sqlite3 * handle,
const char *coverage);
RL2_DECLARE int
rl2_delete_dbms_section (sqlite3 * handle, const char *coverage,
sqlite3_int64 section_id);
RL2_DECLARE int
rl2_get_dbms_section_id (sqlite3 * handle, const char *coverage,
const char *section,
sqlite3_int64 * section_id, int *duplicate);
RL2_DECLARE int
rl2_resolve_full_section_from_dbms (sqlite3 * handle,
const char *coverage,
sqlite3_int64 section_id,
double x_res, double y_res,
double *minx, double *miny,
double *maxx, double *maxy,
unsigned int *width,
unsigned int *height);
RL2_DECLARE int
rl2_resolve_base_resolution_from_dbms (sqlite3 * handle,
const char *coverage,
int by_section,
sqlite3_int64
section_id,
double *x_res, double *y_res);
RL2_DECLARE int
rl2_drop_dbms_coverage (sqlite3 * handle, const char *coverage);
RL2_DECLARE int
rl2_update_dbms_coverage (sqlite3 * handle, const char *coverage);
RL2_DECLARE int
rl2_serialize_dbms_palette (rl2PalettePtr palette, unsigned char **blob,
int *blob_size);
RL2_DECLARE int
rl2_is_valid_dbms_palette (const unsigned char *blob, int blob_size,
unsigned char sample_type);
RL2_DECLARE rl2PalettePtr
rl2_deserialize_dbms_palette (const unsigned char *blob, int blob_size);
RL2_DECLARE rl2PalettePtr
rl2_get_dbms_palette (sqlite3 * handle, const char *coverage);
RL2_DECLARE int
rl2_update_dbms_palette (sqlite3 * handle, const char *coverage,
rl2PalettePtr palette);
RL2_DECLARE int
rl2_compare_palettes (rl2PalettePtr palette_1, rl2PalettePtr palette_2);
RL2_DECLARE int
rl2_check_dbms_palette (sqlite3 * handle, rl2CoveragePtr cvg,
rl2TiffOriginPtr tiff);
RL2_DECLARE int
rl2_serialize_dbms_pixel (rl2PixelPtr pixel, unsigned char **blob,
int *blob_size);
RL2_DECLARE int
rl2_is_valid_dbms_pixel (const unsigned char *blob, int blob_size,
unsigned char sample_type,
unsigned char num_bands);
RL2_DECLARE rl2PixelPtr
rl2_deserialize_dbms_pixel (const unsigned char *blob, int blob_size);
RL2_DECLARE rl2AsciiGridOriginPtr rl2_create_ascii_grid_origin (const char
*path,
int srid,
unsigned
char
sample_type);
RL2_DECLARE void rl2_destroy_ascii_grid_origin (rl2AsciiGridOriginPtr
ascii);
RL2_DECLARE int
rl2_eval_ascii_grid_origin_compatibility (rl2CoveragePtr cvg,
rl2AsciiGridOriginPtr ascii,
int verbose);
RL2_DECLARE const char
*rl2_get_ascii_grid_origin_path (rl2AsciiGridOriginPtr ascii);
RL2_DECLARE int
rl2_get_ascii_grid_origin_size (rl2AsciiGridOriginPtr ascii,
unsigned int *width,
unsigned int *height);
RL2_DECLARE int
rl2_get_ascii_grid_origin_type (rl2AsciiGridOriginPtr ascii,
unsigned char *sample_type,
unsigned char *pixel_type,
unsigned char *num_bands);
RL2_DECLARE int rl2_get_ascii_grid_origin_srid (rl2AsciiGridOriginPtr ascii,
int *srid);
RL2_DECLARE int rl2_get_ascii_grid_origin_resolution (rl2AsciiGridOriginPtr
ascii,
double *res_horz,
double *res_vert);
RL2_DECLARE int
rl2_get_ascii_grid_origin_extent (rl2AsciiGridOriginPtr ascii,
double *minX, double *minY,
double *maxX, double *maxY);
RL2_DECLARE int
rl2_get_ascii_origin_resolution (rl2AsciiGridOriginPtr ascii,
double *hResolution,
double *vResolution);
RL2_DECLARE char *rl2_build_ascii_xml_summary (rl2AsciiGridOriginPtr ascii);
RL2_DECLARE rl2RasterPtr
rl2_get_tile_from_ascii_grid_origin (rl2CoveragePtr cvg,
rl2AsciiGridOriginPtr ascii,
unsigned int startRow,
unsigned int startCol,
int verbose);
RL2_DECLARE rl2AsciiGridDestinationPtr
rl2_create_ascii_grid_destination (const char *path,
unsigned int width,
unsigned int height,
double resolution, double x,
double y, int is_centered,
double no_data, int decimal_digits,
void *pixels, int pixels_size,
unsigned char sample_type);
RL2_DECLARE void
rl2_destroy_ascii_grid_destination (rl2AsciiGridDestinationPtr ascii);
RL2_DECLARE const char
*rl2_get_ascii_grid_destination_path (rl2AsciiGridDestinationPtr ascii);
RL2_DECLARE int
rl2_get_ascii_grid_destination_size (rl2AsciiGridDestinationPtr ascii,
unsigned int *width,
unsigned int *height);
RL2_DECLARE int
rl2_get_ascii_grid_destination_type (rl2AsciiGridDestinationPtr ascii,
unsigned char *sample_type,
unsigned char *pixel_type,
unsigned char *num_bands);
RL2_DECLARE int
rl2_get_ascii_grid_destination_tiepoint (rl2AsciiGridDestinationPtr
ascii, double *X, double *Y);
RL2_DECLARE int
rl2_get_ascii_grid_destination_resolution (rl2AsciiGridDestinationPtr
ascii, double *resolution);
RL2_DECLARE int
rl2_write_ascii_grid_header (rl2AsciiGridDestinationPtr ascii);
RL2_DECLARE int
rl2_write_ascii_grid_scanline (rl2AsciiGridDestinationPtr ascii,
unsigned int *line_no);
RL2_DECLARE rl2RasterPtr
rl2_get_tile_from_jpeg_origin (rl2CoveragePtr cvg, rl2RasterPtr rst,
unsigned int startRow,
unsigned int startCol,
unsigned char forced_conversion,
int verbose);
RL2_DECLARE char *rl2_build_jpeg_xml_summary (unsigned int width,
unsigned int height,
unsigned char pixel_type,
int is_georeferenced,
double res_x, double res_y,
double minx, double miny,
double maxx, double maxy);
RL2_DECLARE rl2RasterPtr
rl2_get_tile_from_jpeg2000_origin (rl2CoveragePtr cvg, rl2RasterPtr rst,
unsigned int startRow,
unsigned int startCol,
unsigned char forced_conversion,
int verbose);
RL2_DECLARE char *rl2_build_jpeg2000_xml_summary (unsigned int width,
unsigned int height,
unsigned char sample_type,
unsigned char pixel_type,
unsigned char num_bands,
int is_georeferenced,
double res_x,
double res_y, double minx,
double miny, double maxx,
double maxy,
unsigned int tile_width,
unsigned int tile_height);
RL2_DECLARE int
rl2_load_raster_into_dbms (sqlite3 * handle, int max_threads,
const char *src_path,
rl2CoveragePtr coverage, int worldfile,
int force_srid, int pyramidize, int verbose);
RL2_DECLARE int
rl2_load_mrasters_into_dbms (sqlite3 * handle, int max_threads,
const char *dir_path, const char *file_ext,
rl2CoveragePtr coverage, int worldfile,
int force_srid, int pyramidize,
int verbose);
RL2_DECLARE int
rl2_export_geotiff_from_dbms (sqlite3 * handle, int max_threads,
const char *dst_path,
rl2CoveragePtr coverage, double x_res,
double y_res, double minx, double miny,
double maxx, double maxy,
unsigned int width, unsigned int height,
unsigned char compression,
unsigned int tile_sz, int with_worldfile);
RL2_DECLARE int
rl2_export_section_geotiff_from_dbms (sqlite3 * handle, int max_threads,
const char *dst_path,
rl2CoveragePtr coverage,
sqlite3_int64 section_id,
double x_res, double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height,
unsigned char compression,
unsigned int tile_sz,
int with_worldfile);
RL2_DECLARE int
rl2_export_tiff_worldfile_from_dbms (sqlite3 * handle, int max_threads,
const char *dst_path,
rl2CoveragePtr coverage,
double x_res, double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height,
unsigned char compression,
unsigned int tile_sz);
RL2_DECLARE int
rl2_export_tiff_from_dbms (sqlite3 * handle, int max_threads,
const char *dst_path,
rl2CoveragePtr coverage, double x_res,
double y_res, double minx, double miny,
double maxx, double maxy, unsigned int width,
unsigned int height,
unsigned char compression,
unsigned int tile_sz);
RL2_DECLARE int
rl2_export_section_tiff_worldfile_from_dbms (sqlite3 * handle,
int max_threads,
const char *dst_path,
rl2CoveragePtr coverage,
sqlite3_int64 section_id,
double x_res, double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height,
unsigned char compression,
unsigned int tile_sz);
RL2_DECLARE int
rl2_export_section_tiff_from_dbms (sqlite3 * handle, int max_threads,
const char *dst_path,
rl2CoveragePtr coverage,
sqlite3_int64 section_id,
double x_res, double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height,
unsigned char compression,
unsigned int tile_sz);
RL2_DECLARE int
rl2_export_triple_band_geotiff_from_dbms (sqlite3 * handle,
const char *dst_path,
rl2CoveragePtr coverage,
double x_res, double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height,
unsigned char red_band,
unsigned char green_band,
unsigned char blue_band,
unsigned char compression,
unsigned int tile_sz,
int with_worldfile);
RL2_DECLARE int
rl2_export_section_triple_band_geotiff_from_dbms (sqlite3 * handle,
const char *dst_path,
rl2CoveragePtr
coverage,
sqlite3_int64
section_id,
double x_res,
double y_res,
double minx,
double miny,
double maxx,
double maxy,
unsigned int width,
unsigned int height,
unsigned char
red_band,
unsigned char
green_band,
unsigned char
blue_band,
unsigned char
compression,
unsigned int tile_sz,
int with_worldfile);
RL2_DECLARE int
rl2_export_mono_band_geotiff_from_dbms (sqlite3 * handle,
const char *dst_path,
rl2CoveragePtr coverage,
double x_res, double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height,
unsigned char mono_band,
unsigned char compression,
unsigned int tile_sz,
int with_worldfile);
RL2_DECLARE int
rl2_export_section_mono_band_geotiff_from_dbms (sqlite3 * handle,
const char *dst_path,
rl2CoveragePtr coverage,
sqlite3_int64
section_id,
double x_res,
double y_res,
double minx,
double miny,
double maxx,
double maxy,
unsigned int width,
unsigned int height,
unsigned char mono_band,
unsigned char
compression,
unsigned int tile_sz,
int with_worldfile);
RL2_DECLARE int
rl2_export_triple_band_tiff_worldfile_from_dbms (sqlite3 * handle,
const char *dst_path,
rl2CoveragePtr
coverage, double x_res,
double y_res,
double minx,
double miny,
double maxx,
double maxy,
unsigned int width,
unsigned int height,
unsigned char red_band,
unsigned char
green_band,
unsigned char
blue_band,
unsigned char
compression,
unsigned int tile_sz);
RL2_DECLARE int
rl2_export_section_triple_band_tiff_worldfile_from_dbms (sqlite3 *
handle,
const char
*dst_path,
rl2CoveragePtr
coverage,
sqlite3_int64
section_id,
double x_res,
double y_res,
double minx,
double miny,
double maxx,
double maxy,
unsigned int
width,
unsigned int
height,
unsigned char
red_band,
unsigned char
green_band,
unsigned char
blue_band,
unsigned char
compression,
unsigned int
tile_sz);
RL2_DECLARE int
rl2_export_mono_band_tiff_worldfile_from_dbms (sqlite3 * handle,
const char *dst_path,
rl2CoveragePtr coverage,
double x_res,
double y_res,
double minx,
double miny,
double maxx,
double maxy,
unsigned int width,
unsigned int
height,
unsigned char
mono_band,
unsigned char
compression,
unsigned int tile_sz);
RL2_DECLARE int
rl2_export_section_mono_band_tiff_worldfile_from_dbms (sqlite3 * handle,
const char
*dst_path,
rl2CoveragePtr
coverage,
sqlite3_int64
section_id,
double x_res,
double y_res,
double minx,
double miny,
double maxx,
double maxy,
unsigned int
width,
unsigned int
height,
unsigned char
mono_band,
unsigned char
compression,
unsigned int
tile_sz);
RL2_DECLARE int
rl2_export_triple_band_tiff_from_dbms (sqlite3 * handle,
const char *dst_path,
rl2CoveragePtr coverage,
double x_res, double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height,
unsigned char red_band,
unsigned char green_band,
unsigned char blue_band,
unsigned char compression,
unsigned int tile_sz);
RL2_DECLARE int
rl2_export_section_triple_band_tiff_from_dbms (sqlite3 * handle,
const char *dst_path,
rl2CoveragePtr coverage,
sqlite3_int64 section_id,
double x_res,
double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height,
unsigned char red_band,
unsigned char green_band,
unsigned char blue_band,
unsigned char
compression,
unsigned int tile_sz);
RL2_DECLARE int
rl2_export_mono_band_tiff_from_dbms (sqlite3 * handle,
const char *dst_path,
rl2CoveragePtr coverage,
double x_res, double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height,
unsigned char mono_band,
unsigned char compression,
unsigned int tile_sz);
RL2_DECLARE int
rl2_export_section_mono_band_tiff_from_dbms (sqlite3 * handle,
const char *dst_path,
rl2CoveragePtr coverage,
sqlite3_int64 section_id,
double x_res, double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height,
unsigned char mono_band,
unsigned char compression,
unsigned int tile_sz);
RL2_DECLARE int
rl2_export_ascii_grid_from_dbms (sqlite3 * handle, int max_threads,
const char *dst_path,
rl2CoveragePtr coverage, double res,
double minx, double miny, double maxx,
double maxy, unsigned int width,
unsigned int height, int is_centered,
int decimal_digits);
RL2_DECLARE int
rl2_export_section_ascii_grid_from_dbms (sqlite3 * handle,
int max_threads,
const char *dst_path,
rl2CoveragePtr coverage,
sqlite3_int64 section_id,
double res, double minx,
double miny, double maxx,
double maxy,
unsigned int width,
unsigned int height,
int is_centered,
int decimal_digits);
RL2_DECLARE int
rl2_export_ndvi_ascii_grid_from_dbms (sqlite3 * handle, int max_threads,
const char *dst_path,
rl2CoveragePtr coverage,
double res, double minx,
double miny, double maxx,
double maxy, unsigned int width,
unsigned int height, int red_band,
int nir_band, int is_centered,
int decimal_digits);
RL2_DECLARE int
rl2_export_section_ndvi_ascii_grid_from_dbms (sqlite3 * handle,
int max_threads,
const char *dst_path,
rl2CoveragePtr coverage,
sqlite3_int64 section_id,
double res, double minx,
double miny, double maxx,
double maxy,
unsigned int width,
unsigned int height,
int red_band,
int nir_band,
int is_centered,
int decimal_digits);
RL2_DECLARE int
rl2_export_jpeg_from_dbms (sqlite3 * handle, int max_threads,
const char *dst_path,
rl2CoveragePtr coverage, double x_res,
double y_res, double minx, double miny,
double maxx, double maxy, unsigned int width,
unsigned int height, int quality,
int with_worldfile);
RL2_DECLARE int
rl2_export_section_jpeg_from_dbms (sqlite3 * handle, int max_threads,
const char *dst_path,
rl2CoveragePtr coverage,
sqlite3_int64 section_id,
double x_res, double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height, int quality,
int with_worldfile);
RL2_DECLARE int
rl2_export_raw_pixels_from_dbms (sqlite3 * handle, int max_threads,
rl2CoveragePtr coverage, double x_res,
double y_res, double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height, int big_endian,
unsigned char **blob, int *blob_size);
RL2_DECLARE int
rl2_export_section_raw_pixels_from_dbms (sqlite3 * handle,
int max_threads,
rl2CoveragePtr coverage,
sqlite3_int64 section_id,
double x_res, double y_res,
double minx, double miny,
double maxx, double maxy,
unsigned int width,
unsigned int height,
int big_endian,
unsigned char **blob,
int *blob_size);
RL2_DECLARE int
rl2_build_section_pyramid (sqlite3 * handle, int max_threads,
const char *coverage,
sqlite3_int64 section_id, int forced_rebuild,
int verbose);
RL2_DECLARE int
rl2_build_monolithic_pyramid (sqlite3 * handle, const char *coverage,
int virtual_levels, int verbose);
RL2_DECLARE int
rl2_build_all_section_pyramids (sqlite3 * handle, int max_threads,
const char *coverage,
int forced_rebuild, int verbose);
RL2_DECLARE int
rl2_delete_section_pyramid (sqlite3 * handle, const char *coverage,
sqlite3_int64 section_id);
RL2_DECLARE int
rl2_delete_all_pyramids (sqlite3 * handle, const char *coverage);
/**
Exports an RGB buffer as an in-memory stored PNG image
\param width the PNG image width.
\param height the PNG image height.
\param rgb pointer to the RGB buffer.
\param png on completion will point to the memory block storing the created PNG image.
\param png_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the PNG image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_rgb_alpha_to_png, rl2_rgb_to_jpeg, rl2_rgb_to_tiff,
rl2_rgb_to_geotiff, rl2_rgba_to_pdf
*/
RL2_DECLARE int
rl2_rgb_to_png (unsigned int width, unsigned int height,
const unsigned char *rgb, unsigned char **png,
int *png_size);
/**
Exports two separate RGB + Alpha buffers as an in-memory stored PNG image
\param width the PNG image width.
\param height the PNG image height.
\param rgb pointer to the RGB buffer.
\param mask pointer to the transparency mask.
\param png on completion will point to the memory block storing the created PNG image.
\param png_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the PNG image.
\param opacity standard opacity level (0.0 to 1.0)
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_rgb_to_png, rl2_rgb_to_jpeg, rl2_rgb_to_tiff, rl2_rgb_to_geotiff
*/
RL2_DECLARE int
rl2_rgb_alpha_to_png (unsigned int width, unsigned int height,
const unsigned char *rgb,
const unsigned char *mask, unsigned char **png,
int *png_size, double opacity);
/**
Exports two separate RGB + Alpha buffers as an in-memory stored PNG image
\param width the PNG image width.
\param height the PNG image height.
\param rgb pointer to the RGB buffer.
\param alpha pointer to the Alpha channel buffer.
\param png on completion will point to the memory block storing the created PNG image.
\param png_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the PNG image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_rgb_to_png, rl2_rgb_to_jpeg, rl2_rgb_to_tiff, rl2_rgb_to_geotiff
*/
RL2_DECLARE int
rl2_rgb_real_alpha_to_png (unsigned int width, unsigned int height,
const unsigned char *rgb,
const unsigned char *alpha,
unsigned char **png, int *png_size);
/**
Exports an RGB buffer as an in-memory stored JPEG image
\param width the JPEG image width.
\param height the JPEG image height.
\param rgb pointer to the RGB buffer.
\param quality compression quality factor (0-100)
\param jpeg on completion will point to the memory block storing the created JPEG image.
\param jpeg_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the JPEG image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_rgb_to_png, rl2_rgb_alpha_to_png, rl2_rgb_to_tiff,
rl2_rgb_to_geotiff, rl2_rgba_to_pdf
*/
RL2_DECLARE int
rl2_rgb_to_jpeg (unsigned int width, unsigned int height,
const unsigned char *rgb, int quality,
unsigned char **jpeg, int *jpeg_size);
/**
Exports an RGB buffer as an in-memory stored TIFF image
\param width the TIFF image width.
\param height the TIFF image height.
\param rgb pointer to the RGB buffer.
\param tiff on completion will point to the memory block storing the created TIFF image.
\param tiff_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the TIFF image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_rgb_to_png, rl2_rgb_alpha_to_png, rl2_rgb_to_jpeg,
rl2_rgb_to_geotiff, rl2_rgba_to_pdf
*/
RL2_DECLARE int
rl2_rgb_to_tiff (unsigned int width, unsigned int height,
const unsigned char *rgb, unsigned char **tiff,
int *tiff_size);
/**
Exports an RGB buffer as an in-memory stored GeoTIFF image
\param width the GeoTIFF image width.
\param height the GeoTIFF image height.
\param minx minimum X coordinate (BBOX - georeferencing).
\param miny minimum Y coordinate (BBOX - georeferencing).
\param maxx maximum X coordinate (BBOX - georeferencing).
\param maxx maximum Y coordinate (BBOX - georeferencing).
\param srid SRID code.
\param rgb pointer to the RGB buffer.
\param geotiff on completion will point to the memory block storing the created GeoTIFF image.
\param geotiff_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the GeoTIFF image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_rgb_to_png, rl2_rgb_alpha_to_png, rl2_rgb_to_jpeg,
rl2_rgb_to_tiff, rl2_rgba_to_pdf
*/
RL2_DECLARE int
rl2_rgb_to_geotiff (unsigned int width, unsigned int height,
sqlite3 * handle, double minx, double miny,
double maxx, double maxy, int srid,
const unsigned char *rgb, unsigned char **geotiff,
int *geotiff_size);
/**
Exports a Grayscale buffer as an in-memory stored PNG image
\param width the PNG image width.
\param height the PNG image height.
\param gray pointer to the Grayscale buffer.
\param png on completion will point to the memory block storing the created PNG image.
\param png_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the PNG image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_gray_alpha_to_png, rl2_gray_to_jpeg, rl2_gray_to_tiff,
rl2_gray_to_geotiff, rl2_rgba_to_pdf
*/
RL2_DECLARE int
rl2_gray_to_png (unsigned int width, unsigned int height,
const unsigned char *gray, unsigned char **png,
int *png_size);
/**
Exports two separate Grayscale + Alpha buffers as an in-memory stored PNG image
\param width the PNG image width.
\param height the PNG image height.
\param gray pointer to the Grayscale buffer.
\param alpha pointer to the Alpha channel buffer.
\param png on completion will point to the memory block storing the created PNG image.
\param png_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the PNG image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_gray_to_png, rl2_gray_to_jpeg, rl2_gray_to_tiff
rl2_gray_to_geotiff, rl2_rgba_to_pdf
*/
RL2_DECLARE int
rl2_gray_alpha_to_png (unsigned int width, unsigned int height,
const unsigned char *gray,
const unsigned char *alpha, unsigned char **png,
int *png_size, double opacity);
/**
Exports a Grayscale buffer as an in-memory stored JPEG image
\param width the JPEG image width.
\param height the JPEG image height.
\param gray pointer to the Grayscale buffer.
\param quality compression quality factor (0-100)
\param jpeg on completion will point to the memory block storing the created JPEG image.
\param jpeg_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the JPEG image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_gray_to_png, rl2_gray_alpha_to_png, rl2_gray_to_tiff
rl2_gray_to_geotiff, rl2_rgba_to_pdf
*/
RL2_DECLARE int
rl2_gray_to_jpeg (unsigned int width, unsigned int height,
const unsigned char *gray, int quality,
unsigned char **jpeg, int *jpeg_size);
/**
Exports a Grayscale buffer as an in-memory stored TIFF image
\param width the TIFF image width.
\param height the TIFF image height.
\param gray pointer to the Grayscale buffer.
\param tiff on completion will point to the memory block storing the created TIFF image.
\param tiff_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the TIFF image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_gray_to_png, rl2_gray_alpha_to_png, rl2_gray_to_jpeg,
rl2_gray_to_geotiff, rl2_rgba_to_pdf
*/
RL2_DECLARE int
rl2_gray_to_tiff (unsigned int width, unsigned int height,
const unsigned char *gray, unsigned char **tiff,
int *tiff_size);
/**
Exports a Grayscale buffer as an in-memory stored GeoTIFF image
\param width the GeoTIFF image width.
\param height the GeoTIFF image height.
\param minx minimum X coordinate (BBOX - georeferencing).
\param miny minimum Y coordinate (BBOX - georeferencing).
\param maxx maximum X coordinate (BBOX - georeferencing).
\param maxx maximum Y coordinate (BBOX - georeferencing).
\param srid SRID code.
\param gray pointer to the Grayscale buffer.
\param geotiff on completion will point to the memory block storing the created GeoTIFF image.
\param geotiff_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the GeoTIFF image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_gray_to_png, rl2_gray_alpha_to_png, rl2_gray_to_jpeg,
rl2_gray_to_tiff, rl2_rgba_to_pdf
*/
RL2_DECLARE int
rl2_gray_to_geotiff (unsigned int width, unsigned int height,
sqlite3 * handle, double minx, double miny,
double maxx, double maxy, int srid,
const unsigned char *gray, unsigned char **geotiff,
int *geotiff_size);
/**
Exports an RGBA buffer as an in-memory stored PDF document
\param width the PDF image width.
\param height the PDF image height.
\param rgba pointer to the RGBA buffer.
\param pdf on completion will point to the memory block storing the created PDF image.
\param pdf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the TIFF image.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_rgb_to_png, rl2_rgb_alpha_to_png, rl2_rgb_to_jpeg,
rl2_rgb_to_tiff, rl2_rgb_to_geotiff, rl2_gray_to_pdf
\note ownership of the rgba buffer will be definitely acquired by the
internal PDF writer.
*/
RL2_DECLARE int
rl2_rgba_to_pdf (unsigned int width, unsigned int height,
unsigned char *rgba, unsigned char **pdf,
int *pdf_size);
/**
Exports an all-Gray PDF document
\param width the PDF image width.
\param height the PDF image height.
\param pdf on completion will point to the memory block storing the created PDF document.
\param pdf_size on completion the variable referenced by this
pointer will contain the size (in bytes) of the PDF document.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_rl2_rgba_to_pdf
*/
RL2_DECLARE int
rl2_gray_pdf (unsigned int width, unsigned int height,
unsigned char **pdf, int *pdf_size);
/**
Encodes a Font into the corresponding BLOB serialized format
\param font pointer to a memory block containig the Font.
\param font_sz the size (in bytes) of the in-memory Font,
\param blob on completion will point to the created encoded BLOB.
\param blob_sz on completion the variable referenced by this
pointer will contain the size (in bytes) of the BLOB.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_font_decode, rl2_is_valid_encoded_font,
rl2_get_encoded_font_facename, rl2_get_encoded_font_family,
rl2_get_encoded_font_style, rl2_is_encoded_font_bold,
rl2_is_encoded_font_italic
\note you are responsible to destroy (before or after) any allocated
BLOB serialized Font.
*/
RL2_DECLARE int
rl2_font_encode (const unsigned char *font, int font_sz,
unsigned char **blob, int *blob_sz);
/**
Tests a BLOB serialized Font for validity
\param blob pointer to the BLOB serialized Font.
\param blob_sz size (in bytes) of the BLOB.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_font_encode, rl2_font_decode, rl2_get_encoded_font_facename,
rl2_get_encoded_font_family, rl2_get_encoded_font_style,
rl2_is_encoded_font_bold, rl2_is_encoded_font_italic
*/
RL2_DECLARE int
rl2_is_valid_encoded_font (const unsigned char *blob, int blob_sz);
/**
Decodes a Font from the corresponding BLOB serialized format
\param blob pointer to the BLOB serialized Font.
\param blob_sz size (in bytes) of the BLOB.
\param font on completion will point to a memory block containing the
decoded Font.
\param font_sz on completion the variable referenced by this
pointer will contain the size (in bytes) of in-memory Font.
\return RL2_OK on success: RL2_ERROR on failure.
\sa rl2_font_encode, rl2_is_valid_encoded_font,
rl2_get_encoded_font_facename, rl2_get_encoded_font_family,
rl2_get_encoded_font_style, rl2_is_encoded_font_bold,
rl2_is_encoded_font_italic
\note you are responsible to destroy (before or after) the memory
block created by this function and containing the Font.
*/
RL2_DECLARE int
rl2_font_decode (const unsigned char *blob, int blob_sz,
unsigned char **font, int *font_sz);
/**
Returns the Facename from a BLOB serialized Font
\param blob pointer to the BLOB serialized Font.
\param blob_sz size (in bytes) of the BLOB.
\return the Facename; or NULL on invalid args.
\sa rl2_font_encode, rl2_font_decode, rl2_is_valid_encoded_font,
rl2_get_encoded_font_family, rl2_get_encoded_font_style,
rl2_is_encoded_font_bold, rl2_is_encoded_font_italic
\note you are responsible to destroy (before or after) the text
string returned by this function.
*/
RL2_DECLARE char *rl2_get_encoded_font_facename (const unsigned char
*blob, int blob_sz);
/**
Returns the Family name from a BLOB serialized Font
\param blob pointer to the BLOB serialized Font.
\param blob_sz size (in bytes) of the BLOB.
\return the Family name; or NULL on invalid args.
\sa rl2_font_encode, rl2_font_decode, rl2_is_valid_encoded_font,
rl2_get_encode_font_facename, rl2_get_encoded_font_style,
rl2_is_encoded_font_bold, rl2_is_encoded_font_italic
\note you are responsible to destroy (before or after) the text
string returned by this function.
*/
RL2_DECLARE char *rl2_get_encoded_font_family (const unsigned char
*blob, int blob_sz);
/**
Returns the Style name from a BLOB serialized Font
\param blob pointer to the BLOB serialized Font.
\param blob_sz size (in bytes) of the BLOB.
\return the Style name (could be eventually NULL for some valid fonts).
\sa rl2_font_encode, rl2_font_decode, rl2_is_valid_encoded_font,
rl2_get_encoded_font_facename, rl2_get_encoded_font_family,
rl2_is_encoded_font_bold, rl2_is_encoded_font_italic
\note you are responsible to destroy (before or after) the text
string returned by this function.
*/
RL2_DECLARE char *rl2_get_encoded_font_style (const unsigned char
*blob, int blob_sz);
/**
Tests if a BLOB serialized Font is Bold
\param blob pointer to the BLOB serialized Font.
\param blob_sz size (in bytes) of the BLOB.
\return FALSE (0) if the Font isn't Bold, any otherpositive value
if it's Bold. a negative value will be returned on invalid args.
\sa rl2_font_encode, rl2_font_decode, rl2_is_valid_encoded_font,
rl2_get_encoded_font_family, rl2_get_encoded_font_style,
rl2_is_encoded_font_italic
*/
RL2_DECLARE int rl2_is_encoded_font_bold (const unsigned char *blob,
int blob_sz);
/**
Tests if a BLOB serialized Font is Italic
\param blob pointer to the BLOB serialized Font.
\param blob_sz size (in bytes) of the BLOB.
\return FALSE (0) if the Font isn't Italic, any other positive value
if it's Italic. a negative value will be returned on invalid args.
\sa rl2_font_encode, rl2_font_decode, rl2_is_valid_encoded_font,
rl2_get_encoded_font_family, rl2_get_encoded_font_style,
rl2_is_encoded_font_bold
*/
RL2_DECLARE int rl2_is_encoded_font_italic (const unsigned char
*blob, int blob_sz);
RL2_DECLARE int
rl2_parse_hexrgb (const char *hex, unsigned char *red,
unsigned char *green, unsigned char *blue);
RL2_DECLARE rl2CoverageStylePtr
rl2_create_coverage_style_from_dbms (sqlite3 * handle,
const char *coverage,
const char *style);
RL2_DECLARE rl2FeatureTypeStylePtr
rl2_create_feature_type_style_from_dbms (sqlite3 * handle,
const char *coverage,
const char *style);
RL2_DECLARE rl2RasterStatisticsPtr
rl2_create_raster_statistics_from_dbms (sqlite3 * handle,
const char *coverage);
RL2_DECLARE void rl2_destroy_coverage_style (rl2CoverageStylePtr style);
RL2_DECLARE const char *rl2_get_coverage_style_name (rl2CoverageStylePtr
style);
RL2_DECLARE rl2RasterSymbolizerPtr
rl2_get_symbolizer_from_coverage_style (rl2CoverageStylePtr style,
double scale);
RL2_DECLARE const char *rl2_get_rule_like_wild_card (rl2RuleLikeArgsPtr
args);
RL2_DECLARE const char *rl2_get_rule_like_single_char (rl2RuleLikeArgsPtr
args);
RL2_DECLARE const char *rl2_get_rule_like_value (rl2RuleLikeArgsPtr args);
RL2_DECLARE const char *rl2_get_rule_like_escape_char (rl2RuleLikeArgsPtr
args);
RL2_DECLARE const char *rl2_get_rule_between_lower (rl2RuleBetweenArgsPtr
args);
RL2_DECLARE const char *rl2_get_rule_between_upper (rl2RuleBetweenArgsPtr
args);
RL2_DECLARE const char *rl2_get_rule_value (rl2RuleSingleArgPtr arg);
RL2_DECLARE int rl2_get_raster_symbolizer_opacity (rl2RasterSymbolizerPtr
style, double *opacity);
RL2_DECLARE int
rl2_is_raster_symbolizer_mono_band_selected (rl2RasterSymbolizerPtr
style, int *selected,
int *categorize,
int *interpolate);
RL2_DECLARE int
rl2_get_raster_symbolizer_mono_band_selection (rl2RasterSymbolizerPtr
style,
unsigned char
*gray_band);
RL2_DECLARE int
rl2_is_raster_symbolizer_triple_band_selected (rl2RasterSymbolizerPtr
style, int *selected);
RL2_DECLARE int
rl2_get_raster_symbolizer_triple_band_selection (rl2RasterSymbolizerPtr
style,
unsigned char
*red_band,
unsigned char
*green_band,
unsigned char
*blue_band);
RL2_DECLARE int
rl2_get_raster_symbolizer_overall_contrast_enhancement
(rl2RasterSymbolizerPtr style, unsigned char *contrast_enhancement,
double *gamma_value);
RL2_DECLARE int
rl2_get_raster_symbolizer_red_band_contrast_enhancement
(rl2RasterSymbolizerPtr style, unsigned char *contrast_enhancement,
double *gamma_value);
RL2_DECLARE int
rl2_get_raster_symbolizer_green_band_contrast_enhancement
(rl2RasterSymbolizerPtr style, unsigned char *contrast_enhancement,
double *gamma_value);
RL2_DECLARE int
rl2_get_raster_symbolizer_blue_band_contrast_enhancement
(rl2RasterSymbolizerPtr style, unsigned char *contrast_enhancement,
double *gamma_value);
RL2_DECLARE int
rl2_get_raster_symbolizer_gray_band_contrast_enhancement
(rl2RasterSymbolizerPtr style, unsigned char *contrast_enhancement,
double *gamma_value);
RL2_DECLARE int
rl2_has_raster_symbolizer_color_map_interpolated (rl2RasterSymbolizerPtr
style,
int *interpolated);
RL2_DECLARE int
rl2_has_raster_symbolizer_color_map_categorized (rl2RasterSymbolizerPtr
style,
int *categorized);
RL2_DECLARE int
rl2_get_raster_symbolizer_color_map_default (rl2RasterSymbolizerPtr
style, unsigned char *red,
unsigned char *green,
unsigned char *blue);
RL2_DECLARE int
rl2_get_raster_symbolizer_color_map_category_base
(rl2RasterSymbolizerPtr style, unsigned char *red, unsigned char *green,
unsigned char *blue);
RL2_DECLARE int
rl2_get_raster_symbolizer_color_map_count (rl2RasterSymbolizerPtr style,
int *count);
RL2_DECLARE int
rl2_get_raster_symbolizer_color_map_entry (rl2RasterSymbolizerPtr style,
int index, double *value,
unsigned char *red,
unsigned char *green,
unsigned char *blue);
RL2_DECLARE int
rl2_has_raster_symbolizer_shaded_relief (rl2RasterSymbolizerPtr style,
int *shaded_relief);
RL2_DECLARE int
rl2_get_raster_symbolizer_shaded_relief (rl2RasterSymbolizerPtr style,
int *brightness_only,
double *relief_factor);
RL2_DECLARE void rl2_destroy_feature_type_style (rl2FeatureTypeStylePtr
style);
RL2_DECLARE const char
*rl2_get_feature_type_style_name (rl2FeatureTypeStylePtr style);
RL2_DECLARE int
rl2_get_feature_type_style_columns_count (rl2FeatureTypeStylePtr style);
RL2_DECLARE const char
*rl2_get_feature_type_style_column_name (rl2FeatureTypeStylePtr style,
int index);
RL2_DECLARE rl2VariantArrayPtr rl2_create_variant_array (int count);
RL2_DECLARE void rl2_destroy_variant_array (rl2VariantArrayPtr variant);
RL2_DECLARE int rl2_set_variant_int (rl2VariantArrayPtr variant, int index,
const char *name, sqlite3_int64 value);
RL2_DECLARE int rl2_set_variant_double (rl2VariantArrayPtr variant,
int index, const char *name,
double value);
RL2_DECLARE int rl2_set_variant_text (rl2VariantArrayPtr variant, int index,
const char *name, const char *value,
int bytes);
RL2_DECLARE int rl2_set_variant_blob (rl2VariantArrayPtr variant, int index,
const char *name,
const unsigned char *value,
int bytes);
RL2_DECLARE int rl2_set_variant_null (rl2VariantArrayPtr variant, int index,
const char *name);
RL2_DECLARE rl2VectorSymbolizerPtr
rl2_get_symbolizer_from_feature_type_style (rl2FeatureTypeStylePtr
style, double scale,
rl2VariantArrayPtr variant,
int *scale_forbidden);
RL2_DECLARE int
rl2_is_visible_style (rl2FeatureTypeStylePtr style, double scale);
RL2_DECLARE int
rl2_is_valid_vector_symbolizer (rl2VectorSymbolizerPtr symbolizer,
int *valid);
RL2_DECLARE int
rl2_get_vector_symbolizer_count (rl2VectorSymbolizerPtr symbolizer,
int *count);
RL2_DECLARE int
rl2_get_vector_symbolizer_item_type (rl2VectorSymbolizerPtr symbolizer,
int index, int *type);
RL2_DECLARE rl2PointSymbolizerPtr
rl2_get_point_symbolizer (rl2VectorSymbolizerPtr symbolizer, int index);
RL2_DECLARE rl2LineSymbolizerPtr
rl2_get_line_symbolizer (rl2VectorSymbolizerPtr symbolizer, int index);
RL2_DECLARE rl2PolygonSymbolizerPtr
rl2_get_polygon_symbolizer (rl2VectorSymbolizerPtr symbolizer,
int index);
RL2_DECLARE rl2TextSymbolizerPtr
rl2_get_text_symbolizer (rl2VectorSymbolizerPtr symbolizer, int index);
RL2_DECLARE int
rl2_point_symbolizer_get_count (rl2PointSymbolizerPtr symbolizer,
int *count);
RL2_DECLARE int
rl2_point_symbolizer_is_graphic (rl2PointSymbolizerPtr symbolizer,
int index, int *external_graphic);
RL2_DECLARE const char
*rl2_point_symbolizer_get_graphic_href (rl2PointSymbolizerPtr
symbolizer, int index);
RL2_DECLARE int
rl2_point_symbolizer_get_graphic_recode_color
(rl2PointSymbolizerPtr symbolizer, int index, int repl_index,
int *color_index, unsigned char *red, unsigned char *green,
unsigned char *blue);
RL2_DECLARE int
rl2_point_symbolizer_is_mark (rl2PointSymbolizerPtr symbolizer,
int index, int *mark);
RL2_DECLARE int
rl2_point_symbolizer_mark_get_well_known_type (rl2PointSymbolizerPtr
symbolizer, int index,
unsigned char *type);
RL2_DECLARE int
rl2_point_symbolizer_mark_has_stroke (rl2PointSymbolizerPtr symbolizer,
int index, int *stroke);
RL2_DECLARE int
rl2_point_symbolizer_mark_get_stroke_color (rl2PointSymbolizerPtr
symbolizer, int index,
unsigned char *red,
unsigned char *green,
unsigned char *blue);
RL2_DECLARE int
rl2_point_symbolizer_mark_get_stroke_width (rl2PointSymbolizerPtr
symbolizer, int index,
double *width);
RL2_DECLARE int
rl2_point_symbolizer_mark_get_stroke_linejoin (rl2PointSymbolizerPtr
symbolizer, int index,
unsigned char *linejoin);
RL2_DECLARE int
rl2_point_symbolizer_mark_get_stroke_linecap (rl2PointSymbolizerPtr
symbolizer, int index,
unsigned char *linecap);
RL2_DECLARE int
rl2_point_symbolizer_mark_get_stroke_dash_offset (rl2PointSymbolizerPtr
symbolizer, int index,
double *offset);
RL2_DECLARE int
rl2_point_symbolizer_mark_get_stroke_dash_count (rl2PointSymbolizerPtr
symbolizer, int index,
int *count);
RL2_DECLARE int
rl2_point_symbolizer_mark_get_stroke_dash_item (rl2PointSymbolizerPtr
symbolizer, int index,
int item_index,
double *item);
RL2_DECLARE int
rl2_point_symbolizer_mark_has_fill (rl2PointSymbolizerPtr symbolizer,
int index, int *fill);
RL2_DECLARE int
rl2_point_symbolizer_mark_get_fill_color (rl2PointSymbolizerPtr
symbolizer, int index,
unsigned char *red,
unsigned char *green,
unsigned char *blue);
RL2_DECLARE int
rl2_point_symbolizer_get_opacity (rl2PointSymbolizerPtr symbolizer,
double *opacity);
RL2_DECLARE int
rl2_point_symbolizer_get_size (rl2PointSymbolizerPtr symbolizer,
double *size);
RL2_DECLARE int
rl2_point_symbolizer_get_rotation (rl2PointSymbolizerPtr symbolizer,
double *rotation);
RL2_DECLARE int
rl2_point_symbolizer_get_anchor_point (rl2PointSymbolizerPtr symbolizer,
double *x, double *y);
RL2_DECLARE int
rl2_point_symbolizer_get_displacement (rl2PointSymbolizerPtr symbolizer,
double *x, double *y);
RL2_DECLARE int
rl2_line_symbolizer_has_stroke (rl2LineSymbolizerPtr symbolizer,
int *stroke);
RL2_DECLARE int
rl2_line_symbolizer_has_graphic_stroke (rl2LineSymbolizerPtr symbolizer,
int *stroke);
RL2_DECLARE const char
*rl2_line_symbolizer_get_graphic_stroke_href (rl2LineSymbolizerPtr
symbolizer);
RL2_DECLARE int
rl2_line_symbolizer_get_graphic_stroke_recode_count
(rl2LineSymbolizerPtr symbolizer, int *count);
RL2_DECLARE int
rl2_line_symbolizer_get_graphic_stroke_recode_color
(rl2LineSymbolizerPtr symbolizer, int index, int *color_index,
unsigned char *red, unsigned char *green, unsigned char *blue);
RL2_DECLARE int
rl2_line_symbolizer_get_stroke_color (rl2LineSymbolizerPtr symbolizer,
unsigned char *red,
unsigned char *green,
unsigned char *blue);
RL2_DECLARE int
rl2_line_symbolizer_get_stroke_opacity (rl2LineSymbolizerPtr symbolizer,
double *opacity);
RL2_DECLARE int
rl2_line_symbolizer_get_stroke_width (rl2LineSymbolizerPtr symbolizer,
double *width);
RL2_DECLARE int
rl2_line_symbolizer_get_stroke_linejoin (rl2LineSymbolizerPtr
symbolizer,
unsigned char *linejoin);
RL2_DECLARE int
rl2_line_symbolizer_get_stroke_linecap (rl2LineSymbolizerPtr symbolizer,
unsigned char *linecap);
RL2_DECLARE int
rl2_line_symbolizer_get_stroke_dash_offset (rl2LineSymbolizerPtr
symbolizer, double *offset);
RL2_DECLARE int
rl2_line_symbolizer_get_stroke_dash_count (rl2LineSymbolizerPtr
symbolizer, int *count);
RL2_DECLARE int
rl2_line_symbolizer_get_stroke_dash_item (rl2LineSymbolizerPtr
symbolizer, int index,
double *item);
RL2_DECLARE int
rl2_line_symbolizer_get_perpendicular_offset (rl2LineSymbolizerPtr
symbolizer,
double *offset);
RL2_DECLARE int
rl2_polygon_symbolizer_has_stroke (rl2PolygonSymbolizerPtr symbolizer,
int *stroke);
RL2_DECLARE int
rl2_polygon_symbolizer_has_graphic_stroke (rl2PolygonSymbolizerPtr
symbolizer, int *stroke);
RL2_DECLARE const char
*rl2_polygon_symbolizer_get_graphic_stroke_href (rl2PolygonSymbolizerPtr
symbolizer);
RL2_DECLARE int
rl2_polygon_symbolizer_get_graphic_stroke_recode_count
(rl2PolygonSymbolizerPtr symbolizer, int *count);
RL2_DECLARE int
rl2_polygon_symbolizer_get_graphic_stroke_recode_color
(rl2PolygonSymbolizerPtr symbolizer, int index, int *color_index,
unsigned char *red, unsigned char *green, unsigned char *blue);
RL2_DECLARE int
rl2_polygon_symbolizer_get_stroke_color (rl2PolygonSymbolizerPtr
symbolizer, unsigned char *red,
unsigned char *green,
unsigned char *blue);
RL2_DECLARE int
rl2_polygon_symbolizer_get_stroke_opacity (rl2PolygonSymbolizerPtr
symbolizer, double *opacity);
RL2_DECLARE int
rl2_polygon_symbolizer_get_stroke_width (rl2PolygonSymbolizerPtr
symbolizer, double *width);
RL2_DECLARE int
rl2_polygon_symbolizer_get_stroke_linejoin (rl2PolygonSymbolizerPtr
symbolizer,
unsigned char *linejoin);
RL2_DECLARE int
rl2_polygon_symbolizer_get_stroke_linecap (rl2PolygonSymbolizerPtr
symbolizer,
unsigned char *linecap);
RL2_DECLARE int
rl2_polygon_symbolizer_get_stroke_dash_offset (rl2PolygonSymbolizerPtr
symbolizer,
double *offset);
RL2_DECLARE int
rl2_polygon_symbolizer_get_stroke_dash_count (rl2PolygonSymbolizerPtr
symbolizer, int *count);
RL2_DECLARE int
rl2_polygon_symbolizer_get_stroke_dash_item (rl2PolygonSymbolizerPtr
symbolizer, int index,
double *item);
RL2_DECLARE int
rl2_polygon_symbolizer_has_fill (rl2PolygonSymbolizerPtr symbolizer,
int *fill);
RL2_DECLARE int
rl2_polygon_symbolizer_has_graphic_fill (rl2PolygonSymbolizerPtr
symbolizer, int *fill);
RL2_DECLARE const char
*rl2_polygon_symbolizer_get_graphic_fill_href (rl2PolygonSymbolizerPtr
symbolizer);
RL2_DECLARE int
rl2_polygon_symbolizer_get_graphic_fill_recode_count
(rl2PolygonSymbolizerPtr symbolizer, int *count);
RL2_DECLARE int
rl2_polygon_symbolizer_get_graphic_fill_recode_color
(rl2PolygonSymbolizerPtr symbolizer, int index, int *color_index,
unsigned char *red, unsigned char *green, unsigned char *blue);
RL2_DECLARE int
rl2_polygon_symbolizer_get_fill_color (rl2PolygonSymbolizerPtr
symbolizer, unsigned char *red,
unsigned char *green,
unsigned char *blue);
RL2_DECLARE int
rl2_polygon_symbolizer_get_fill_opacity (rl2PolygonSymbolizerPtr
symbolizer, double *opacity);
RL2_DECLARE int
rl2_polygon_symbolizer_get_displacement (rl2PolygonSymbolizerPtr
symbolizer, double *x,
double *y);
RL2_DECLARE int
rl2_polygon_symbolizer_get_perpendicular_offset (rl2PolygonSymbolizerPtr
symbolizer,
double *offset);
RL2_DECLARE const char *rl2_text_symbolizer_get_label (rl2TextSymbolizerPtr
symbolizer);
RL2_DECLARE int
rl2_text_symbolizer_get_font_families_count (rl2TextSymbolizerPtr
symbolizer, int *count);
RL2_DECLARE const char
*rl2_text_symbolizer_get_font_family_name (rl2TextSymbolizerPtr
symbolizer, int index);
RL2_DECLARE int
rl2_text_symbolizer_get_font_style (rl2TextSymbolizerPtr symbolizer,
unsigned char *style);
RL2_DECLARE int
rl2_text_symbolizer_get_font_weight (rl2TextSymbolizerPtr symbolizer,
unsigned char *weight);
RL2_DECLARE int
rl2_text_symbolizer_get_font_size (rl2TextSymbolizerPtr symbolizer,
double *size);
RL2_DECLARE int
rl2_text_symbolizer_get_label_placement_mode (rl2TextSymbolizerPtr
symbolizer,
unsigned char *mode);
RL2_DECLARE int
rl2_text_symbolizer_get_point_placement_anchor_point
(rl2TextSymbolizerPtr symbolizer, double *x, double *y);
RL2_DECLARE int
rl2_text_symbolizer_get_point_placement_displacement
(rl2TextSymbolizerPtr symbolizer, double *x, double *y);
RL2_DECLARE int
rl2_text_symbolizer_get_point_placement_rotation (rl2TextSymbolizerPtr
symbolizer,
double *rotation);
RL2_DECLARE int
rl2_text_symbolizer_get_line_placement_perpendicular_offset
(rl2TextSymbolizerPtr symbolizer, double *offset);
RL2_DECLARE int
rl2_text_symbolizer_get_line_placement_is_repeated (rl2TextSymbolizerPtr
symbolizer,
int *is_repeated);
RL2_DECLARE int
rl2_text_symbolizer_get_line_placement_initial_gap (rl2TextSymbolizerPtr
symbolizer,
double
*initial_gap);
RL2_DECLARE int
rl2_text_symbolizer_get_line_placement_gap (rl2TextSymbolizerPtr
symbolizer, double *gap);
RL2_DECLARE int
rl2_text_symbolizer_get_line_placement_is_aligned (rl2TextSymbolizerPtr
symbolizer,
int *is_aligned);
RL2_DECLARE int
rl2_text_symbolizer_get_line_placement_generalize_line
(rl2TextSymbolizerPtr symbolizer, int *generalize_line);
RL2_DECLARE int
rl2_text_symbolizer_has_halo (rl2TextSymbolizerPtr symbolizer,
int *halo);
RL2_DECLARE int
rl2_text_symbolizer_get_halo_radius (rl2TextSymbolizerPtr symbolizer,
double *radius);
RL2_DECLARE int
rl2_text_symbolizer_has_halo_fill (rl2TextSymbolizerPtr symbolizer,
int *fill);
RL2_DECLARE int
rl2_text_symbolizer_get_halo_fill_color (rl2TextSymbolizerPtr
symbolizer, unsigned char *red,
unsigned char *green,
unsigned char *blue);
RL2_DECLARE int
rl2_text_symbolizer_has_fill (rl2TextSymbolizerPtr symbolizer,
int *fill);
RL2_DECLARE int
rl2_text_symbolizer_get_fill_color (rl2TextSymbolizerPtr symbolizer,
unsigned char *red,
unsigned char *green,
unsigned char *blue);
RL2_DECLARE rl2GroupStylePtr
rl2_create_group_style_from_dbms (sqlite3 * handle, const char *group,
const char *style);
RL2_DECLARE void rl2_destroy_group_style (rl2GroupStylePtr style);
RL2_DECLARE const char *rl2_get_group_style_name (rl2GroupStylePtr style);
RL2_DECLARE int rl2_is_valid_group_style (rl2GroupStylePtr style,
int *valid);
RL2_DECLARE int rl2_get_group_style_count (rl2GroupStylePtr style,
int *count);
RL2_DECLARE const char *rl2_get_group_named_layer (rl2GroupStylePtr style,
int index);
RL2_DECLARE const char *rl2_get_group_named_style (rl2GroupStylePtr style,
int index);
RL2_DECLARE int rl2_is_valid_group_named_layer (rl2GroupStylePtr style,
int index, int *valid);
RL2_DECLARE int rl2_is_valid_group_named_style (rl2GroupStylePtr style,
int index, int *valid);
RL2_DECLARE rl2GroupRendererPtr rl2_create_group_renderer (sqlite3 * sqlite,
rl2GroupStylePtr
style);
RL2_DECLARE void rl2_destroy_group_renderer (rl2GroupRendererPtr group);
RL2_DECLARE char *rl2_build_worldfile_path (const char *path,
const char *suffix);
RL2_DECLARE char *rl2_compute_file_md5_checksum (const char *src_path);
RL2_DECLARE int rl2_get_jpeg_infos (const char *path, unsigned int *width,
unsigned int *height,
unsigned char *pixel_type);
RL2_DECLARE int rl2_get_jpeg2000_infos (const char *path,
unsigned int *width,
unsigned int *height,
unsigned char *sample_type,
unsigned char *pixel_type,
unsigned char *num_bands,
unsigned int *tile_width,
unsigned int *tile_height,
unsigned char *num_levels);
RL2_DECLARE int rl2_get_jpeg2000_blob_type (const unsigned char *blob,
int blob_size,
unsigned char *sample_type,
unsigned char *pixel_type,
unsigned char *num_bands);
RL2_DECLARE char *rl2_build_raw_pixels_xml_summary (rl2RasterPtr rst);
RL2_DECLARE rl2RasterPtr
rl2_get_tile_from_raw_pixels (rl2CoveragePtr cvg, rl2RasterPtr rst,
unsigned int startRow,
unsigned int startCol);
RL2_DECLARE int
rl2_check_raster_coverage_destination (sqlite3 * sqlite,
const char *coverage_name);
RL2_DECLARE int
rl2_check_raster_coverage_origin (sqlite3 * sqlite,
const char *db_prefix,
const char *coverage_name);
RL2_DECLARE int
rl2_copy_raster_coverage (sqlite3 * sqlite, const char *db_prefix,
const char *coverage_name);
#ifdef __cplusplus
}
#endif
#endif /* _RASTERLITE2_H */
|