ogr_p.h

00001 /******************************************************************************
00002  * $Id: ogr_p.h 10646 2007-01-18 02:38:10Z warmerdam $
00003  *
00004  * Project:  OpenGIS Simple Features Reference Implementation
00005  * Purpose:  Some private helper functions and stuff for OGR implementation.
00006  * Author:   Frank Warmerdam, warmerdam@pobox.com
00007  *
00008  ******************************************************************************
00009  * Copyright (c) 1999, Frank Warmerdam
00010  *
00011  * Permission is hereby granted, free of charge, to any person obtaining a
00012  * copy of this software and associated documentation files (the "Software"),
00013  * to deal in the Software without restriction, including without limitation
00014  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00015  * and/or sell copies of the Software, and to permit persons to whom the
00016  * Software is furnished to do so, subject to the following conditions:
00017  *
00018  * The above copyright notice and this permission notice shall be included
00019  * in all copies or substantial portions of the Software.
00020  *
00021  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00022  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00023  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00024  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00025  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00026  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00027  * DEALINGS IN THE SOFTWARE.
00028  ****************************************************************************/
00029 
00030 #ifndef _OGR_P_H_INCLUDED
00031 #define _OGR_P_H_INCLUDED
00032 
00033 /* -------------------------------------------------------------------- */
00034 /*      Include the common portability library ... lets us do lots      */
00035 /*      of stuff easily.                                                */
00036 /* -------------------------------------------------------------------- */
00037 
00038 #include "cpl_string.h"
00039 #include "cpl_conv.h"
00040 
00041 #ifdef CPL_MSB 
00042 #  define OGR_SWAP(x)   (x == wkbNDR)
00043 #else
00044 #  define OGR_SWAP(x)   (x == wkbXDR)
00045 #endif
00046 
00047 /* -------------------------------------------------------------------- */
00048 /*      helper function for parsing well known text format vector objects.*/
00049 /* -------------------------------------------------------------------- */
00050 
00051 #ifdef _OGR_GEOMETRY_H_INCLUDED
00052 #define OGR_WKT_TOKEN_MAX       64
00053 
00054 const char CPL_DLL * OGRWktReadToken( const char * pszInput, char * pszToken );
00055 
00056 const char CPL_DLL * OGRWktReadPoints( const char * pszInput,
00057                                        OGRRawPoint **ppaoPoints, 
00058                                        double **ppadfZ,
00059                                        int * pnMaxPoints,
00060                                        int * pnReadPoints );
00061 
00062 void CPL_DLL OGRMakeWktCoordinate( char *, double, double, double, int );
00063 #endif
00064 
00065 
00066 /* General utility option processing. */
00067 int CPL_DLL OGRGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv, int nOptions );
00068 
00069 /************************************************************************/
00070 /*     Support for special attributes (feature query and selection)     */
00071 /************************************************************************/
00072 CPL_C_START
00073 #include "swq.h"
00074 CPL_C_END
00075 
00076 #define SPF_FID 0
00077 #define SPF_OGR_GEOMETRY 1
00078 #define SPF_OGR_STYLE 2
00079 #define SPF_OGR_GEOM_WKT 3
00080 #define SPECIAL_FIELD_COUNT 4
00081 
00082 extern char* SpecialFieldNames[SPECIAL_FIELD_COUNT];
00083 extern swq_field_type SpecialFieldTypes[SPECIAL_FIELD_COUNT];
00084 
00085 #endif /* ndef _OGR_P_H_INCLUDED */

Generated for GDAL by doxygen 1.4.7.