1 /*************************************** 2 Header file for error log file data types and processing function prototypes. 3 4 Part of the Routino routing software. 5 ******************/ /****************** 6 This file Copyright 2013 Andrew M. Bishop 7 8 This program is free software: you can redistribute it and/or modify 9 it under the terms of the GNU Affero General Public License as published by 10 the Free Software Foundation, either version 3 of the License, or 11 (at your option) any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU Affero General Public License for more details. 17 18 You should have received a copy of the GNU Affero General Public License 19 along with this program. If not, see <http://www.gnu.org/licenses/>. 20 ***************************************/ 21 22 23 #ifndef ERRORLOGX_H 24 #define ERRORLOGX_H /*+ To stop multiple inclusions. +*/ 25 26 #include <stdint.h> 27 28 #include "types.h" 29 #include "typesx.h" 30 31 32 /*+ A structure containing information for an error message during processing. +*/ 33 typedef struct _ErrorLogX 34 { 35 latlong_t latitude; /*+ The error message latitude. +*/ 36 latlong_t longitude; /*+ The error message longitude. +*/ 37 38 uint32_t offset; /*+ The offset of the error message from the beginning of the text file. +*/ 39 uint32_t length; /*+ The length of the error message in the text file. +*/ 40 } 41 ErrorLogX; 42 43 44 /*+ A structure containing a set of error logs (memory format). +*/ 45 typedef struct _ErrorLogsX 46 { 47 index_t number; /*+ The number of error logs. +*/ 48 49 index_t latbins; /*+ The number of bins containing latitude. +*/ 50 index_t lonbins; /*+ The number of bins containing longitude. +*/ 51 52 ll_bin_t latzero; /*+ The bin number of the furthest south bin. +*/ 53 ll_bin_t lonzero; /*+ The bin number of the furthest west bin. +*/ 54 } 55 ErrorLogsX; 56 57 58 /* Error log processing functions in errorlogx.c */ 59 60 ErrorLogsX *NewErrorLogList(void); 61 void FreeErrorLogList(ErrorLogsX *errorlogsx); 62 63 void ProcessErrorLogs(ErrorLogsX *errorlogsx,NodesX *nodesx,WaysX *waysx,RelationsX *relationsx); 64 65 void SortErrorLogsGeographically(ErrorLogsX *errorlogsx); 66 67 void SaveErrorLogs(ErrorLogsX *errorlogsx,char *filename); 68 69 70 #endif /* ERRORLOGX_H */ 71