00001 /****************************************************************************** 00002 * $Id: ogr_p.h,v 1.10 2006/03/31 17:44:20 fwarmerdam Exp $ 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 * $Log: ogr_p.h,v $ 00031 * Revision 1.10 2006/03/31 17:44:20 fwarmerdam 00032 * header updates 00033 * 00034 * Revision 1.9 2005/10/16 01:59:06 cfis 00035 * Added declaration for OGRGeneralCmdLineProcessor to ogr_p.h, and included it into ogr2ogr. Also changed call to CPL_DLL from CPL_STDCALL 00036 * 00037 * Revision 1.8 2005/07/20 01:43:51 fwarmerdam 00038 * upgraded OGR geometry dimension handling 00039 * 00040 * Revision 1.7 2001/11/01 17:01:28 warmerda 00041 * pass output buffer into OGRMakeWktCoordinate 00042 * 00043 * Revision 1.6 1999/11/18 19:02:20 warmerda 00044 * expanded tabs 00045 * 00046 * Revision 1.5 1999/09/13 02:27:33 warmerda 00047 * incorporated limited 2.5d support 00048 * 00049 * Revision 1.4 1999/07/29 17:30:38 warmerda 00050 * avoid geometry dependent stuff if ogr_geometry.h not included 00051 * 00052 * Revision 1.3 1999/07/07 04:23:07 danmo 00053 * Fixed typo in #define _OGR_..._H_INCLUDED line 00054 * 00055 * Revision 1.2 1999/05/20 14:36:04 warmerda 00056 * added well known text parsing prototypes 00057 * 00058 * Revision 1.1 1999/03/29 21:21:10 warmerda 00059 * New 00060 * 00061 */ 00062 00063 #ifndef _OGR_P_H_INCLUDED 00064 #define _OGR_P_H_INCLUDED 00065 00066 /* -------------------------------------------------------------------- */ 00067 /* Include the common portability library ... lets us do lots */ 00068 /* of stuff easily. */ 00069 /* -------------------------------------------------------------------- */ 00070 00071 #include "cpl_string.h" 00072 #include "cpl_conv.h" 00073 00074 #ifdef CPL_MSB 00075 # define OGR_SWAP(x) (x == wkbNDR) 00076 #else 00077 # define OGR_SWAP(x) (x == wkbXDR) 00078 #endif 00079 00080 /* -------------------------------------------------------------------- */ 00081 /* helper function for parsing well known text format vector objects.*/ 00082 /* -------------------------------------------------------------------- */ 00083 00084 #ifdef _OGR_GEOMETRY_H_INCLUDED 00085 #define OGR_WKT_TOKEN_MAX 64 00086 00087 const char CPL_DLL * OGRWktReadToken( const char * pszInput, char * pszToken ); 00088 00089 const char CPL_DLL * OGRWktReadPoints( const char * pszInput, 00090 OGRRawPoint **ppaoPoints, 00091 double **ppadfZ, 00092 int * pnMaxPoints, 00093 int * pnReadPoints ); 00094 00095 void CPL_DLL OGRMakeWktCoordinate( char *, double, double, double, int ); 00096 #endif 00097 00098 00099 /* General utility option processing. */ 00100 int CPL_DLL OGRGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv, int nOptions ); 00101 00102 00103 #endif /* ndef _OGR_P_H_INCLUDED */