|
SpatiaLite 4.3.0a
|
00001 /* 00002 gg_const.h -- Gaia common support for geometries: constants 00003 00004 version 4.3, 2015 June 29 00005 00006 Author: Sandro Furieri a.furieri@lqt.it 00007 00008 ------------------------------------------------------------------------------ 00009 00010 Version: MPL 1.1/GPL 2.0/LGPL 2.1 00011 00012 The contents of this file are subject to the Mozilla Public License Version 00013 1.1 (the "License"); you may not use this file except in compliance with 00014 the License. You may obtain a copy of the License at 00015 http://www.mozilla.org/MPL/ 00016 00017 Software distributed under the License is distributed on an "AS IS" basis, 00018 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 00019 for the specific language governing rights and limitations under the 00020 License. 00021 00022 The Original Code is the SpatiaLite library 00023 00024 The Initial Developer of the Original Code is Alessandro Furieri 00025 00026 Portions created by the Initial Developer are Copyright (C) 2008-2015 00027 the Initial Developer. All Rights Reserved. 00028 00029 Contributor(s): 00030 Klaus Foerster klaus.foerster@svg.cc 00031 00032 Alternatively, the contents of this file may be used under the terms of 00033 either the GNU General Public License Version 2 or later (the "GPL"), or 00034 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 00035 in which case the provisions of the GPL or the LGPL are applicable instead 00036 of those above. If you wish to allow use of your version of this file only 00037 under the terms of either the GPL or the LGPL, and not to allow others to 00038 use your version of this file under the terms of the MPL, indicate your 00039 decision by deleting the provisions above and replace them with the notice 00040 and other provisions required by the GPL or the LGPL. If you do not delete 00041 the provisions above, a recipient may use your version of this file under 00042 the terms of any one of the MPL, the GPL or the LGPL. 00043 00044 */ 00045 00046 00053 #ifndef _GG_CONST_H 00054 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00055 #define _GG_CONST_H 00056 #endif 00057 00058 #ifdef __cplusplus 00059 extern "C" 00060 { 00061 #endif 00062 00063 /* constant values for getVectorLayersList modes */ 00064 00066 #define GAIA_VECTORS_LIST_FAST 0 00067 00069 #define GAIA_VECTORS_LIST_OPTIMISTIC 1 00070 00072 #define GAIA_VECTORS_LIST_PESSIMISTIC 2 00073 00074 /* constant values for Vector Layer Types */ 00075 00077 #define GAIA_VECTOR_UNKNOWN -1 00078 00079 #define GAIA_VECTOR_TABLE 1 00080 00081 #define GAIA_VECTOR_VIEW 2 00082 00083 #define GAIA_VECTOR_VIRTUAL 3 00084 00085 /* constant values for Vector Layer Geometry Types */ 00086 00088 #define GAIA_VECTOR_GEOMETRY 0 00089 00090 #define GAIA_VECTOR_POINT 1 00091 00092 #define GAIA_VECTOR_LINESTRING 2 00093 00094 #define GAIA_VECTOR_POLYGON 3 00095 00096 #define GAIA_VECTOR_MULTIPOINT 4 00097 00098 #define GAIA_VECTOR_MULTILINESTRING 5 00099 00100 #define GAIA_VECTOR_MULTIPOLYGON 6 00101 00102 #define GAIA_VECTOR_GEOMETRYCOLLECTION 7 00103 00104 /* constant values for Spatial Index */ 00105 00107 #define GAIA_SPATIAL_INDEX_NONE 0 00108 00109 #define GAIA_SPATIAL_INDEX_RTREE 1 00110 00111 #define GAIA_SPATIAL_INDEX_MBRCACHE 2 00112 00113 /* constant values for generic geometry classes */ 00114 00116 #define GAIA_TYPE_NONE 0 00117 00118 #define GAIA_TYPE_POINT 1 00119 00120 #define GAIA_TYPE_LINESTRING 2 00121 00122 #define GAIA_TYPE_POLYGON 3 00123 00124 /* constants that defines byte storage order */ 00126 #define GAIA_BIG_ENDIAN 0 00127 00128 #define GAIA_LITTLE_ENDIAN 1 00129 00130 /* constants that defines special markers used for encoding of SpatiaLite internal BLOB geometries */ 00132 #define GAIA_MARK_START 0x00 00133 00134 #define GAIA_MARK_END 0xFE 00135 00136 #define GAIA_MARK_MBR 0x7C 00137 00138 #define GAIA_MARK_ENTITY 0x69 00139 00140 /* constants that defines GEOMETRY CLASSes */ 00142 #define GAIA_UNKNOWN 0 00143 00144 #define GAIA_POINT 1 00145 00146 #define GAIA_LINESTRING 2 00147 00148 #define GAIA_POLYGON 3 00149 00150 #define GAIA_MULTIPOINT 4 00151 00152 #define GAIA_MULTILINESTRING 5 00153 00154 #define GAIA_MULTIPOLYGON 6 00155 00156 #define GAIA_GEOMETRYCOLLECTION 7 00157 00158 #define GAIA_POINTZ 1001 00159 00160 #define GAIA_LINESTRINGZ 1002 00161 00162 #define GAIA_POLYGONZ 1003 00163 00164 #define GAIA_MULTIPOINTZ 1004 00165 00166 #define GAIA_MULTILINESTRINGZ 1005 00167 00168 #define GAIA_MULTIPOLYGONZ 1006 00169 00170 #define GAIA_GEOMETRYCOLLECTIONZ 1007 00171 00172 #define GAIA_POINTM 2001 00173 00174 #define GAIA_LINESTRINGM 2002 00175 00176 #define GAIA_POLYGONM 2003 00177 00178 #define GAIA_MULTIPOINTM 2004 00179 00180 #define GAIA_MULTILINESTRINGM 2005 00181 00182 #define GAIA_MULTIPOLYGONM 2006 00183 00184 #define GAIA_GEOMETRYCOLLECTIONM 2007 00185 00186 #define GAIA_POINTZM 3001 00187 00188 #define GAIA_LINESTRINGZM 3002 00189 00190 #define GAIA_POLYGONZM 3003 00191 00192 #define GAIA_MULTIPOINTZM 3004 00193 00194 #define GAIA_MULTILINESTRINGZM 3005 00195 00196 #define GAIA_MULTIPOLYGONZM 3006 00197 00198 #define GAIA_GEOMETRYCOLLECTIONZM 3007 00199 00200 /* constants that defines Compressed GEOMETRY CLASSes */ 00202 #define GAIA_COMPRESSED_LINESTRING 1000002 00203 00204 #define GAIA_COMPRESSED_POLYGON 1000003 00205 00206 #define GAIA_COMPRESSED_LINESTRINGZ 1001002 00207 00208 #define GAIA_COMPRESSED_POLYGONZ 1001003 00209 00210 #define GAIA_COMPRESSED_LINESTRINGM 1002002 00211 00212 #define GAIA_COMPRESSED_POLYGONM 1002003 00213 00214 #define GAIA_COMPRESSED_LINESTRINGZM 1003002 00215 00216 #define GAIA_COMPRESSED_POLYGONZM 1003003 00217 00218 /* constants that defines GEOS-WKB 3D CLASSes */ 00220 #define GAIA_GEOSWKB_POINTZ -2147483647 00221 00222 #define GAIA_GEOSWKB_LINESTRINGZ -2147483646 00223 00224 #define GAIA_GEOSWKB_POLYGONZ -2147483645 00225 00226 #define GAIA_GEOSWKB_MULTIPOINTZ -2147483644 00227 00228 #define GAIA_GEOSWKB_MULTILINESTRINGZ -2147483643 00229 00230 #define GAIA_GEOSWKB_MULTIPOLYGONZ -2147483642 00231 00232 #define GAIA_GEOSWKB_GEOMETRYCOLLECTIONZ -2147483641 00233 00234 /* constants that defines multitype values */ 00236 #define GAIA_NULL_VALUE 0 00237 00238 #define GAIA_TEXT_VALUE 1 00239 00240 #define GAIA_INT_VALUE 2 00241 00242 #define GAIA_DOUBLE_VALUE 3 00243 00244 /* constants that defines POINT index for LINESTRING */ 00246 #define GAIA_START_POINT 1 00247 00248 #define GAIA_END_POINT 2 00249 00250 #define GAIA_POINTN 3 00251 00252 /* constants that defines MBRs spatial relationships */ 00254 #define GAIA_MBR_CONTAINS 1 00255 00256 #define GAIA_MBR_DISJOINT 2 00257 00258 #define GAIA_MBR_EQUAL 3 00259 00260 #define GAIA_MBR_INTERSECTS 4 00261 00262 #define GAIA_MBR_OVERLAPS 5 00263 00264 #define GAIA_MBR_TOUCHES 6 00265 00266 #define GAIA_MBR_WITHIN 7 00267 00268 /* constants used for FilterMBR */ 00270 #define GAIA_FILTER_MBR_WITHIN 74 00271 00272 #define GAIA_FILTER_MBR_CONTAINS 77 00273 00274 #define GAIA_FILTER_MBR_INTERSECTS 79 00275 00276 #define GAIA_FILTER_MBR_DECLARE 89 00277 00278 /* constants defining SVG default values */ 00280 #define GAIA_SVG_DEFAULT_RELATIVE 0 00281 00282 #define GAIA_SVG_DEFAULT_PRECISION 6 00283 00284 #define GAIA_SVG_DEFAULT_MAX_PRECISION 15 00285 00286 /* constants used for VirtualNetwork */ 00288 #define GAIA_NET_START 0x67 00289 00290 #define GAIA_NET64_START 0x68 00291 00292 #define GAIA_NET64_A_STAR_START 0x69 00293 00294 #define GAIA_NET_END 0x87 00295 00296 #define GAIA_NET_HEADER 0xc0 00297 00298 #define GAIA_NET_CODE 0xa6 00299 00300 #define GAIA_NET_ID 0xb5 00301 00302 #define GAIA_NET_NODE 0xde 00303 00304 #define GAIA_NET_ARC 0x54 00305 00306 #define GAIA_NET_TABLE 0xa0 00307 00308 #define GAIA_NET_FROM 0xa1 00309 00310 #define GAIA_NET_TO 0xa2 00311 00312 #define GAIA_NET_GEOM 0xa3 00313 00314 #define GAIA_NET_NAME 0xa4 00315 00316 #define GAIA_NET_A_STAR_COEFF 0xa5 00317 00318 #define GAIA_NET_BLOCK 0xed 00319 00320 /* constants used for Coordinate Dimensions */ 00322 #define GAIA_XY 0x00 00323 00324 #define GAIA_XY_Z 0x01 00325 00326 #define GAIA_XY_M 0x02 00327 00328 #define GAIA_XY_Z_M 0x03 00329 00330 /* constants used for length unit conversion */ 00332 #define GAIA_KM 0 00333 00334 #define GAIA_M 1 00335 00336 #define GAIA_DM 2 00337 00338 #define GAIA_CM 3 00339 00340 #define GAIA_MM 4 00341 00342 #define GAIA_KMI 5 00343 00344 #define GAIA_IN 6 00345 00346 #define GAIA_FT 7 00347 00348 #define GAIA_YD 8 00349 00350 #define GAIA_MI 9 00351 00352 #define GAIA_FATH 10 00353 00354 #define GAIA_CH 11 00355 00356 #define GAIA_LINK 12 00357 00358 #define GAIA_US_IN 13 00359 00360 #define GAIA_US_FT 14 00361 00362 #define GAIA_US_YD 15 00363 00364 #define GAIA_US_CH 16 00365 00366 #define GAIA_US_MI 17 00367 00368 #define GAIA_IND_YD 18 00369 00370 #define GAIA_IND_FT 19 00371 00372 #define GAIA_IND_CH 20 00373 00374 #define GAIA_MIN_UNIT GAIA_KM 00375 00376 #define GAIA_MAX_UNIT GAIA_IND_CH 00377 00378 /* constants used for SHAPES */ 00380 #define GAIA_SHP_NULL 0 00381 00382 #define GAIA_SHP_POINT 1 00383 00384 #define GAIA_SHP_POLYLINE 3 00385 00386 #define GAIA_SHP_POLYGON 5 00387 00388 #define GAIA_SHP_MULTIPOINT 8 00389 00390 #define GAIA_SHP_POINTZ 11 00391 00392 #define GAIA_SHP_POLYLINEZ 13 00393 00394 #define GAIA_SHP_POLYGONZ 15 00395 00396 #define GAIA_SHP_MULTIPOINTZ 18 00397 00398 #define GAIA_SHP_POINTM 21 00399 00400 #define GAIA_SHP_POLYLINEM 23 00401 00402 #define GAIA_SHP_POLYGONM 25 00403 00404 #define GAIA_SHP_MULTIPOINTM 28 00405 00406 /* constants used for Clone Special modes */ 00408 #define GAIA_SAME_ORDER 0 00409 00410 #define GAIA_REVERSE_ORDER -1 00411 00412 #define GAIA_LHR_ORDER -2 00413 00414 /* macros */ 00428 #define gaiaGetPoint(xy,v,x,y) \ 00429 {*x = xy[(v) * 2]; \ 00430 *y = xy[(v) * 2 + 1];} 00431 00445 #define gaiaSetPoint(xy,v,x,y) \ 00446 {xy[(v) * 2] = x; \ 00447 xy[(v) * 2 + 1] = y;} 00448 00463 #define gaiaGetPointXYZ(xyz,v,x,y,z) \ 00464 {*x = xyz[(v) * 3]; \ 00465 *y = xyz[(v) * 3 + 1]; \ 00466 *z = xyz[(v) * 3 + 2];} 00467 00482 #define gaiaSetPointXYZ(xyz,v,x,y,z) \ 00483 {xyz[(v) * 3] = x; \ 00484 xyz[(v) * 3 + 1] = y; \ 00485 xyz[(v) * 3 + 2] = z;} 00486 00501 #define gaiaGetPointXYM(xym,v,x,y,m) \ 00502 {*x = xym[(v) * 3]; \ 00503 *y = xym[(v) * 3 + 1]; \ 00504 *m = xym[(v) * 3 + 2];} 00505 00520 #define gaiaSetPointXYM(xym,v,x,y,m) \ 00521 {xym[(v) * 3] = x; \ 00522 xym[(v) * 3 + 1] = y; \ 00523 xym[(v) * 3 + 2] = m;} 00524 00540 #define gaiaGetPointXYZM(xyzm,v,x,y,z,m) \ 00541 {*x = xyzm[(v) * 4]; \ 00542 *y = xyzm[(v) * 4 + 1]; \ 00543 *z = xyzm[(v) * 4 + 2]; \ 00544 *m = xyzm[(v) * 4 + 3];} 00545 00561 #define gaiaSetPointXYZM(xyzm,v,x,y,z,m) \ 00562 {xyzm[(v) * 4] = x; \ 00563 xyzm[(v) * 4 + 1] = y; \ 00564 xyzm[(v) * 4 + 2] = z; \ 00565 xyzm[(v) * 4 + 3] = m;} 00566 00567 00568 #ifdef __cplusplus 00569 } 00570 #endif 00571 00572 #endif /* _GG_CONST_H */
1.7.3