├── .gitignore ├── README.md ├── alldbpediapoints.py ├── alpha_shape ├── CMakeLists.txt ├── data │ └── fin └── main.cpp ├── batch_country_dataset_generator.py ├── cPlace.py ├── cReport.py ├── cSpinner.py ├── countrylist.py ├── doxygen_conf ├── geom_functions.py ├── results ├── all_points.csv ├── europe.csv └── twente.csv └── vagueplaces.py /.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # VIM 5 | # 6 | # 7 | *.swp 8 | *.swo 9 | 10 | # 11 | # 12 | # 13 | #PYTHON 14 | # 15 | # 16 | *.py[co] 17 | 18 | # Packages 19 | *.egg 20 | *.egg-info 21 | dist 22 | build 23 | eggs 24 | parts 25 | bin 26 | var 27 | sdist 28 | develop-eggs 29 | .installed.cfg 30 | 31 | # Installer logs 32 | pip-log.txt 33 | 34 | # Unit test / coverage reports 35 | .coverage 36 | .tox 37 | 38 | #Translations 39 | *.mo 40 | 41 | #Mr Developer 42 | .mr.developer.cfg 43 | 44 | # 45 | # 46 | # 47 | # ALPHA SHAPER 48 | # 49 | # 50 | # Compiled Object files 51 | *.slo 52 | *.lo 53 | *.o 54 | 55 | # Compiled Dynamic libraries 56 | *.so 57 | 58 | # Compiled Static libraries 59 | *.lai 60 | *.la 61 | *.a 62 | 63 | #CMAKE 64 | CMakeCache.txt 65 | CMakeFiles 66 | Makefile 67 | cmake_install.cmake 68 | install_manifest.txt 69 | 70 | results/* 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | vague-places 2 | ============ 3 | Vagueplaces Generator using DBpedia SPARQL endpoint. 4 | 5 | Jordi Castells 6 | 10 August 2012 7 | 8 | This software is implemented as a final project of a Geoinformatics Master course at ITC Faculty of Geo-Information Science and Earth Observation. With Dr. ir. R.A. (Rolf) de By supervisor. 9 | 10 | The main course file is vagueplaces.py 11 | 12 | Abstract 13 | ======== 14 | Online gazetteers provide services that help to geocode locations. Given the name, the gazetteerwill attempt to provide coordinates for the place, usually in point information. Point informationis not always the best solution: urban areas, administrative units, or rivers are better describedusing polygons or lines. There is a clear need for region geocoding.In official administrative units, the situation is not critical. This kind of data is most of thetime available from online spatial data repositories. On the other hand, non-official boundariesare difficult to find and, old boundaries or folklore delimitations difficult to obtain. For example,Mittelland in Switzerland or the Scottish highlands.Solutions regarding the web are already proposed by Arampatzis et al. and Christopher B. Jones et al. inside the research by the SPIRIT project. Thoseapproaches use google search and classification to obtain the information; this project will aim toobtain similar results using semantic web approaches. 15 | 16 | Previous work presented a solution to the problem. The main aim of this small project is to provideanother way to obtain a similar or better solution with the aid of the semantic web formats using DBpediaas a base data repository 17 | 18 | Requirements 19 | ============ 20 | To run vagueplaces.py you will have to provide a couple of libraries: 21 | shapely 22 | SPARQLWrapper 23 | 24 | 25 | Running 26 | ======= 27 | 28 | Run vagueplaces.py --help to get a list of options. But mainly you choose which DBPedia to point (live or last release), a set of words to filter from and an alpha shape value. 29 | 30 | 31 | Extra 32 | ===== 33 | 34 | There's a website presenting the points from DBPedia. To generate all the point dataset there are a couple of scripts that automatically handle the task. 35 | 36 | alldbpediapoints.py will download all DBPedia entries with latitude and longitude. 37 | 38 | countrylist.py takes an input file (generated from alldbpediapoints.py) and prints a list of "valid" country resources. Since the CSV may have strange artifact entries (wront lines, dirty lines) this script only takes into account valid lines and countries with more than 3 points. 39 | 40 | batch_country_dataset_generator.py will take an input csv file generated by alldbpediapoints.py and split it in smaller files, one for each valid country. 41 | 42 | Official Report 43 | =============== 44 | The official report can be found in PDF format either in Scribd or Mendeley: 45 | 46 | http://www.scribd.com/doc/111990720/Defining-vague-places-with-web-knowledge 47 | http://www.mendeley.com/profiles/jordi-castells/ 48 | -------------------------------------------------------------------------------- /alldbpediapoints.py: -------------------------------------------------------------------------------- 1 | from SPARQLWrapper import SPARQLWrapper, SPARQLExceptions, JSON 2 | import argparse 3 | import sys 4 | import threading 5 | import time 6 | import signal 7 | import warnings 8 | import xml 9 | import codecs 10 | 11 | ############################ 12 | # 13 | # ARGUMENT PARSING 14 | # 15 | ############################ 16 | 17 | parser = argparse.ArgumentParser(description='CSV generation with name;point;country querying dbpedia') 18 | 19 | #parser.add_argument('--output', type=argparse.FileType('w', 'utf-8'), dest='fileout', default='dbpedia.csv', 20 | parser.add_argument('--output', dest='fileout', default='dbpedia.csv', 21 | help='File out. [default dbpedia.csv]') 22 | 23 | parser.add_argument('--live', action='store_true',default=False, 24 | dest='live_bool', 25 | help='Use Dbpedia live SPARQL endpoint instead of last released version') 26 | 27 | arguments = parser.parse_args() 28 | 29 | 30 | ############################ 31 | # 32 | # CLASSES 33 | # 34 | ############################ 35 | class cSpinner(threading.Thread): 36 | """ 37 | Print things to one line dynamically 38 | """ 39 | chars = ["\\","|","/","-"] 40 | index = 0 41 | keeprunning = True 42 | paused = False 43 | count = 0 44 | total = 0 45 | 46 | def run(self): 47 | while self.keeprunning: 48 | if self.paused: 49 | time.sleep(1) 50 | continue 51 | 52 | self.printing(str(self.count)+"/"+str(self.total)+" "+self.chars[self.index%len(self.chars)]) 53 | time.sleep(0.1) 54 | self.index +=1 55 | 56 | def printing(self,data): 57 | sys.stdout.write("\r\x1b[K"+data.__str__()) 58 | sys.stdout.flush() 59 | 60 | def stop(self): 61 | self.keeprunning = False 62 | 63 | def set_total(self,val): 64 | self.total = val 65 | 66 | def set_count(self,val): 67 | self.count = val 68 | 69 | def set_char_array(self,charray): 70 | self.chars = charray 71 | 72 | def pause(self): 73 | self.paused = True 74 | 75 | def resume(self): 76 | self.paused = False 77 | 78 | ############################ 79 | # 80 | # INITIALIZATIONS 81 | # 82 | ############################ 83 | OF = codecs.open(arguments.fileout, 'wb', 'utf-8') 84 | islive = arguments.live_bool 85 | RESULTS_QUERY = 10000 86 | 87 | if islive: 88 | sparql = SPARQLWrapper("http://live.dbpedia.org/sparql") 89 | else: 90 | sparql = SPARQLWrapper("http://dbpedia.org/sparql") 91 | 92 | sparql.setReturnFormat(JSON) 93 | 94 | #Spinner 95 | S = cSpinner() 96 | 97 | ############################ 98 | # 99 | # FUNCTIONS 100 | # 101 | ############################ 102 | def finish_program(): 103 | S.stop() 104 | OF.close() 105 | sys.exit(0) 106 | 107 | def wait_to_continue(): 108 | S.pause() 109 | 110 | waiter = cSpinner() 111 | waiter.set_char_array(["Waiting.","Waiting..","Waiting..."]) 112 | waiter.start() 113 | time.sleep(300) 114 | waiter.stop() 115 | 116 | S.resume() 117 | 118 | def get_total_dbpedia_points(islive): 119 | """ Count the total number of dbpedia points """ 120 | 121 | if islive: 122 | sparql = SPARQLWrapper("http://live.dbpedia.org/sparql") 123 | else: 124 | sparql = SPARQLWrapper("http://dbpedia.org/sparql") 125 | 126 | sparql.setReturnFormat(JSON) 127 | 128 | sparql.setQuery(""" 129 | SELECT (COUNT(*) AS ?count) 130 | WHERE{ 131 | ?place rdf:type dbo:Place . 132 | ?place foaf:name ?title . 133 | ?place geo:lat ?geolat . 134 | ?place geo:long ?geolong . 135 | } 136 | """) 137 | 138 | results_array = sparql.query().convert() 139 | 140 | total = results_array["results"]["bindings"][0]["count"]["value"] 141 | 142 | return total 143 | 144 | 145 | ############################ 146 | # 147 | # SIGNAL HANDLING 148 | # 149 | ############################ 150 | def kill_handler(signal, frame): 151 | print 'Kill Signal Recieved' 152 | finish_program() 153 | 154 | signal.signal(signal.SIGINT, kill_handler) 155 | 156 | ############################ 157 | # 158 | # START 159 | # 160 | ############################ 161 | 162 | print "Counting total entries" 163 | S.set_total(get_total_dbpedia_points(islive)); 164 | S.start() 165 | 166 | header = "name;country;URL;x;y;WKT\n" 167 | OF.write(header) 168 | 169 | total_results = 0 170 | query_results = 1 171 | offset = 0 172 | 173 | try: 174 | while query_results > 0: 175 | if islive: 176 | sparql.setQuery(""" 177 | SELECT ?title,?geolat,?geolong, ?country, ?wikiurl 178 | WHERE{ 179 | ?place rdf:type dbo:Place . 180 | ?place foaf:name ?title . 181 | ?place geo:lat ?geolat . 182 | ?place geo:long ?geolong . 183 | ?place dbo:wikiPageRevisionLink ?wikiurl . 184 | ?place dbo:country ?country . 185 | } 186 | OFFSET """ + str(offset) + """ 187 | LIMIT """ + str(RESULTS_QUERY)+ """ 188 | """) 189 | 190 | else: 191 | sparql.setQuery(""" 192 | SELECT ?title,?geolat,?geolong, ?country, ?wikiurl 193 | WHERE{ 194 | ?place rdf:type dbo:Place . 195 | ?place foaf:name ?title . 196 | ?place geo:lat ?geolat . 197 | ?place geo:long ?geolong . 198 | ?place prov:wasDerivedFrom ?wikiurl . 199 | ?place dbo:country ?country . 200 | } 201 | OFFSET """ + str(offset) + """ 202 | LIMIT """ + str(RESULTS_QUERY)+ """ 203 | """) 204 | 205 | results_array = sparql.query().convert() 206 | for result in results_array["results"]["bindings"]: 207 | OF.write(result["title"]["value"] + ";" + 208 | result["country"]["value"] + ";" + 209 | result["wikiurl"]["value"] + ";" + 210 | result["geolat"]["value"] + ";" + 211 | result["geolong"]["value"] + ";" + 212 | "POINT(" + result["geolong"]["value"] +" "+ result["geolat"]["value"] +");" + "\n" 213 | ) 214 | 215 | query_results = len(results_array["results"]["bindings"]) 216 | offset = offset + query_results 217 | total_results += query_results 218 | S.set_count(total_results) #set spinner count 219 | 220 | #except Exception as inst: 221 | # #If exception happens, I assume is a network problem exception. Wait 5 minutes and retry 222 | # sys.stdout.write("\r\x1b[K"+str(inst)) 223 | # wait_to_continue() 224 | finally: 225 | 226 | ############################ 227 | # 228 | # CLOSURE 229 | # 230 | ############################ 231 | print "Program Finished" 232 | finish_program() 233 | -------------------------------------------------------------------------------- /alpha_shape/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Created by the script cgal_create_cmake_script 2 | # This is the CMake script for compiling a CGAL application. 3 | 4 | project (CGAL_CMAKE_test) 5 | 6 | cmake_minimum_required(VERSION 2.6.2) 7 | if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6) 8 | if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3) 9 | cmake_policy(VERSION 2.8.4) 10 | else() 11 | cmake_policy(VERSION 2.6) 12 | endif() 13 | endif() 14 | 15 | find_package(CGAL COMPONENTS Qt4) 16 | 17 | include(${CGAL_USE_FILE}) 18 | 19 | set( QT_USE_QTXML TRUE ) 20 | set( QT_USE_QTMAIN TRUE ) 21 | set( QT_USE_QTSCRIPT TRUE ) 22 | set( QT_USE_QTOPENGL TRUE ) 23 | 24 | 25 | find_package(Qt4) 26 | include_directories (BEFORE ../../include) 27 | include_directories (BEFORE ./include) 28 | 29 | if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) 30 | 31 | include(${QT_USE_FILE}) 32 | 33 | #-------------------------------- 34 | # The "Alpha shaper" based on CGAL demo: Alpha_shapes_2 35 | #-------------------------------- 36 | add_executable ( alpha_shaper main.cpp ) 37 | 38 | else() 39 | 40 | message(STATUS "NOTICE: This demo requires CGAL and Qt4, and will not be compiled.") 41 | 42 | endif() 43 | -------------------------------------------------------------------------------- /alpha_shape/data/fin: -------------------------------------------------------------------------------- 1 | 28 2 | -7.984757184982301 49.784560286998747 3 | -8.22921496629715 48.806729161739348 4 | -7.658813476562501 46.574014759063722 5 | -6.632090795040131 45.987316083908084 6 | -4.399376392364502 45.400617408752439 7 | -2.753360664844513 46.720689427852633 8 | -2.394822585582733 48.13854455947876 9 | -2.737063479423523 48.855620718002321 10 | -3.470436823368073 49.784560286998747 11 | -5.100155365467072 50.32236740589142 12 | -6.387633013725281 50.436447703838347 13 | -6.778765463829041 49.279347538948059 14 | -7.316572582721711 48.871917903423309 15 | -6.697279536724091 47.747412109374999 16 | -7.4958416223526 47.910383963584898 17 | -6.778765463829041 46.981444394588472 18 | -5.360910332202912 46.394745719432834 19 | -5.784637153148651 46.965147209167483 20 | -4.203810167312622 46.280665421485899 21 | -4.594942617416383 46.541420388221738 22 | -3.421545267105103 47.046633136272433 23 | -3.731191790103913 47.991869890689848 24 | -2.900035333633423 47.942978334426883 25 | -3.568219935894013 48.774134790897371 26 | -4.757914471626282 49.214158797264098 27 | -5.214235663414001 49.800857472419736 28 | -5.735745596885682 49.474913763999936 29 | -5.817231523990632 45.612480819225311 30 | -------------------------------------------------------------------------------- /alpha_shape/main.cpp: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | 3 | Takes a list of points and returns a CSV with the correspondent MultiPolygon. 4 | 5 | 6 | [-p] -> Returns the points of the edge. CSV, WKT 7 | [-s] -> Returns the segments of the edge. CSV, WKT 8 | 9 | ************************************************************************/ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | 24 | typedef CGAL::Exact_predicates_exact_constructions_kernel K; 25 | 26 | typedef K::FT FT; 27 | 28 | typedef K::Point_2 Point; 29 | typedef K::Segment_2 Segment; 30 | typedef CGAL::Polygon_2 Polygon_2; 31 | 32 | typedef CGAL::Alpha_shape_vertex_base_2 Vb; 33 | typedef CGAL::Alpha_shape_face_base_2 Fb; 34 | typedef CGAL::Triangulation_data_structure_2 Tds; 35 | typedef CGAL::Delaunay_triangulation_2 Triangulation_2; 36 | 37 | typedef CGAL::Alpha_shape_2 Alpha_shape_2; 38 | 39 | typedef Alpha_shape_2::Face Face; 40 | typedef Alpha_shape_2::Vertex Vertex; 41 | typedef Alpha_shape_2::Edge Edge; 42 | typedef Alpha_shape_2::Face_handle Face_handle; 43 | typedef Alpha_shape_2::Vertex_handle Vertex_handle; 44 | 45 | typedef Alpha_shape_2::Face_circulator Face_circulator; 46 | typedef Alpha_shape_2::Vertex_circulator Vertex_circulator; 47 | 48 | typedef Alpha_shape_2::Locate_type Locate_type; 49 | 50 | typedef Alpha_shape_2::Face_iterator Face_iterator; 51 | typedef Alpha_shape_2::Vertex_iterator Vertex_iterator; 52 | typedef Alpha_shape_2::Edge_iterator Edge_iterator; 53 | typedef Alpha_shape_2::Edge_circulator Edge_circulator; 54 | 55 | typedef Alpha_shape_2::Alpha_iterator Alpha_iterator; 56 | typedef Alpha_shape_2::Alpha_shape_edges_iterator Alpha_shape_edges_iterator; 57 | typedef Alpha_shape_2::Alpha_shape_vertices_iterator Alpha_shape_vertices_iterator; 58 | 59 | //--------------------------------------------------------------------- 60 | 61 | template 62 | void 63 | alpha_edges( const Alpha_shape_2& A, 64 | OutputIterator out) 65 | { 66 | 67 | for(Alpha_shape_edges_iterator it = A.alpha_shape_edges_begin(); 68 | it != A.alpha_shape_edges_end(); 69 | ++it){ 70 | *out++ = A.segment(*it); 71 | } 72 | } 73 | 74 | template 75 | void 76 | alpha_vertices( const Alpha_shape_2& A, 77 | OutputIterator out) 78 | { 79 | 80 | for(Alpha_shape_vertices_iterator it = A.alpha_shape_vertices_begin(); 81 | it != A.alpha_shape_vertices_end(); 82 | ++it){ 83 | *out++ = Vertex_handle(*it); 84 | } 85 | } 86 | 87 | template 88 | bool 89 | file_input(OutputIterator out,char* filename) 90 | { 91 | std::ifstream is(filename, std::ios::in); 92 | 93 | if(is.fail()){ 94 | std::cerr << "unable to open file for input" << std::endl; 95 | return false; 96 | } 97 | 98 | int n; 99 | is >> n; 100 | CGAL::copy_n(std::istream_iterator(is), n, out); 101 | 102 | return true; 103 | } 104 | 105 | //------------------ functions -------------------------------------- 106 | 107 | 108 | bool check_inside(Point pt, Polygon_2 pgn, K traits) 109 | { 110 | //std::cout << "The point " << pt; 111 | switch(CGAL::bounded_side_2(pgn.vertices_begin(), pgn.vertices_end(), pt, traits)) { 112 | case CGAL::ON_BOUNDED_SIDE : 113 | //std::cout << " is inside the polygon.\n"; 114 | return true; 115 | case CGAL::ON_BOUNDARY: 116 | //std::cout << " is on the polygon boundary.\n"; 117 | return false; 118 | case CGAL::ON_UNBOUNDED_SIDE: 119 | //std::cout << " is outside the polygon.\n"; 120 | return false; 121 | } 122 | } 123 | 124 | /** 125 | * Checks if plg2 is inside plg1 126 | */ 127 | bool is_inside(Polygon_2 plg1, Polygon_2 plg2){ 128 | bool ishole = true; 129 | for (std::vector::iterator v2 = plg2.vertices_begin(); 130 | v2 != plg2.vertices_end(); 131 | ++v2){ 132 | if(! check_inside(*v2, plg1, K())){ 133 | ishole = false; 134 | break; //stop checking 135 | } 136 | } 137 | return ishole; 138 | } 139 | 140 | /** 141 | \brief Prints a polygon in its WKT form (p1,p2,p3,....) 142 | 143 | \note Does not add POLYGON text. It is used inside other printing functions 144 | */ 145 | void print_WKT_polygon_2(Polygon_2 plg){ 146 | 147 | 148 | std::cout << "("; 149 | std::vector::iterator v; 150 | for ( v = plg.vertices_begin(); 151 | v != plg.vertices_end()-1; 152 | ++v){ 153 | std::cout << *v << ","; 154 | } 155 | v = plg.vertices_end()-1; //last one with no comma 156 | std::cout << *v << ")"; 157 | 158 | } 159 | 160 | /** 161 | \brief Generates a vector of polygons from a vector of segments 162 | \details First separes the segments in different adjacent groups (that would be the polygons). Then generates a polygon from each of the lists 163 | \param segments an std::vector with CGAL segment_2 164 | \param &polygons INOUT A std::vector with CGAL Polygon_2 165 | */ 166 | void segments_to_polygons(std::vector segments, std::vector< Polygon_2 > &polygons){ 167 | 168 | Segment cs; 169 | bool found = false; 170 | int pid = 0; //polygon id (possible alpha shape with different polygons) 171 | int count = 0; 172 | std::vector osegments [10000]; //initialize at 255. not more 173 | std::vector segments_tmp; 174 | 175 | for(int i = 0; i < segments.size();i++){ 176 | segments_tmp.push_back(segments[i]); 177 | } 178 | 179 | //push a first segment 180 | osegments[pid].push_back(segments_tmp.back()); 181 | segments_tmp.pop_back(); //remove the element 182 | 183 | while(segments_tmp.size() > 0){ 184 | cs = osegments[pid].back(); 185 | found = false; 186 | 187 | for(std::vector::iterator it = segments_tmp.begin(); 188 | !found && it != segments_tmp.end(); 189 | ++it){ 190 | 191 | if (cs.target() == it->source()){ 192 | found = true; 193 | osegments[pid].push_back(*it); 194 | segments_tmp.erase(it); 195 | } 196 | } 197 | 198 | if (!found){ 199 | /*if not found. I assume that there is another polygon. 200 | Increase polygon id (pid) and keep going. 201 | */ 202 | ++pid; 203 | osegments[pid].push_back(segments_tmp.back()); 204 | segments_tmp.pop_back(); 205 | } 206 | } 207 | 208 | for(int i=0;i<10000;i++){ 209 | if(osegments[i].size()==0) break; 210 | Polygon_2 P; 211 | std::vector::iterator it = osegments[i].begin(); 212 | P.push_back(it->source()); //first point 213 | 214 | for(std::vector::iterator it = osegments[i].begin(); it != osegments[i].end();++it){ 215 | P.push_back(it->target()); 216 | } 217 | P.push_back(P[0]); 218 | if (P.size() > 3){ 219 | polygons.push_back(P); 220 | } 221 | } 222 | } 223 | 224 | 225 | //------------------ printing functions ----------------------------- 226 | 227 | void print_help(){ 228 | std::cout << "alpha_shaper -i FILE [-s,-p] [-a A] [-h]" << std::endl; 229 | std::cout < polygons){ 245 | std::vector strings; 246 | std::vector isinsidesomeone; 247 | 248 | //fill the inside booleans 249 | bool inside = false; 250 | for(std::vector::iterator plg = polygons.begin(); plg != polygons.end();++plg){ 251 | inside = false; 252 | for(std::vector::iterator plg2 = polygons.begin(); plg2 != polygons.end();++plg2){ 253 | if(is_inside(*plg2,*plg)) inside = true; 254 | } 255 | isinsidesomeone.push_back(inside); 256 | } 257 | 258 | for(std::vector::iterator plg1 = polygons.begin(); plg1 != polygons.end();++plg1){ 259 | //print the first polygon part 260 | if (isinsidesomeone.at(std::distance(polygons.begin(),plg1))){ 261 | continue; 262 | } 263 | std::cout << "POLYGON("; 264 | print_WKT_polygon_2(*plg1); 265 | 266 | //check for holes, and print them with the polygon 267 | for(std::vector::iterator plg2 = polygons.begin(); plg2 != polygons.end();++plg2){ 268 | 269 | if (is_inside(*plg1,*plg2)){ //if is inside the polygon, is a hole 270 | std::cout << ","; 271 | print_WKT_polygon_2(*plg2); 272 | } 273 | } 274 | std::cout << ")" << std::endl; 275 | } 276 | 277 | } 278 | 279 | /** 280 | * Prints a csv list of the Alpha shape segments 281 | */ 282 | void toWKT_segments(std::vector segments){ 283 | 284 | std::cout << "id;wkt" << std::endl; 285 | int count = 0; 286 | 287 | for(std::vector::iterator it = segments.begin(); it != segments.end();++it){ 288 | std::cout << count << ";" << "LINESTRING(" << it->source() << "," << it->target() << ") " << std::endl; 289 | count++; 290 | } 291 | 292 | } 293 | 294 | void toWKT_vertices(std::vector segments){ 295 | int count = 0; 296 | 297 | std::cout << "id;wkt" << std::endl; 298 | for(std::vector::iterator it = segments.begin(); it != segments.end();++it){ 299 | Point p=(*it)->point(); 300 | std::cout << count << ";" << "POINT(" << p[0] << " " << p[1] << ")" << std::endl; 301 | count++; 302 | } 303 | } 304 | 305 | //------------------ main ------------------------------------------- 306 | 307 | int main(int argc, char* argv[]) 308 | { 309 | //check points flag 310 | bool bpoints = false; 311 | bool bsegments = false; 312 | bool optalpha = false; 313 | char* filename; 314 | float alpha = -1; 315 | 316 | for(int i =0; i < argc; i++){ 317 | if (strcmp(argv[i],"-p")==0) { 318 | bpoints = true; 319 | } 320 | else if (strcmp(argv[i],"-s")==0) { 321 | bsegments = true; 322 | } 323 | if (strcmp(argv[i],"-a") == 0){ 324 | alpha = atof(argv[i+1]); 325 | } 326 | if (strcmp(argv[i],"--optimalalpha") == 0){ 327 | optalpha = true; 328 | } 329 | if (strcmp(argv[i],"-i") == 0){ 330 | filename = argv[i+1]; 331 | } 332 | if (strcmp(argv[i],"-h") == 0){ 333 | print_help(); 334 | return 0; 335 | } 336 | } 337 | 338 | 339 | //File Input 340 | std::list points; 341 | 342 | if(! file_input(std::back_inserter(points),filename)){ 343 | return -1; 344 | } 345 | 346 | //Alpha shape compute 347 | Alpha_shape_2 A(points.begin(), points.end()); 348 | A.set_mode(Alpha_shape_2::GENERAL); 349 | Alpha_iterator opt = A.find_optimal_alpha(1); 350 | 351 | if (alpha != -1){ 352 | A.set_alpha(alpha); 353 | } 354 | else{ 355 | A.set_alpha(*opt); 356 | } 357 | 358 | 359 | std::vector segments; 360 | std::vector vertices; 361 | std::vector< Polygon_2 > polygons; 362 | 363 | alpha_edges( A, std::back_inserter(segments)); 364 | alpha_vertices( A, std::back_inserter(vertices)); 365 | segments_to_polygons(segments, polygons); 366 | 367 | //Fill and print result 368 | if (optalpha){ 369 | std::cout << *opt << std::endl; 370 | return 0; 371 | } 372 | if (bpoints){ 373 | toWKT_vertices(vertices); 374 | } 375 | else if (bsegments){ 376 | toWKT_segments(segments); 377 | } 378 | else{ 379 | toWKT_polygons(polygons); 380 | } 381 | 382 | return 0; 383 | } 384 | -------------------------------------------------------------------------------- /batch_country_dataset_generator.py: -------------------------------------------------------------------------------- 1 | """ 2 | Batch dbpedia country point files generator 3 | \author Jordi Castells 4 | \date 8 December 2016 5 | 6 | A helper tool to split an already downloaded dbpedia csv file into different 7 | smaller files, separed by the second column that is assumed to be a dbo:Country 8 | resource. 9 | 10 | csv file is expected : 11 | name;country;wikipediaURL;x;y;WKT 12 | """ 13 | 14 | 15 | import os 16 | import re 17 | import sys 18 | import csv 19 | import argparse 20 | import signal 21 | import tempfile 22 | import xml, warnings 23 | 24 | import cSpinner 25 | import cPlace 26 | import cReport 27 | import geom_functions as GEOM 28 | 29 | 30 | # ########################### 31 | # 32 | # ARGUMENT PARSING 33 | # 34 | # ########################### 35 | 36 | parser = argparse.ArgumentParser(description='Filter an input dataset into smaller files (by country)') 37 | 38 | 39 | parser.add_argument('--outDir', default=None, dest='outDir',help='Directory where to store the country points outputs') 40 | parser.add_argument('--pointFile', default=None, dest='points',help='input file with points to split in smaller files') 41 | 42 | parser.add_argument('--nospinner', default=False, dest='nospinner',help='Deactivate live feedback via shell. For batch operations', action="store_true") 43 | #parser.add_argument('--country', default=None, dest='countryFilter', help='Filter by country') 44 | 45 | 46 | args = parser.parse_args() 47 | 48 | def slugify(value, allow_unicode=False): 49 | """ 50 | Force a valid filename 51 | """ 52 | import re 53 | value = re.sub("http://dbpedia.org/resource/","",value) 54 | return re.sub(r'[^\x00-\x7F]+','', value) 55 | 56 | # ########################### 57 | # 58 | # INITIALIZATIONS 59 | # 60 | # ########################### 61 | 62 | 63 | #Spinner 64 | S = cSpinner.cSpinner() 65 | if not args.nospinner: 66 | S.start() 67 | 68 | csv.field_size_limit(sys.maxsize) 69 | 70 | def gen_alpha_shape(cgalfile, alpha): 71 | """ 72 | External system execution of alpha_shaper to generate a WKT alpha shape file. 73 | Expects a CGAL file with lon lat corrdinates and the first line an integer 74 | of the total number of lines to read 75 | 76 | returns the well known text of this alpha shape polygons 77 | """ 78 | opt_alpha, wkt_polygons = GEOM.alpha_shape(cgalfile,alpha); 79 | return wkt_polygons.splitlines() 80 | 81 | def finish_program(): 82 | S.stop() 83 | sys.exit(0) 84 | 85 | 86 | def write_file_wkt_csv(wkt_polygons, fileh): 87 | """ 88 | Write a file with wkt polygons 89 | """ 90 | fileh.write("id;wkt\n") 91 | 92 | for i,polygon in enumerate(wkt_polygons): 93 | fileh.write("%s;%s\n" %(i,polygon)) 94 | 95 | def write_file_cgal(places, fileh): 96 | """ 97 | Writes a file to be read by cgal alpha_shape generator from a read 98 | csvDictionary 99 | 100 | returns the number of added points 101 | """ 102 | #Now write the file 103 | fileh.write(str(len(places))+"\n") 104 | for p in places: 105 | fileh.write(p.lon+" "+p.lat+"\n") 106 | 107 | 108 | def read_countries_from_csv(filename): 109 | """ 110 | Reads a CSV points file 111 | "name;WKT;Country;Abstract" 112 | 113 | We read this information apart because reading the whole 114 | file can destroy our memory 115 | """ 116 | data = [] 117 | total = 0 118 | failed = 0 119 | 120 | totalL = sum(1 for line in open(filename)) 121 | with open(filename, 'rb') as csvfile: 122 | preader = csv.DictReader(csvfile, delimiter=';', quotechar='"') 123 | for row in preader: 124 | S.set_msg("Reading Countries: %s/%s. FAILED: %s"%(total,totalL,failed)) 125 | total+=1 126 | 127 | if "http://dbpedia.org/resource/" not in row["country"]: 128 | failed+=1 129 | continue 130 | 131 | if row["country"] not in data: 132 | #country = re.sub("http://dbpedia.org/resource/","", row["country"]) 133 | #country = re.sub("http://dbpedia.org/resource/","", country) 134 | country = row["country"] 135 | data.append(country) 136 | 137 | return data 138 | 139 | 140 | def extract_countries_to_files(filename, outdir, countryNames): 141 | """ 142 | retrieves all the points from a filename that match a countryName 143 | and stores those points to another file 144 | "name;WKT;Country;Abstract" 145 | """ 146 | data = [] 147 | total = 0 148 | fileHandles = {} 149 | 150 | for countryName in countryNames: 151 | fileout = os.path.join(args.outDir, "%s_points.csv" % slugify(countryName)) 152 | handle = open(fileout, 'wb') 153 | handle.write("name;country;wikipediaURL;x;y;WKT\n") 154 | pwriter = csv.writer(handle, delimiter=';', quotechar='"') 155 | fileHandles[countryName] = [handle, pwriter] 156 | 157 | totalL = sum(1 for line in open(filename)) 158 | with open(filename, 'rb') as infile: 159 | preader = csv.DictReader(infile, delimiter=';', quotechar='"') 160 | for row in preader: 161 | S.set_msg("Filtering & splitting %s"% total) 162 | total+=1 163 | if row["country"] in fileHandles.keys(): 164 | #os is the file. 1 is the csv parser 165 | fileHandles[row["country"]][1].writerow([row["name"],row["country"],row["URL"],row["x"],row["y"],row["WKT"]]) 166 | 167 | for name, handle in fileHandles.items(): 168 | handle[0].close() 169 | 170 | def extract_country_to_file(filename, fileout, countryName): 171 | """ 172 | retrieves all the points from a filename that match a countryName 173 | and stores those points to another file 174 | "name;WKT;Country;Abstract" 175 | """ 176 | data = [] 177 | total = 0 178 | with open(filename, 'rb') as infile: 179 | with open(fileout, 'wb') as outfile: 180 | preader = csv.DictReader(infile, delimiter=';', quotechar='"') 181 | pwriter = csv.writer(outfile, delimiter=';', quotechar='"') 182 | for row in preader: 183 | S.set_msg("Filtering %s: %s"%(countryName, total)) 184 | total+=1 185 | if countryName in row["country"]: 186 | pwriter.writerow([row["name"],row["country"],row["URL"],row["x"],row["y"],row["WKT"]]) 187 | 188 | 189 | def get_country_points(filename, countryName): 190 | """ 191 | retrieves all the points from a filename that match a countryName 192 | "name;WKT;country;Abstract" 193 | """ 194 | 195 | data = [] 196 | total = 0 197 | with open(filename, 'rb') as csvfile: 198 | preader = csv.DictReader(csvfile, delimiter=';', quotechar='"') 199 | for row in preader: 200 | S.set_msg("Obtaining %s: %s"%(countryName, total)) 201 | total+=1 202 | if countryName in row["country"]: 203 | data.append(row) 204 | 205 | return data 206 | 207 | def read_points_csv(filename): 208 | """ 209 | Reads a CSV points file 210 | "name;WKT;Country;Abstract" 211 | 212 | Returns a reader object that can be looped returning a dictionary 213 | for each row. 214 | """ 215 | data = [] 216 | with open(filename, 'rb') as csvfile: 217 | preader = csv.DictReader(csvfile, delimiter=';', quotechar='"') 218 | for row in preader: 219 | data.append(row) 220 | 221 | return data 222 | 223 | 224 | def parse_input_to_place(dataList): 225 | """ 226 | Parse the set of readed points from a csv to a list of places @ref cPlace 227 | """ 228 | 229 | places = [] 230 | skipped = [] 231 | 232 | for row in dataList: 233 | wkt = row["WKT"] 234 | match = re.search(".*POINT\(([0-9.-]*) ([0-9.-]*)\)", wkt) 235 | if not match: 236 | skipped.append(row) 237 | else: 238 | place = cPlace.cPlace(row["name"], 239 | match.group(2),match.group(1), 240 | row["Abstract"],row["Country"]) 241 | places.append(place) 242 | 243 | return places,skipped 244 | 245 | # ########################### 246 | # 247 | # SIGNAL HANDLING 248 | # 249 | # ########################### 250 | def kill_handler(signal, frame): 251 | print 'Kill Signal Recieved' 252 | finish_program() 253 | 254 | signal.signal(signal.SIGINT, kill_handler) 255 | 256 | # ########################### 257 | # 258 | # START 259 | # 260 | # ########################### 261 | 262 | #Open Points file 263 | try: 264 | 265 | if not os.path.exists(args.outDir): 266 | os.mkdir(args.outDir) 267 | 268 | S.set_msg("Parsing input") 269 | #CREATE A NICE TEMPFILE for CGAL from the input data 270 | tmpfile = tempfile.NamedTemporaryFile(prefix='vagueplace',delete=True); 271 | 272 | #Can't use this since it's using a lot of memory. This approach was getting 273 | #everything in RAM and then start processing. We have to do something slower 274 | #but less memory hungry 275 | #datain = read_points_csv(args.points) 276 | 277 | 278 | # First get the countries 279 | S.set_msg("Generating country list") 280 | countries = read_countries_from_csv(args.points) 281 | extract_countries_to_files(args.points, args.outDir, countries) 282 | #for country in countries: 283 | # # For each country split the output in different files that we will 284 | # # read one by one to generate the output files 285 | # fileout = os.path.join(args.outDir, "%s_points.csv" % slugify(country)) 286 | # extract_countries_to_files(args.points, fileout, country) 287 | # print 288 | sys.exit(1) 289 | #places, errors = parse_input_to_place(datain) 290 | 291 | #first the whole dataset 292 | #write_file_cgal(places, tmpfile) 293 | 294 | #if not os.path.exists(args.outDir): 295 | # os.mkdir(args.outDir) 296 | 297 | #for alphaVal in args.alphas: 298 | # S.set_msg("Shaping %s" % alphaVal) 299 | # fileName = os.path.join(args.outDir, "alphaShape_%s.csv" % alphaVal) 300 | # with open(fileName, 'wb') as fileh: 301 | # polygons = gen_alpha_shape(tmpfile, alphaVal) 302 | # write_file_wkt_csv(polygons, fileh) 303 | 304 | 305 | #Now country by country 306 | ###data = (p.country for p in places) 307 | ###data = set(data) 308 | ###for c in data: 309 | ### cdata = [] 310 | ### country_points = (p for p in places if p.country == c) 311 | ### for cp in country_points: 312 | ### cdata.append(cp) 313 | 314 | ### tmpfile = tempfile.NamedTemporaryFile(prefix='countryData',delete=True); 315 | ### write_file_cgal(cdata, tmpfile) 316 | 317 | ### for alphaVal in args.alphas: 318 | ### S.set_msg("Shaping %s %s" % (c, alphaVal)) 319 | ### fileName = os.path.join(args.outDir, "alphaShape_%s_%s.csv" % (c, alphaVal)) 320 | ### with open(fileName, 'wb') as fileh: 321 | ### polygons = gen_alpha_shape(tmpfile, alphaVal) 322 | ### write_file_wkt_csv(polygons, fileh) 323 | 324 | 325 | except Exception as e: 326 | print e 327 | finally: 328 | finish_program() 329 | -------------------------------------------------------------------------------- /cPlace.py: -------------------------------------------------------------------------------- 1 | class cPlace(): 2 | """ 3 | Class containing information of a place 4 | \details Entity simply used as a container of information. 5 | """ 6 | 7 | def __init__(self,name,lat,lon,abstract,country): 8 | """ 9 | Class constructor 10 | \param name 11 | \param lat 12 | \param lon 13 | \param abstract 14 | \param country 15 | """ 16 | self.name = name 17 | self.lat = lat 18 | self.lon = lon 19 | self.text = abstract 20 | self.country = country 21 | -------------------------------------------------------------------------------- /cReport.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | 3 | class cReport(): 4 | """ 5 | \brief Report printing class 6 | \details Class to record information about the execution and finally print it. 7 | """ 8 | #__NPOINTS = 0; 9 | __alpha = 1; 10 | __optalpha = 1; 11 | __date = str(datetime.datetime.now()); 12 | __countries = []; 13 | __country_val = []; 14 | __live = False; 15 | __WKTashape = ""; 16 | __WKTchull = ""; 17 | __query = ""; 18 | __ofilename = ""; 19 | 20 | def set_country_count(self,places): 21 | """ 22 | \brief For a set of places, counts the places in each country. 23 | """ 24 | self.__NPOINTS = len(places); 25 | for p in places: 26 | try: 27 | index = self.__countries.index(p.country) 28 | self.__country_val[index] += 1 29 | except: 30 | self.__countries.append(p.country) 31 | self.__country_val.append(1) 32 | 33 | 34 | def __report_str(self): 35 | """ 36 | Generate a String with the report 37 | """ 38 | report_list = [] 39 | report_list.append(self.__print_title()); 40 | 41 | report_list.append(self.__print_banner("DATASET")) 42 | if(self.__live): 43 | report_list.append("DBpedia Live "+str(self.__date)) 44 | else: 45 | report_list.append("DBpedia Last release version") 46 | 47 | report_list.append("QUERY: "+str(self.__query).ljust(20)) 48 | report_list.append("Retrieved Points:\t"+str(self.__NPOINTS).ljust(20)) 49 | report_list.append("Skipped Points:\t"+str(self.__NPOINTS - sum(self.__country_val)).ljust(20)) 50 | report_list.append("FILE:\t"+str(self.__ofilename).ljust(20)) 51 | report_list.append("") 52 | report_list.append("country".rjust(30)+"|".rjust(5)+"total_points".rjust(5)) 53 | 54 | for i,c in enumerate(self.__countries): 55 | report_list.append(str(c).rjust(30)+"|".rjust(5)+str(self.__country_val[i]).rjust(5)) 56 | 57 | 58 | report_list.append(self.__print_banner("GEOMETRIES")) 59 | report_list.append("---- Alpha Shape WKT ---") 60 | report_list.append(self.__WKTashape) 61 | report_list.append("Alpha:"+str(self.__alpha).ljust(20)) 62 | report_list.append("Optimal Alpha: "+str(self.__optalpha).ljust(20)) 63 | report_list.append("") 64 | report_list.append("---- Convex Hull Shape WKT ---") 65 | report_list.append(self.__WKTchull) 66 | report_list.append("") 67 | 68 | return "\n".join(report_list) 69 | 70 | 71 | def print_report(self): 72 | """ 73 | \brief Prints the report to the standart output 74 | """ 75 | print self.__report_str() 76 | 77 | def __print_title(self): 78 | return "\n".join([ 79 | "", 80 | "###########################################", 81 | "# REPORT GENERATED BY vagueplaces.py", 82 | "# "+str(self.__date).center(40), 83 | "#", 84 | "###########################################", 85 | "", 86 | ]) 87 | 88 | def __print_banner(self,text): 89 | return "\n".join([ 90 | "", 91 | "###########################################", 92 | "#", 93 | "#"+str(text).center(40), 94 | "#", 95 | "###########################################", 96 | "", 97 | ]) 98 | 99 | def write_report(self, filename): 100 | """ 101 | \todo Implement write_report to file 102 | """ 103 | try: 104 | with open(filename, "wb") as fileh: 105 | fileh.write(self.__report_str()) 106 | 107 | return True 108 | except Exception as e: 109 | print e 110 | return False 111 | 112 | def set_alphas(self,alpha,optalpha): 113 | """ 114 | \brief Sets the report alpha values 115 | \param alpha used alpha 116 | \param optalpha Optimal alpha 117 | """ 118 | self.__alpha = alpha; 119 | self.__optalpha = optalpha; 120 | 121 | def set_wkt_ashape(self,wkt): 122 | """ 123 | \brief sets the WKT for the alpha shape 124 | """ 125 | self.__WKTashape = wkt; 126 | 127 | def set_wkt_chull(self,wkt): 128 | """ 129 | \brief sets the WKT for the convex hull 130 | """ 131 | self.__WKTchull = wkt; 132 | 133 | def set_query(self,query): 134 | self.__query = query; 135 | 136 | def set_points_filename(self,ofile): 137 | """ 138 | \brief Sets the path to the points file 139 | \param ofile String path 140 | """ 141 | self.__ofilename = ofile; 142 | 143 | def set_live(self,live): 144 | """ 145 | \brief sets if DBpedia live is the used DBpedia version 146 | \param live Boolean 147 | """ 148 | self.__live = live; 149 | -------------------------------------------------------------------------------- /cSpinner.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import threading 3 | import time 4 | 5 | class cSpinner(threading.Thread): 6 | """ 7 | Print information in the same line, giving feedback to the user 8 | \details Prints a spinning text on the screen. Additional text may be attached as extra information. Extends the Thread class 9 | """ 10 | chars = ["\\","|","/","-"] 11 | index = 0 12 | keeprunning = True 13 | paused = False; 14 | msg = "" 15 | 16 | 17 | def run(self): 18 | """ 19 | \brief Start the thread 20 | """ 21 | while self.keeprunning: 22 | if (not self.paused): self.__printing(self.chars[self.index%len(self.chars)]+" "+self.msg) 23 | time.sleep(0.1) 24 | self.index +=1 25 | 26 | self.__printing("") 27 | 28 | def set_msg(self,text): 29 | """ 30 | \brief Set the extra message to print 31 | \param text String to print 32 | """ 33 | self.msg = text; 34 | 35 | def __printing(self,data): 36 | """ 37 | \brief print the information to stdout 38 | """ 39 | sys.stdout.write("\r\x1b[K"+data.__str__()) 40 | sys.stdout.flush() 41 | 42 | def stop(self): 43 | """ 44 | \brief Stop the print thread. 45 | """ 46 | self.keeprunning = False 47 | 48 | def pause(self): 49 | """ 50 | \brief Pause the print thread. 51 | """ 52 | self.paused = True; 53 | 54 | def unpause(self): 55 | """ 56 | \brief continue the print thread. 57 | """ 58 | self.paused = False; 59 | -------------------------------------------------------------------------------- /countrylist.py: -------------------------------------------------------------------------------- 1 | """ 2 | Print the different countries present in a csv file generated by dbpedia extractors 3 | Vagueplaces Generator 4 | \author Jordi Castells 5 | \date 18 December 2016 6 | """ 7 | 8 | 9 | import os 10 | import re 11 | import sys 12 | import csv 13 | import argparse 14 | import signal 15 | import tempfile 16 | import xml, warnings 17 | 18 | import cSpinner 19 | import cPlace 20 | import cReport 21 | import geom_functions as GEOM 22 | 23 | 24 | # ########################### 25 | # 26 | # ARGUMENT PARSING 27 | # 28 | # ########################### 29 | 30 | parser = argparse.ArgumentParser(description='print a country list from a downloaded CSV') 31 | 32 | parser.add_argument('--pointFile', default=None, dest='points',help='input file with points to alpha shape.') 33 | parser.add_argument('--nospinner', default=False, dest='nospinner',help='Deactivate live feedback via shell. For batch operations', action="store_true") 34 | 35 | 36 | args = parser.parse_args() 37 | 38 | def slugify(value, allow_unicode=False): 39 | """ 40 | Force a valid filename 41 | """ 42 | import re 43 | value = re.sub("http://dbpedia.org/resource/","",value) 44 | return re.sub(r'[^\x00-\x7F]+','', value) 45 | 46 | # ########################### 47 | # 48 | # INITIALIZATIONS 49 | # 50 | # ########################### 51 | 52 | 53 | #Spinner 54 | S = cSpinner.cSpinner() 55 | if not args.nospinner: 56 | S.start() 57 | 58 | csv.field_size_limit(sys.maxsize) 59 | 60 | def finish_program(): 61 | S.stop() 62 | sys.exit(0) 63 | 64 | def read_countries_from_csv(filename): 65 | """ 66 | Reads a CSV points file 67 | "name;WKT;Country;Abstract" 68 | 69 | We read this information apart because reading the whole 70 | file can destroy our memory 71 | """ 72 | data = {} 73 | total = 0 74 | failed = 0 75 | 76 | totalL = sum(1 for line in open(filename)) 77 | with open(filename, 'rb') as csvfile: 78 | preader = csv.DictReader(csvfile, delimiter=';', quotechar='"') 79 | for row in preader: 80 | S.set_msg("Reading Countries: %s/%s. FAILED: %s"%(total,totalL,failed)) 81 | total+=1 82 | 83 | #skip incorrectly parsed points 84 | if "http://dbpedia.org/resource/" not in row["country"]: 85 | failed+=1 86 | continue 87 | 88 | if row["country"] not in data: 89 | #country = re.sub("http://dbpedia.org/resource/","", row["country"]) 90 | #country = re.sub("http://dbpedia.org/resource/","", country) 91 | data[row["country"]] = 1 92 | #data.append(country) 93 | else: 94 | data[row["country"]] += 1 95 | 96 | rdata = [] 97 | for key,val in data.iteritems(): 98 | if val > 3: 99 | rdata.append(key) 100 | 101 | return rdata 102 | 103 | 104 | # ########################### 105 | # 106 | # SIGNAL HANDLING 107 | # 108 | # ########################### 109 | def kill_handler(signal, frame): 110 | print 'Kill Signal Recieved' 111 | finish_program() 112 | 113 | signal.signal(signal.SIGINT, kill_handler) 114 | 115 | # ########################### 116 | # 117 | # START 118 | # 119 | # ########################### 120 | 121 | #Open Points file 122 | try: 123 | 124 | S.set_msg("Parsing input") 125 | #CREATE A NICE TEMPFILE for CGAL from the input data 126 | tmpfile = tempfile.NamedTemporaryFile(prefix='vagueplace',delete=True); 127 | 128 | #Can't use this since it's using a lot of memory. This approach was getting 129 | #everything in RAM and then start processing. We have to do something slower 130 | #but less memory hungry 131 | 132 | 133 | # First get the countries 134 | S.set_msg("Generating country list") 135 | countries = read_countries_from_csv(args.points) 136 | for country in countries: 137 | print country 138 | sys.exit(1) 139 | 140 | except Exception as e: 141 | print e 142 | finally: 143 | finish_program() 144 | -------------------------------------------------------------------------------- /doxygen_conf: -------------------------------------------------------------------------------- 1 | # Doxyfile 1.7.6.1 2 | 3 | # This file describes the settings to be used by the documentation system 4 | # doxygen (www.doxygen.org) for a project. 5 | # 6 | # All text after a hash (#) is considered a comment and will be ignored. 7 | # The format is: 8 | # TAG = value [value, ...] 9 | # For lists items can also be appended using: 10 | # TAG += value [value, ...] 11 | # Values that contain spaces should be placed between quotes (" "). 12 | 13 | #--------------------------------------------------------------------------- 14 | # Project related configuration options 15 | #--------------------------------------------------------------------------- 16 | 17 | # This tag specifies the encoding used for all characters in the config file 18 | # that follow. The default is UTF-8 which is also the encoding used for all 19 | # text before the first occurrence of this tag. Doxygen uses libiconv (or the 20 | # iconv built into libc) for the transcoding. See 21 | # http://www.gnu.org/software/libiconv for the list of possible encodings. 22 | 23 | DOXYFILE_ENCODING = UTF-8 24 | 25 | # The PROJECT_NAME tag is a single word (or sequence of words) that should 26 | # identify the project. Note that if you do not use Doxywizard you need 27 | # to put quotes around the project name if it contains spaces. 28 | 29 | PROJECT_NAME = "Vague Places Generator" 30 | 31 | # The PROJECT_NUMBER tag can be used to enter a project or revision number. 32 | # This could be handy for archiving the generated documentation or 33 | # if some version control system is used. 34 | 35 | PROJECT_NUMBER = 36 | 37 | # Using the PROJECT_BRIEF tag one can provide an optional one line description 38 | # for a project that appears at the top of each page and should give viewer 39 | # a quick idea about the purpose of the project. Keep the description short. 40 | 41 | PROJECT_BRIEF = "Generate vague places polygons using DBpedia" 42 | 43 | # With the PROJECT_LOGO tag one can specify an logo or icon that is 44 | # included in the documentation. The maximum height of the logo should not 45 | # exceed 55 pixels and the maximum width should not exceed 200 pixels. 46 | # Doxygen will copy the logo to the output directory. 47 | 48 | PROJECT_LOGO = 49 | 50 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 51 | # base path where the generated documentation will be put. 52 | # If a relative path is entered, it will be relative to the location 53 | # where doxygen was started. If left blank the current directory will be used. 54 | 55 | OUTPUT_DIRECTORY = "doc" 56 | 57 | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 58 | # 4096 sub-directories (in 2 levels) under the output directory of each output 59 | # format and will distribute the generated files over these directories. 60 | # Enabling this option can be useful when feeding doxygen a huge amount of 61 | # source files, where putting all generated files in the same directory would 62 | # otherwise cause performance problems for the file system. 63 | 64 | CREATE_SUBDIRS = NO 65 | 66 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all 67 | # documentation generated by doxygen is written. Doxygen will use this 68 | # information to generate all constant output in the proper language. 69 | # The default language is English, other supported languages are: 70 | # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 71 | # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 72 | # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 73 | # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 74 | # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, 75 | # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. 76 | 77 | OUTPUT_LANGUAGE = English 78 | 79 | # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 80 | # include brief member descriptions after the members that are listed in 81 | # the file and class documentation (similar to JavaDoc). 82 | # Set to NO to disable this. 83 | 84 | BRIEF_MEMBER_DESC = YES 85 | 86 | # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 87 | # the brief description of a member or function before the detailed description. 88 | # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 89 | # brief descriptions will be completely suppressed. 90 | 91 | REPEAT_BRIEF = YES 92 | 93 | # This tag implements a quasi-intelligent brief description abbreviator 94 | # that is used to form the text in various listings. Each string 95 | # in this list, if found as the leading text of the brief description, will be 96 | # stripped from the text and the result after processing the whole list, is 97 | # used as the annotated text. Otherwise, the brief description is used as-is. 98 | # If left blank, the following values are used ("$name" is automatically 99 | # replaced with the name of the entity): "The $name class" "The $name widget" 100 | # "The $name file" "is" "provides" "specifies" "contains" 101 | # "represents" "a" "an" "the" 102 | 103 | ABBREVIATE_BRIEF = 104 | 105 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 106 | # Doxygen will generate a detailed section even if there is only a brief 107 | # description. 108 | 109 | ALWAYS_DETAILED_SEC = NO 110 | 111 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 112 | # inherited members of a class in the documentation of that class as if those 113 | # members were ordinary class members. Constructors, destructors and assignment 114 | # operators of the base classes will not be shown. 115 | 116 | INLINE_INHERITED_MEMB = NO 117 | 118 | # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 119 | # path before files name in the file list and in the header files. If set 120 | # to NO the shortest path that makes the file name unique will be used. 121 | 122 | FULL_PATH_NAMES = YES 123 | 124 | # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 125 | # can be used to strip a user-defined part of the path. Stripping is 126 | # only done if one of the specified strings matches the left-hand part of 127 | # the path. The tag can be used to show relative paths in the file list. 128 | # If left blank the directory from which doxygen is run is used as the 129 | # path to strip. 130 | 131 | STRIP_FROM_PATH = 132 | 133 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 134 | # the path mentioned in the documentation of a class, which tells 135 | # the reader which header file to include in order to use a class. 136 | # If left blank only the name of the header file containing the class 137 | # definition is used. Otherwise one should specify the include paths that 138 | # are normally passed to the compiler using the -I flag. 139 | 140 | STRIP_FROM_INC_PATH = 141 | 142 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 143 | # (but less readable) file names. This can be useful if your file system 144 | # doesn't support long names like on DOS, Mac, or CD-ROM. 145 | 146 | SHORT_NAMES = NO 147 | 148 | # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 149 | # will interpret the first line (until the first dot) of a JavaDoc-style 150 | # comment as the brief description. If set to NO, the JavaDoc 151 | # comments will behave just like regular Qt-style comments 152 | # (thus requiring an explicit @brief command for a brief description.) 153 | 154 | JAVADOC_AUTOBRIEF = NO 155 | 156 | # If the QT_AUTOBRIEF tag is set to YES then Doxygen will 157 | # interpret the first line (until the first dot) of a Qt-style 158 | # comment as the brief description. If set to NO, the comments 159 | # will behave just like regular Qt-style comments (thus requiring 160 | # an explicit \brief command for a brief description.) 161 | 162 | QT_AUTOBRIEF = NO 163 | 164 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 165 | # treat a multi-line C++ special comment block (i.e. a block of //! or /// 166 | # comments) as a brief description. This used to be the default behaviour. 167 | # The new default is to treat a multi-line C++ comment block as a detailed 168 | # description. Set this tag to YES if you prefer the old behaviour instead. 169 | 170 | MULTILINE_CPP_IS_BRIEF = NO 171 | 172 | # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 173 | # member inherits the documentation from any documented member that it 174 | # re-implements. 175 | 176 | INHERIT_DOCS = YES 177 | 178 | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 179 | # a new page for each member. If set to NO, the documentation of a member will 180 | # be part of the file/class/namespace that contains it. 181 | 182 | SEPARATE_MEMBER_PAGES = NO 183 | 184 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. 185 | # Doxygen uses this value to replace tabs by spaces in code fragments. 186 | 187 | TAB_SIZE = 8 188 | 189 | # This tag can be used to specify a number of aliases that acts 190 | # as commands in the documentation. An alias has the form "name=value". 191 | # For example adding "sideeffect=\par Side Effects:\n" will allow you to 192 | # put the command \sideeffect (or @sideeffect) in the documentation, which 193 | # will result in a user-defined paragraph with heading "Side Effects:". 194 | # You can put \n's in the value part of an alias to insert newlines. 195 | 196 | ALIASES = 197 | 198 | # This tag can be used to specify a number of word-keyword mappings (TCL only). 199 | # A mapping has the form "name=value". For example adding 200 | # "class=itcl::class" will allow you to use the command class in the 201 | # itcl::class meaning. 202 | 203 | TCL_SUBST = 204 | 205 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 206 | # sources only. Doxygen will then generate output that is more tailored for C. 207 | # For instance, some of the names that are used will be different. The list 208 | # of all members will be omitted, etc. 209 | 210 | OPTIMIZE_OUTPUT_FOR_C = NO 211 | 212 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 213 | # sources only. Doxygen will then generate output that is more tailored for 214 | # Java. For instance, namespaces will be presented as packages, qualified 215 | # scopes will look different, etc. 216 | 217 | OPTIMIZE_OUTPUT_JAVA = YES 218 | 219 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 220 | # sources only. Doxygen will then generate output that is more tailored for 221 | # Fortran. 222 | 223 | OPTIMIZE_FOR_FORTRAN = NO 224 | 225 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 226 | # sources. Doxygen will then generate output that is tailored for 227 | # VHDL. 228 | 229 | OPTIMIZE_OUTPUT_VHDL = NO 230 | 231 | # Doxygen selects the parser to use depending on the extension of the files it 232 | # parses. With this tag you can assign which parser to use for a given extension. 233 | # Doxygen has a built-in mapping, but you can override or extend it using this 234 | # tag. The format is ext=language, where ext is a file extension, and language 235 | # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, 236 | # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make 237 | # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 238 | # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions 239 | # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. 240 | 241 | EXTENSION_MAPPING = 242 | 243 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 244 | # to include (a tag file for) the STL sources as input, then you should 245 | # set this tag to YES in order to let doxygen match functions declarations and 246 | # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 247 | # func(std::string) {}). This also makes the inheritance and collaboration 248 | # diagrams that involve STL classes more complete and accurate. 249 | 250 | BUILTIN_STL_SUPPORT = NO 251 | 252 | # If you use Microsoft's C++/CLI language, you should set this option to YES to 253 | # enable parsing support. 254 | 255 | CPP_CLI_SUPPORT = NO 256 | 257 | # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 258 | # Doxygen will parse them like normal C++ but will assume all classes use public 259 | # instead of private inheritance when no explicit protection keyword is present. 260 | 261 | SIP_SUPPORT = NO 262 | 263 | # For Microsoft's IDL there are propget and propput attributes to indicate getter 264 | # and setter methods for a property. Setting this option to YES (the default) 265 | # will make doxygen replace the get and set methods by a property in the 266 | # documentation. This will only work if the methods are indeed getting or 267 | # setting a simple type. If this is not the case, or you want to show the 268 | # methods anyway, you should set this option to NO. 269 | 270 | IDL_PROPERTY_SUPPORT = YES 271 | 272 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 273 | # tag is set to YES, then doxygen will reuse the documentation of the first 274 | # member in the group (if any) for the other members of the group. By default 275 | # all members of a group must be documented explicitly. 276 | 277 | DISTRIBUTE_GROUP_DOC = NO 278 | 279 | # Set the SUBGROUPING tag to YES (the default) to allow class member groups of 280 | # the same type (for instance a group of public functions) to be put as a 281 | # subgroup of that type (e.g. under the Public Functions section). Set it to 282 | # NO to prevent subgrouping. Alternatively, this can be done per class using 283 | # the \nosubgrouping command. 284 | 285 | SUBGROUPING = YES 286 | 287 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and 288 | # unions are shown inside the group in which they are included (e.g. using 289 | # @ingroup) instead of on a separate page (for HTML and Man pages) or 290 | # section (for LaTeX and RTF). 291 | 292 | INLINE_GROUPED_CLASSES = NO 293 | 294 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and 295 | # unions with only public data fields will be shown inline in the documentation 296 | # of the scope in which they are defined (i.e. file, namespace, or group 297 | # documentation), provided this scope is documented. If set to NO (the default), 298 | # structs, classes, and unions are shown on a separate page (for HTML and Man 299 | # pages) or section (for LaTeX and RTF). 300 | 301 | INLINE_SIMPLE_STRUCTS = NO 302 | 303 | # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 304 | # is documented as struct, union, or enum with the name of the typedef. So 305 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct 306 | # with name TypeT. When disabled the typedef will appear as a member of a file, 307 | # namespace, or class. And the struct will be named TypeS. This can typically 308 | # be useful for C code in case the coding convention dictates that all compound 309 | # types are typedef'ed and only the typedef is referenced, never the tag name. 310 | 311 | TYPEDEF_HIDES_STRUCT = NO 312 | 313 | # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 314 | # determine which symbols to keep in memory and which to flush to disk. 315 | # When the cache is full, less often used symbols will be written to disk. 316 | # For small to medium size projects (<1000 input files) the default value is 317 | # probably good enough. For larger projects a too small cache size can cause 318 | # doxygen to be busy swapping symbols to and from disk most of the time 319 | # causing a significant performance penalty. 320 | # If the system has enough physical memory increasing the cache will improve the 321 | # performance by keeping more symbols in memory. Note that the value works on 322 | # a logarithmic scale so increasing the size by one will roughly double the 323 | # memory usage. The cache size is given by this formula: 324 | # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 325 | # corresponding to a cache size of 2^16 = 65536 symbols. 326 | 327 | SYMBOL_CACHE_SIZE = 0 328 | 329 | # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be 330 | # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given 331 | # their name and scope. Since this can be an expensive process and often the 332 | # same symbol appear multiple times in the code, doxygen keeps a cache of 333 | # pre-resolved symbols. If the cache is too small doxygen will become slower. 334 | # If the cache is too large, memory is wasted. The cache size is given by this 335 | # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, 336 | # corresponding to a cache size of 2^16 = 65536 symbols. 337 | 338 | LOOKUP_CACHE_SIZE = 0 339 | 340 | #--------------------------------------------------------------------------- 341 | # Build related configuration options 342 | #--------------------------------------------------------------------------- 343 | 344 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 345 | # documentation are documented, even if no documentation was available. 346 | # Private class members and static file members will be hidden unless 347 | # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES 348 | 349 | EXTRACT_ALL = YES 350 | 351 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class 352 | # will be included in the documentation. 353 | 354 | EXTRACT_PRIVATE = NO 355 | 356 | # If the EXTRACT_STATIC tag is set to YES all static members of a file 357 | # will be included in the documentation. 358 | 359 | EXTRACT_STATIC = NO 360 | 361 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 362 | # defined locally in source files will be included in the documentation. 363 | # If set to NO only classes defined in header files are included. 364 | 365 | EXTRACT_LOCAL_CLASSES = YES 366 | 367 | # This flag is only useful for Objective-C code. When set to YES local 368 | # methods, which are defined in the implementation section but not in 369 | # the interface are included in the documentation. 370 | # If set to NO (the default) only methods in the interface are included. 371 | 372 | EXTRACT_LOCAL_METHODS = NO 373 | 374 | # If this flag is set to YES, the members of anonymous namespaces will be 375 | # extracted and appear in the documentation as a namespace called 376 | # 'anonymous_namespace{file}', where file will be replaced with the base 377 | # name of the file that contains the anonymous namespace. By default 378 | # anonymous namespaces are hidden. 379 | 380 | EXTRACT_ANON_NSPACES = NO 381 | 382 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 383 | # undocumented members of documented classes, files or namespaces. 384 | # If set to NO (the default) these members will be included in the 385 | # various overviews, but no documentation section is generated. 386 | # This option has no effect if EXTRACT_ALL is enabled. 387 | 388 | HIDE_UNDOC_MEMBERS = NO 389 | 390 | # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 391 | # undocumented classes that are normally visible in the class hierarchy. 392 | # If set to NO (the default) these classes will be included in the various 393 | # overviews. This option has no effect if EXTRACT_ALL is enabled. 394 | 395 | HIDE_UNDOC_CLASSES = NO 396 | 397 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 398 | # friend (class|struct|union) declarations. 399 | # If set to NO (the default) these declarations will be included in the 400 | # documentation. 401 | 402 | HIDE_FRIEND_COMPOUNDS = NO 403 | 404 | # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 405 | # documentation blocks found inside the body of a function. 406 | # If set to NO (the default) these blocks will be appended to the 407 | # function's detailed documentation block. 408 | 409 | HIDE_IN_BODY_DOCS = NO 410 | 411 | # The INTERNAL_DOCS tag determines if documentation 412 | # that is typed after a \internal command is included. If the tag is set 413 | # to NO (the default) then the documentation will be excluded. 414 | # Set it to YES to include the internal documentation. 415 | 416 | INTERNAL_DOCS = NO 417 | 418 | # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 419 | # file names in lower-case letters. If set to YES upper-case letters are also 420 | # allowed. This is useful if you have classes or files whose names only differ 421 | # in case and if your file system supports case sensitive file names. Windows 422 | # and Mac users are advised to set this option to NO. 423 | 424 | CASE_SENSE_NAMES = YES 425 | 426 | # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 427 | # will show members with their full class and namespace scopes in the 428 | # documentation. If set to YES the scope will be hidden. 429 | 430 | HIDE_SCOPE_NAMES = NO 431 | 432 | # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 433 | # will put a list of the files that are included by a file in the documentation 434 | # of that file. 435 | 436 | SHOW_INCLUDE_FILES = YES 437 | 438 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 439 | # will list include files with double quotes in the documentation 440 | # rather than with sharp brackets. 441 | 442 | FORCE_LOCAL_INCLUDES = NO 443 | 444 | # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 445 | # is inserted in the documentation for inline members. 446 | 447 | INLINE_INFO = YES 448 | 449 | # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 450 | # will sort the (detailed) documentation of file and class members 451 | # alphabetically by member name. If set to NO the members will appear in 452 | # declaration order. 453 | 454 | SORT_MEMBER_DOCS = YES 455 | 456 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 457 | # brief documentation of file, namespace and class members alphabetically 458 | # by member name. If set to NO (the default) the members will appear in 459 | # declaration order. 460 | 461 | SORT_BRIEF_DOCS = NO 462 | 463 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 464 | # will sort the (brief and detailed) documentation of class members so that 465 | # constructors and destructors are listed first. If set to NO (the default) 466 | # the constructors will appear in the respective orders defined by 467 | # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 468 | # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 469 | # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. 470 | 471 | SORT_MEMBERS_CTORS_1ST = NO 472 | 473 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 474 | # hierarchy of group names into alphabetical order. If set to NO (the default) 475 | # the group names will appear in their defined order. 476 | 477 | SORT_GROUP_NAMES = NO 478 | 479 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 480 | # sorted by fully-qualified names, including namespaces. If set to 481 | # NO (the default), the class list will be sorted only by class name, 482 | # not including the namespace part. 483 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 484 | # Note: This option applies only to the class list, not to the 485 | # alphabetical list. 486 | 487 | SORT_BY_SCOPE_NAME = NO 488 | 489 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to 490 | # do proper type resolution of all parameters of a function it will reject a 491 | # match between the prototype and the implementation of a member function even 492 | # if there is only one candidate or it is obvious which candidate to choose 493 | # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen 494 | # will still accept a match between prototype and implementation in such cases. 495 | 496 | STRICT_PROTO_MATCHING = NO 497 | 498 | # The GENERATE_TODOLIST tag can be used to enable (YES) or 499 | # disable (NO) the todo list. This list is created by putting \todo 500 | # commands in the documentation. 501 | 502 | GENERATE_TODOLIST = YES 503 | 504 | # The GENERATE_TESTLIST tag can be used to enable (YES) or 505 | # disable (NO) the test list. This list is created by putting \test 506 | # commands in the documentation. 507 | 508 | GENERATE_TESTLIST = YES 509 | 510 | # The GENERATE_BUGLIST tag can be used to enable (YES) or 511 | # disable (NO) the bug list. This list is created by putting \bug 512 | # commands in the documentation. 513 | 514 | GENERATE_BUGLIST = YES 515 | 516 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 517 | # disable (NO) the deprecated list. This list is created by putting 518 | # \deprecated commands in the documentation. 519 | 520 | GENERATE_DEPRECATEDLIST= YES 521 | 522 | # The ENABLED_SECTIONS tag can be used to enable conditional 523 | # documentation sections, marked by \if sectionname ... \endif. 524 | 525 | ENABLED_SECTIONS = 526 | 527 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines 528 | # the initial value of a variable or macro consists of for it to appear in 529 | # the documentation. If the initializer consists of more lines than specified 530 | # here it will be hidden. Use a value of 0 to hide initializers completely. 531 | # The appearance of the initializer of individual variables and macros in the 532 | # documentation can be controlled using \showinitializer or \hideinitializer 533 | # command in the documentation regardless of this setting. 534 | 535 | MAX_INITIALIZER_LINES = 30 536 | 537 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated 538 | # at the bottom of the documentation of classes and structs. If set to YES the 539 | # list will mention the files that were used to generate the documentation. 540 | 541 | SHOW_USED_FILES = YES 542 | 543 | # If the sources in your project are distributed over multiple directories 544 | # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 545 | # in the documentation. The default is NO. 546 | 547 | SHOW_DIRECTORIES = NO 548 | 549 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. 550 | # This will remove the Files entry from the Quick Index and from the 551 | # Folder Tree View (if specified). The default is YES. 552 | 553 | SHOW_FILES = YES 554 | 555 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the 556 | # Namespaces page. 557 | # This will remove the Namespaces entry from the Quick Index 558 | # and from the Folder Tree View (if specified). The default is YES. 559 | 560 | SHOW_NAMESPACES = YES 561 | 562 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that 563 | # doxygen should invoke to get the current version for each file (typically from 564 | # the version control system). Doxygen will invoke the program by executing (via 565 | # popen()) the command , where is the value of 566 | # the FILE_VERSION_FILTER tag, and is the name of an input file 567 | # provided by doxygen. Whatever the program writes to standard output 568 | # is used as the file version. See the manual for examples. 569 | 570 | FILE_VERSION_FILTER = 571 | 572 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 573 | # by doxygen. The layout file controls the global structure of the generated 574 | # output files in an output format independent way. The create the layout file 575 | # that represents doxygen's defaults, run doxygen with the -l option. 576 | # You can optionally specify a file name after the option, if omitted 577 | # DoxygenLayout.xml will be used as the name of the layout file. 578 | 579 | LAYOUT_FILE = 580 | 581 | # The CITE_BIB_FILES tag can be used to specify one or more bib files 582 | # containing the references data. This must be a list of .bib files. The 583 | # .bib extension is automatically appended if omitted. Using this command 584 | # requires the bibtex tool to be installed. See also 585 | # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style 586 | # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this 587 | # feature you need bibtex and perl available in the search path. 588 | 589 | CITE_BIB_FILES = 590 | 591 | #--------------------------------------------------------------------------- 592 | # configuration options related to warning and progress messages 593 | #--------------------------------------------------------------------------- 594 | 595 | # The QUIET tag can be used to turn on/off the messages that are generated 596 | # by doxygen. Possible values are YES and NO. If left blank NO is used. 597 | 598 | QUIET = NO 599 | 600 | # The WARNINGS tag can be used to turn on/off the warning messages that are 601 | # generated by doxygen. Possible values are YES and NO. If left blank 602 | # NO is used. 603 | 604 | WARNINGS = YES 605 | 606 | # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 607 | # for undocumented members. If EXTRACT_ALL is set to YES then this flag will 608 | # automatically be disabled. 609 | 610 | WARN_IF_UNDOCUMENTED = YES 611 | 612 | # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 613 | # potential errors in the documentation, such as not documenting some 614 | # parameters in a documented function, or documenting parameters that 615 | # don't exist or using markup commands wrongly. 616 | 617 | WARN_IF_DOC_ERROR = YES 618 | 619 | # The WARN_NO_PARAMDOC option can be enabled to get warnings for 620 | # functions that are documented, but have no documentation for their parameters 621 | # or return value. If set to NO (the default) doxygen will only warn about 622 | # wrong or incomplete parameter documentation, but not about the absence of 623 | # documentation. 624 | 625 | WARN_NO_PARAMDOC = NO 626 | 627 | # The WARN_FORMAT tag determines the format of the warning messages that 628 | # doxygen can produce. The string should contain the $file, $line, and $text 629 | # tags, which will be replaced by the file and line number from which the 630 | # warning originated and the warning text. Optionally the format may contain 631 | # $version, which will be replaced by the version of the file (if it could 632 | # be obtained via FILE_VERSION_FILTER) 633 | 634 | WARN_FORMAT = "$file:$line: $text" 635 | 636 | # The WARN_LOGFILE tag can be used to specify a file to which warning 637 | # and error messages should be written. If left blank the output is written 638 | # to stderr. 639 | 640 | WARN_LOGFILE = 641 | 642 | #--------------------------------------------------------------------------- 643 | # configuration options related to the input files 644 | #--------------------------------------------------------------------------- 645 | 646 | # The INPUT tag can be used to specify the files and/or directories that contain 647 | # documented source files. You may enter file names like "myfile.cpp" or 648 | # directories like "/usr/src/myproject". Separate the files or directories 649 | # with spaces. 650 | 651 | INPUT = . ./alpha_shape/main.cpp 652 | 653 | # This tag can be used to specify the character encoding of the source files 654 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 655 | # also the default input encoding. Doxygen uses libiconv (or the iconv built 656 | # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 657 | # the list of possible encodings. 658 | 659 | INPUT_ENCODING = UTF-8 660 | 661 | # If the value of the INPUT tag contains directories, you can use the 662 | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 663 | # and *.h) to filter out the source-files in the directories. If left 664 | # blank the following patterns are tested: 665 | # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh 666 | # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py 667 | # *.f90 *.f *.for *.vhd *.vhdl 668 | 669 | FILE_PATTERNS = 670 | 671 | # The RECURSIVE tag can be used to turn specify whether or not subdirectories 672 | # should be searched for input files as well. Possible values are YES and NO. 673 | # If left blank NO is used. 674 | 675 | RECURSIVE = NO 676 | 677 | # The EXCLUDE tag can be used to specify files and/or directories that should be 678 | # excluded from the INPUT source files. This way you can easily exclude a 679 | # subdirectory from a directory tree whose root is specified with the INPUT tag. 680 | # Note that relative paths are relative to the directory from which doxygen is 681 | # run. 682 | 683 | EXCLUDE = alldbpediapoints.py 684 | 685 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 686 | # directories that are symbolic links (a Unix file system feature) are excluded 687 | # from the input. 688 | 689 | EXCLUDE_SYMLINKS = NO 690 | 691 | # If the value of the INPUT tag contains directories, you can use the 692 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 693 | # certain files from those directories. Note that the wildcards are matched 694 | # against the file with absolute path, so to exclude all test directories 695 | # for example use the pattern */test/* 696 | 697 | EXCLUDE_PATTERNS = 698 | 699 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 700 | # (namespaces, classes, functions, etc.) that should be excluded from the 701 | # output. The symbol name can be a fully qualified name, a word, or if the 702 | # wildcard * is used, a substring. Examples: ANamespace, AClass, 703 | # AClass::ANamespace, ANamespace::*Test 704 | 705 | EXCLUDE_SYMBOLS = 706 | 707 | # The EXAMPLE_PATH tag can be used to specify one or more files or 708 | # directories that contain example code fragments that are included (see 709 | # the \include command). 710 | 711 | EXAMPLE_PATH = 712 | 713 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the 714 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 715 | # and *.h) to filter out the source-files in the directories. If left 716 | # blank all files are included. 717 | 718 | EXAMPLE_PATTERNS = 719 | 720 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 721 | # searched for input files to be used with the \include or \dontinclude 722 | # commands irrespective of the value of the RECURSIVE tag. 723 | # Possible values are YES and NO. If left blank NO is used. 724 | 725 | EXAMPLE_RECURSIVE = NO 726 | 727 | # The IMAGE_PATH tag can be used to specify one or more files or 728 | # directories that contain image that are included in the documentation (see 729 | # the \image command). 730 | 731 | IMAGE_PATH = 732 | 733 | # The INPUT_FILTER tag can be used to specify a program that doxygen should 734 | # invoke to filter for each input file. Doxygen will invoke the filter program 735 | # by executing (via popen()) the command , where 736 | # is the value of the INPUT_FILTER tag, and is the name of an 737 | # input file. Doxygen will then use the output that the filter program writes 738 | # to standard output. 739 | # If FILTER_PATTERNS is specified, this tag will be 740 | # ignored. 741 | 742 | INPUT_FILTER = "python /usr/local/bin/doxypy.py" 743 | 744 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 745 | # basis. 746 | # Doxygen will compare the file name with each pattern and apply the 747 | # filter if there is a match. 748 | # The filters are a list of the form: 749 | # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 750 | # info on how filters are used. If FILTER_PATTERNS is empty or if 751 | # non of the patterns match the file name, INPUT_FILTER is applied. 752 | 753 | FILTER_PATTERNS = 754 | 755 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 756 | # INPUT_FILTER) will be used to filter the input files when producing source 757 | # files to browse (i.e. when SOURCE_BROWSER is set to YES). 758 | 759 | FILTER_SOURCE_FILES = YES 760 | 761 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 762 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any) 763 | # and it is also possible to disable source filtering for a specific pattern 764 | # using *.ext= (so without naming a filter). This option only has effect when 765 | # FILTER_SOURCE_FILES is enabled. 766 | 767 | FILTER_SOURCE_PATTERNS = 768 | 769 | #--------------------------------------------------------------------------- 770 | # configuration options related to source browsing 771 | #--------------------------------------------------------------------------- 772 | 773 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will 774 | # be generated. Documented entities will be cross-referenced with these sources. 775 | # Note: To get rid of all source code in the generated output, make sure also 776 | # VERBATIM_HEADERS is set to NO. 777 | 778 | SOURCE_BROWSER = YES 779 | 780 | # Setting the INLINE_SOURCES tag to YES will include the body 781 | # of functions and classes directly in the documentation. 782 | 783 | INLINE_SOURCES = NO 784 | 785 | # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 786 | # doxygen to hide any special comment blocks from generated source code 787 | # fragments. Normal C and C++ comments will always remain visible. 788 | 789 | STRIP_CODE_COMMENTS = YES 790 | 791 | # If the REFERENCED_BY_RELATION tag is set to YES 792 | # then for each documented function all documented 793 | # functions referencing it will be listed. 794 | 795 | REFERENCED_BY_RELATION = NO 796 | 797 | # If the REFERENCES_RELATION tag is set to YES 798 | # then for each documented function all documented entities 799 | # called/used by that function will be listed. 800 | 801 | REFERENCES_RELATION = NO 802 | 803 | # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 804 | # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 805 | # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 806 | # link to the source code. 807 | # Otherwise they will link to the documentation. 808 | 809 | REFERENCES_LINK_SOURCE = YES 810 | 811 | # If the USE_HTAGS tag is set to YES then the references to source code 812 | # will point to the HTML generated by the htags(1) tool instead of doxygen 813 | # built-in source browser. The htags tool is part of GNU's global source 814 | # tagging system (see http://www.gnu.org/software/global/global.html). You 815 | # will need version 4.8.6 or higher. 816 | 817 | USE_HTAGS = NO 818 | 819 | # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 820 | # will generate a verbatim copy of the header file for each class for 821 | # which an include is specified. Set to NO to disable this. 822 | 823 | VERBATIM_HEADERS = YES 824 | 825 | #--------------------------------------------------------------------------- 826 | # configuration options related to the alphabetical class index 827 | #--------------------------------------------------------------------------- 828 | 829 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 830 | # of all compounds will be generated. Enable this if the project 831 | # contains a lot of classes, structs, unions or interfaces. 832 | 833 | ALPHABETICAL_INDEX = YES 834 | 835 | # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 836 | # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 837 | # in which this list will be split (can be a number in the range [1..20]) 838 | 839 | COLS_IN_ALPHA_INDEX = 5 840 | 841 | # In case all classes in a project start with a common prefix, all 842 | # classes will be put under the same header in the alphabetical index. 843 | # The IGNORE_PREFIX tag can be used to specify one or more prefixes that 844 | # should be ignored while generating the index headers. 845 | 846 | IGNORE_PREFIX = 847 | 848 | #--------------------------------------------------------------------------- 849 | # configuration options related to the HTML output 850 | #--------------------------------------------------------------------------- 851 | 852 | # If the GENERATE_HTML tag is set to YES (the default) Doxygen will 853 | # generate HTML output. 854 | 855 | GENERATE_HTML = YES 856 | 857 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 858 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 859 | # put in front of it. If left blank `html' will be used as the default path. 860 | 861 | HTML_OUTPUT = html 862 | 863 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for 864 | # each generated HTML page (for example: .htm,.php,.asp). If it is left blank 865 | # doxygen will generate files with .html extension. 866 | 867 | HTML_FILE_EXTENSION = .html 868 | 869 | # The HTML_HEADER tag can be used to specify a personal HTML header for 870 | # each generated HTML page. If it is left blank doxygen will generate a 871 | # standard header. Note that when using a custom header you are responsible 872 | # for the proper inclusion of any scripts and style sheets that doxygen 873 | # needs, which is dependent on the configuration options used. 874 | # It is advised to generate a default header using "doxygen -w html 875 | # header.html footer.html stylesheet.css YourConfigFile" and then modify 876 | # that header. Note that the header is subject to change so you typically 877 | # have to redo this when upgrading to a newer version of doxygen or when 878 | # changing the value of configuration settings such as GENERATE_TREEVIEW! 879 | 880 | HTML_HEADER = 881 | 882 | # The HTML_FOOTER tag can be used to specify a personal HTML footer for 883 | # each generated HTML page. If it is left blank doxygen will generate a 884 | # standard footer. 885 | 886 | HTML_FOOTER = 887 | 888 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading 889 | # style sheet that is used by each HTML page. It can be used to 890 | # fine-tune the look of the HTML output. If the tag is left blank doxygen 891 | # will generate a default style sheet. Note that doxygen will try to copy 892 | # the style sheet file to the HTML output directory, so don't put your own 893 | # style sheet in the HTML output directory as well, or it will be erased! 894 | 895 | HTML_STYLESHEET = 896 | 897 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 898 | # other source files which should be copied to the HTML output directory. Note 899 | # that these files will be copied to the base HTML output directory. Use the 900 | # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 901 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that 902 | # the files will be copied as-is; there are no commands or markers available. 903 | 904 | HTML_EXTRA_FILES = 905 | 906 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 907 | # Doxygen will adjust the colors in the style sheet and background images 908 | # according to this color. Hue is specified as an angle on a colorwheel, 909 | # see http://en.wikipedia.org/wiki/Hue for more information. 910 | # For instance the value 0 represents red, 60 is yellow, 120 is green, 911 | # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 912 | # The allowed range is 0 to 359. 913 | 914 | HTML_COLORSTYLE_HUE = 220 915 | 916 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 917 | # the colors in the HTML output. For a value of 0 the output will use 918 | # grayscales only. A value of 255 will produce the most vivid colors. 919 | 920 | HTML_COLORSTYLE_SAT = 100 921 | 922 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 923 | # the luminance component of the colors in the HTML output. Values below 924 | # 100 gradually make the output lighter, whereas values above 100 make 925 | # the output darker. The value divided by 100 is the actual gamma applied, 926 | # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 927 | # and 100 does not change the gamma. 928 | 929 | HTML_COLORSTYLE_GAMMA = 80 930 | 931 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 932 | # page will contain the date and time when the page was generated. Setting 933 | # this to NO can help when comparing the output of multiple runs. 934 | 935 | HTML_TIMESTAMP = YES 936 | 937 | # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 938 | # files or namespaces will be aligned in HTML using tables. If set to 939 | # NO a bullet list will be used. 940 | 941 | HTML_ALIGN_MEMBERS = YES 942 | 943 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 944 | # documentation will contain sections that can be hidden and shown after the 945 | # page has loaded. For this to work a browser that supports 946 | # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 947 | # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). 948 | 949 | HTML_DYNAMIC_SECTIONS = YES 950 | 951 | # If the GENERATE_DOCSET tag is set to YES, additional index files 952 | # will be generated that can be used as input for Apple's Xcode 3 953 | # integrated development environment, introduced with OSX 10.5 (Leopard). 954 | # To create a documentation set, doxygen will generate a Makefile in the 955 | # HTML output directory. Running make will produce the docset in that 956 | # directory and running "make install" will install the docset in 957 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 958 | # it at startup. 959 | # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 960 | # for more information. 961 | 962 | GENERATE_DOCSET = NO 963 | 964 | # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 965 | # feed. A documentation feed provides an umbrella under which multiple 966 | # documentation sets from a single provider (such as a company or product suite) 967 | # can be grouped. 968 | 969 | DOCSET_FEEDNAME = "VaguePlaces: Doxygen generated docs" 970 | 971 | # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 972 | # should uniquely identify the documentation set bundle. This should be a 973 | # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 974 | # will append .docset to the name. 975 | 976 | DOCSET_BUNDLE_ID = org.doxygen.Project 977 | 978 | # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify 979 | # the documentation publisher. This should be a reverse domain-name style 980 | # string, e.g. com.mycompany.MyDocSet.documentation. 981 | 982 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher 983 | 984 | # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. 985 | 986 | DOCSET_PUBLISHER_NAME = Publisher 987 | 988 | # If the GENERATE_HTMLHELP tag is set to YES, additional index files 989 | # will be generated that can be used as input for tools like the 990 | # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 991 | # of the generated HTML documentation. 992 | 993 | GENERATE_HTMLHELP = NO 994 | 995 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 996 | # be used to specify the file name of the resulting .chm file. You 997 | # can add a path in front of the file if the result should not be 998 | # written to the html output directory. 999 | 1000 | CHM_FILE = 1001 | 1002 | # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 1003 | # be used to specify the location (absolute path including file name) of 1004 | # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 1005 | # the HTML help compiler on the generated index.hhp. 1006 | 1007 | HHC_LOCATION = 1008 | 1009 | # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 1010 | # controls if a separate .chi index file is generated (YES) or that 1011 | # it should be included in the master .chm file (NO). 1012 | 1013 | GENERATE_CHI = NO 1014 | 1015 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 1016 | # is used to encode HtmlHelp index (hhk), content (hhc) and project file 1017 | # content. 1018 | 1019 | CHM_INDEX_ENCODING = 1020 | 1021 | # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 1022 | # controls whether a binary table of contents is generated (YES) or a 1023 | # normal table of contents (NO) in the .chm file. 1024 | 1025 | BINARY_TOC = NO 1026 | 1027 | # The TOC_EXPAND flag can be set to YES to add extra items for group members 1028 | # to the contents of the HTML help documentation and to the tree view. 1029 | 1030 | TOC_EXPAND = NO 1031 | 1032 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 1033 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 1034 | # that can be used as input for Qt's qhelpgenerator to generate a 1035 | # Qt Compressed Help (.qch) of the generated HTML documentation. 1036 | 1037 | GENERATE_QHP = NO 1038 | 1039 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can 1040 | # be used to specify the file name of the resulting .qch file. 1041 | # The path specified is relative to the HTML output folder. 1042 | 1043 | QCH_FILE = 1044 | 1045 | # The QHP_NAMESPACE tag specifies the namespace to use when generating 1046 | # Qt Help Project output. For more information please see 1047 | # http://doc.trolltech.com/qthelpproject.html#namespace 1048 | 1049 | QHP_NAMESPACE = org.doxygen.Project 1050 | 1051 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 1052 | # Qt Help Project output. For more information please see 1053 | # http://doc.trolltech.com/qthelpproject.html#virtual-folders 1054 | 1055 | QHP_VIRTUAL_FOLDER = doc 1056 | 1057 | # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 1058 | # add. For more information please see 1059 | # http://doc.trolltech.com/qthelpproject.html#custom-filters 1060 | 1061 | QHP_CUST_FILTER_NAME = 1062 | 1063 | # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 1064 | # custom filter to add. For more information please see 1065 | # 1066 | # Qt Help Project / Custom Filters. 1067 | 1068 | QHP_CUST_FILTER_ATTRS = 1069 | 1070 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 1071 | # project's 1072 | # filter section matches. 1073 | # 1074 | # Qt Help Project / Filter Attributes. 1075 | 1076 | QHP_SECT_FILTER_ATTRS = 1077 | 1078 | # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 1079 | # be used to specify the location of Qt's qhelpgenerator. 1080 | # If non-empty doxygen will try to run qhelpgenerator on the generated 1081 | # .qhp file. 1082 | 1083 | QHG_LOCATION = 1084 | 1085 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files 1086 | # will be generated, which together with the HTML files, form an Eclipse help 1087 | # plugin. To install this plugin and make it available under the help contents 1088 | # menu in Eclipse, the contents of the directory containing the HTML and XML 1089 | # files needs to be copied into the plugins directory of eclipse. The name of 1090 | # the directory within the plugins directory should be the same as 1091 | # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 1092 | # the help appears. 1093 | 1094 | GENERATE_ECLIPSEHELP = NO 1095 | 1096 | # A unique identifier for the eclipse help plugin. When installing the plugin 1097 | # the directory name containing the HTML and XML files should also have 1098 | # this name. 1099 | 1100 | ECLIPSE_DOC_ID = org.doxygen.Project 1101 | 1102 | # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) 1103 | # at top of each HTML page. The value NO (the default) enables the index and 1104 | # the value YES disables it. Since the tabs have the same information as the 1105 | # navigation tree you can set this option to NO if you already set 1106 | # GENERATE_TREEVIEW to YES. 1107 | 1108 | DISABLE_INDEX = NO 1109 | 1110 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 1111 | # structure should be generated to display hierarchical information. 1112 | # If the tag value is set to YES, a side panel will be generated 1113 | # containing a tree-like index structure (just like the one that 1114 | # is generated for HTML Help). For this to work a browser that supports 1115 | # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 1116 | # Windows users are probably better off using the HTML help feature. 1117 | # Since the tree basically has the same information as the tab index you 1118 | # could consider to set DISABLE_INDEX to NO when enabling this option. 1119 | 1120 | GENERATE_TREEVIEW = NO 1121 | 1122 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 1123 | # (range [0,1..20]) that doxygen will group on one line in the generated HTML 1124 | # documentation. Note that a value of 0 will completely suppress the enum 1125 | # values from appearing in the overview section. 1126 | 1127 | ENUM_VALUES_PER_LINE = 4 1128 | 1129 | # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 1130 | # and Class Hierarchy pages using a tree view instead of an ordered list. 1131 | 1132 | USE_INLINE_TREES = NO 1133 | 1134 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 1135 | # used to set the initial width (in pixels) of the frame in which the tree 1136 | # is shown. 1137 | 1138 | TREEVIEW_WIDTH = 250 1139 | 1140 | # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 1141 | # links to external symbols imported via tag files in a separate window. 1142 | 1143 | EXT_LINKS_IN_WINDOW = NO 1144 | 1145 | # Use this tag to change the font size of Latex formulas included 1146 | # as images in the HTML documentation. The default is 10. Note that 1147 | # when you change the font size after a successful doxygen run you need 1148 | # to manually remove any form_*.png images from the HTML output directory 1149 | # to force them to be regenerated. 1150 | 1151 | FORMULA_FONTSIZE = 10 1152 | 1153 | # Use the FORMULA_TRANPARENT tag to determine whether or not the images 1154 | # generated for formulas are transparent PNGs. Transparent PNGs are 1155 | # not supported properly for IE 6.0, but are supported on all modern browsers. 1156 | # Note that when changing this option you need to delete any form_*.png files 1157 | # in the HTML output before the changes have effect. 1158 | 1159 | FORMULA_TRANSPARENT = YES 1160 | 1161 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax 1162 | # (see http://www.mathjax.org) which uses client side Javascript for the 1163 | # rendering instead of using prerendered bitmaps. Use this if you do not 1164 | # have LaTeX installed or if you want to formulas look prettier in the HTML 1165 | # output. When enabled you also need to install MathJax separately and 1166 | # configure the path to it using the MATHJAX_RELPATH option. 1167 | 1168 | USE_MATHJAX = NO 1169 | 1170 | # When MathJax is enabled you need to specify the location relative to the 1171 | # HTML output directory using the MATHJAX_RELPATH option. The destination 1172 | # directory should contain the MathJax.js script. For instance, if the mathjax 1173 | # directory is located at the same level as the HTML output directory, then 1174 | # MATHJAX_RELPATH should be ../mathjax. The default value points to the 1175 | # mathjax.org site, so you can quickly see the result without installing 1176 | # MathJax, but it is strongly recommended to install a local copy of MathJax 1177 | # before deployment. 1178 | 1179 | MATHJAX_RELPATH = http://www.mathjax.org/mathjax 1180 | 1181 | # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension 1182 | # names that should be enabled during MathJax rendering. 1183 | 1184 | MATHJAX_EXTENSIONS = 1185 | 1186 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box 1187 | # for the HTML output. The underlying search engine uses javascript 1188 | # and DHTML and should work on any modern browser. Note that when using 1189 | # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 1190 | # (GENERATE_DOCSET) there is already a search function so this one should 1191 | # typically be disabled. For large projects the javascript based search engine 1192 | # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. 1193 | 1194 | SEARCHENGINE = YES 1195 | 1196 | # When the SERVER_BASED_SEARCH tag is enabled the search engine will be 1197 | # implemented using a PHP enabled web server instead of at the web client 1198 | # using Javascript. Doxygen will generate the search PHP script and index 1199 | # file to put on the web server. The advantage of the server 1200 | # based approach is that it scales better to large projects and allows 1201 | # full text search. The disadvantages are that it is more difficult to setup 1202 | # and does not have live searching capabilities. 1203 | 1204 | SERVER_BASED_SEARCH = NO 1205 | 1206 | #--------------------------------------------------------------------------- 1207 | # configuration options related to the LaTeX output 1208 | #--------------------------------------------------------------------------- 1209 | 1210 | # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 1211 | # generate Latex output. 1212 | 1213 | GENERATE_LATEX = YES 1214 | 1215 | # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 1216 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1217 | # put in front of it. If left blank `latex' will be used as the default path. 1218 | 1219 | LATEX_OUTPUT = latex 1220 | 1221 | # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 1222 | # invoked. If left blank `latex' will be used as the default command name. 1223 | # Note that when enabling USE_PDFLATEX this option is only used for 1224 | # generating bitmaps for formulas in the HTML output, but not in the 1225 | # Makefile that is written to the output directory. 1226 | 1227 | LATEX_CMD_NAME = latex 1228 | 1229 | # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 1230 | # generate index for LaTeX. If left blank `makeindex' will be used as the 1231 | # default command name. 1232 | 1233 | MAKEINDEX_CMD_NAME = makeindex 1234 | 1235 | # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 1236 | # LaTeX documents. This may be useful for small projects and may help to 1237 | # save some trees in general. 1238 | 1239 | COMPACT_LATEX = NO 1240 | 1241 | # The PAPER_TYPE tag can be used to set the paper type that is used 1242 | # by the printer. Possible values are: a4, letter, legal and 1243 | # executive. If left blank a4wide will be used. 1244 | 1245 | PAPER_TYPE = a4 1246 | 1247 | # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 1248 | # packages that should be included in the LaTeX output. 1249 | 1250 | EXTRA_PACKAGES = 1251 | 1252 | # The LATEX_HEADER tag can be used to specify a personal LaTeX header for 1253 | # the generated latex document. The header should contain everything until 1254 | # the first chapter. If it is left blank doxygen will generate a 1255 | # standard header. Notice: only use this tag if you know what you are doing! 1256 | 1257 | LATEX_HEADER = 1258 | 1259 | # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for 1260 | # the generated latex document. The footer should contain everything after 1261 | # the last chapter. If it is left blank doxygen will generate a 1262 | # standard footer. Notice: only use this tag if you know what you are doing! 1263 | 1264 | LATEX_FOOTER = 1265 | 1266 | # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 1267 | # is prepared for conversion to pdf (using ps2pdf). The pdf file will 1268 | # contain links (just like the HTML output) instead of page references 1269 | # This makes the output suitable for online browsing using a pdf viewer. 1270 | 1271 | PDF_HYPERLINKS = YES 1272 | 1273 | # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 1274 | # plain latex in the generated Makefile. Set this option to YES to get a 1275 | # higher quality PDF documentation. 1276 | 1277 | USE_PDFLATEX = YES 1278 | 1279 | # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 1280 | # command to the generated LaTeX files. This will instruct LaTeX to keep 1281 | # running if errors occur, instead of asking the user for help. 1282 | # This option is also used when generating formulas in HTML. 1283 | 1284 | LATEX_BATCHMODE = NO 1285 | 1286 | # If LATEX_HIDE_INDICES is set to YES then doxygen will not 1287 | # include the index chapters (such as File Index, Compound Index, etc.) 1288 | # in the output. 1289 | 1290 | LATEX_HIDE_INDICES = NO 1291 | 1292 | # If LATEX_SOURCE_CODE is set to YES then doxygen will include 1293 | # source code with syntax highlighting in the LaTeX output. 1294 | # Note that which sources are shown also depends on other settings 1295 | # such as SOURCE_BROWSER. 1296 | 1297 | LATEX_SOURCE_CODE = NO 1298 | 1299 | # The LATEX_BIB_STYLE tag can be used to specify the style to use for the 1300 | # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See 1301 | # http://en.wikipedia.org/wiki/BibTeX for more info. 1302 | 1303 | LATEX_BIB_STYLE = plain 1304 | 1305 | #--------------------------------------------------------------------------- 1306 | # configuration options related to the RTF output 1307 | #--------------------------------------------------------------------------- 1308 | 1309 | # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 1310 | # The RTF output is optimized for Word 97 and may not look very pretty with 1311 | # other RTF readers or editors. 1312 | 1313 | GENERATE_RTF = NO 1314 | 1315 | # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 1316 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1317 | # put in front of it. If left blank `rtf' will be used as the default path. 1318 | 1319 | RTF_OUTPUT = rtf 1320 | 1321 | # If the COMPACT_RTF tag is set to YES Doxygen generates more compact 1322 | # RTF documents. This may be useful for small projects and may help to 1323 | # save some trees in general. 1324 | 1325 | COMPACT_RTF = NO 1326 | 1327 | # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 1328 | # will contain hyperlink fields. The RTF file will 1329 | # contain links (just like the HTML output) instead of page references. 1330 | # This makes the output suitable for online browsing using WORD or other 1331 | # programs which support those fields. 1332 | # Note: wordpad (write) and others do not support links. 1333 | 1334 | RTF_HYPERLINKS = NO 1335 | 1336 | # Load style sheet definitions from file. Syntax is similar to doxygen's 1337 | # config file, i.e. a series of assignments. You only have to provide 1338 | # replacements, missing definitions are set to their default value. 1339 | 1340 | RTF_STYLESHEET_FILE = 1341 | 1342 | # Set optional variables used in the generation of an rtf document. 1343 | # Syntax is similar to doxygen's config file. 1344 | 1345 | RTF_EXTENSIONS_FILE = 1346 | 1347 | #--------------------------------------------------------------------------- 1348 | # configuration options related to the man page output 1349 | #--------------------------------------------------------------------------- 1350 | 1351 | # If the GENERATE_MAN tag is set to YES (the default) Doxygen will 1352 | # generate man pages 1353 | 1354 | GENERATE_MAN = NO 1355 | 1356 | # The MAN_OUTPUT tag is used to specify where the man pages will be put. 1357 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1358 | # put in front of it. If left blank `man' will be used as the default path. 1359 | 1360 | MAN_OUTPUT = man 1361 | 1362 | # The MAN_EXTENSION tag determines the extension that is added to 1363 | # the generated man pages (default is the subroutine's section .3) 1364 | 1365 | MAN_EXTENSION = .3 1366 | 1367 | # If the MAN_LINKS tag is set to YES and Doxygen generates man output, 1368 | # then it will generate one additional man file for each entity 1369 | # documented in the real man page(s). These additional files 1370 | # only source the real man page, but without them the man command 1371 | # would be unable to find the correct page. The default is NO. 1372 | 1373 | MAN_LINKS = NO 1374 | 1375 | #--------------------------------------------------------------------------- 1376 | # configuration options related to the XML output 1377 | #--------------------------------------------------------------------------- 1378 | 1379 | # If the GENERATE_XML tag is set to YES Doxygen will 1380 | # generate an XML file that captures the structure of 1381 | # the code including all documentation. 1382 | 1383 | GENERATE_XML = NO 1384 | 1385 | # The XML_OUTPUT tag is used to specify where the XML pages will be put. 1386 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1387 | # put in front of it. If left blank `xml' will be used as the default path. 1388 | 1389 | XML_OUTPUT = xml 1390 | 1391 | # The XML_SCHEMA tag can be used to specify an XML schema, 1392 | # which can be used by a validating XML parser to check the 1393 | # syntax of the XML files. 1394 | 1395 | XML_SCHEMA = 1396 | 1397 | # The XML_DTD tag can be used to specify an XML DTD, 1398 | # which can be used by a validating XML parser to check the 1399 | # syntax of the XML files. 1400 | 1401 | XML_DTD = 1402 | 1403 | # If the XML_PROGRAMLISTING tag is set to YES Doxygen will 1404 | # dump the program listings (including syntax highlighting 1405 | # and cross-referencing information) to the XML output. Note that 1406 | # enabling this will significantly increase the size of the XML output. 1407 | 1408 | XML_PROGRAMLISTING = YES 1409 | 1410 | #--------------------------------------------------------------------------- 1411 | # configuration options for the AutoGen Definitions output 1412 | #--------------------------------------------------------------------------- 1413 | 1414 | # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 1415 | # generate an AutoGen Definitions (see autogen.sf.net) file 1416 | # that captures the structure of the code including all 1417 | # documentation. Note that this feature is still experimental 1418 | # and incomplete at the moment. 1419 | 1420 | GENERATE_AUTOGEN_DEF = NO 1421 | 1422 | #--------------------------------------------------------------------------- 1423 | # configuration options related to the Perl module output 1424 | #--------------------------------------------------------------------------- 1425 | 1426 | # If the GENERATE_PERLMOD tag is set to YES Doxygen will 1427 | # generate a Perl module file that captures the structure of 1428 | # the code including all documentation. Note that this 1429 | # feature is still experimental and incomplete at the 1430 | # moment. 1431 | 1432 | GENERATE_PERLMOD = NO 1433 | 1434 | # If the PERLMOD_LATEX tag is set to YES Doxygen will generate 1435 | # the necessary Makefile rules, Perl scripts and LaTeX code to be able 1436 | # to generate PDF and DVI output from the Perl module output. 1437 | 1438 | PERLMOD_LATEX = NO 1439 | 1440 | # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 1441 | # nicely formatted so it can be parsed by a human reader. 1442 | # This is useful 1443 | # if you want to understand what is going on. 1444 | # On the other hand, if this 1445 | # tag is set to NO the size of the Perl module output will be much smaller 1446 | # and Perl will parse it just the same. 1447 | 1448 | PERLMOD_PRETTY = YES 1449 | 1450 | # The names of the make variables in the generated doxyrules.make file 1451 | # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 1452 | # This is useful so different doxyrules.make files included by the same 1453 | # Makefile don't overwrite each other's variables. 1454 | 1455 | PERLMOD_MAKEVAR_PREFIX = 1456 | 1457 | #--------------------------------------------------------------------------- 1458 | # Configuration options related to the preprocessor 1459 | #--------------------------------------------------------------------------- 1460 | 1461 | # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 1462 | # evaluate all C-preprocessor directives found in the sources and include 1463 | # files. 1464 | 1465 | ENABLE_PREPROCESSING = YES 1466 | 1467 | # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 1468 | # names in the source code. If set to NO (the default) only conditional 1469 | # compilation will be performed. Macro expansion can be done in a controlled 1470 | # way by setting EXPAND_ONLY_PREDEF to YES. 1471 | 1472 | MACRO_EXPANSION = NO 1473 | 1474 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 1475 | # then the macro expansion is limited to the macros specified with the 1476 | # PREDEFINED and EXPAND_AS_DEFINED tags. 1477 | 1478 | EXPAND_ONLY_PREDEF = NO 1479 | 1480 | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 1481 | # pointed to by INCLUDE_PATH will be searched when a #include is found. 1482 | 1483 | SEARCH_INCLUDES = YES 1484 | 1485 | # The INCLUDE_PATH tag can be used to specify one or more directories that 1486 | # contain include files that are not input files but should be processed by 1487 | # the preprocessor. 1488 | 1489 | INCLUDE_PATH = 1490 | 1491 | # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 1492 | # patterns (like *.h and *.hpp) to filter out the header-files in the 1493 | # directories. If left blank, the patterns specified with FILE_PATTERNS will 1494 | # be used. 1495 | 1496 | INCLUDE_FILE_PATTERNS = 1497 | 1498 | # The PREDEFINED tag can be used to specify one or more macro names that 1499 | # are defined before the preprocessor is started (similar to the -D option of 1500 | # gcc). The argument of the tag is a list of macros of the form: name 1501 | # or name=definition (no spaces). If the definition and the = are 1502 | # omitted =1 is assumed. To prevent a macro definition from being 1503 | # undefined via #undef or recursively expanded use the := operator 1504 | # instead of the = operator. 1505 | 1506 | PREDEFINED = 1507 | 1508 | # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 1509 | # this tag can be used to specify a list of macro names that should be expanded. 1510 | # The macro definition that is found in the sources will be used. 1511 | # Use the PREDEFINED tag if you want to use a different macro definition that 1512 | # overrules the definition found in the source code. 1513 | 1514 | EXPAND_AS_DEFINED = 1515 | 1516 | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 1517 | # doxygen's preprocessor will remove all references to function-like macros 1518 | # that are alone on a line, have an all uppercase name, and do not end with a 1519 | # semicolon, because these will confuse the parser if not removed. 1520 | 1521 | SKIP_FUNCTION_MACROS = YES 1522 | 1523 | #--------------------------------------------------------------------------- 1524 | # Configuration::additions related to external references 1525 | #--------------------------------------------------------------------------- 1526 | 1527 | # The TAGFILES option can be used to specify one or more tagfiles. 1528 | # Optionally an initial location of the external documentation 1529 | # can be added for each tagfile. The format of a tag file without 1530 | # this location is as follows: 1531 | # 1532 | # TAGFILES = file1 file2 ... 1533 | # Adding location for the tag files is done as follows: 1534 | # 1535 | # TAGFILES = file1=loc1 "file2 = loc2" ... 1536 | # where "loc1" and "loc2" can be relative or absolute paths or 1537 | # URLs. If a location is present for each tag, the installdox tool 1538 | # does not have to be run to correct the links. 1539 | # Note that each tag file must have a unique name 1540 | # (where the name does NOT include the path) 1541 | # If a tag file is not located in the directory in which doxygen 1542 | # is run, you must also specify the path to the tagfile here. 1543 | 1544 | TAGFILES = 1545 | 1546 | # When a file name is specified after GENERATE_TAGFILE, doxygen will create 1547 | # a tag file that is based on the input files it reads. 1548 | 1549 | GENERATE_TAGFILE = 1550 | 1551 | # If the ALLEXTERNALS tag is set to YES all external classes will be listed 1552 | # in the class index. If set to NO only the inherited external classes 1553 | # will be listed. 1554 | 1555 | ALLEXTERNALS = NO 1556 | 1557 | # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 1558 | # in the modules index. If set to NO, only the current project's groups will 1559 | # be listed. 1560 | 1561 | EXTERNAL_GROUPS = YES 1562 | 1563 | # The PERL_PATH should be the absolute path and name of the perl script 1564 | # interpreter (i.e. the result of `which perl'). 1565 | 1566 | PERL_PATH = /usr/bin/perl 1567 | 1568 | #--------------------------------------------------------------------------- 1569 | # Configuration options related to the dot tool 1570 | #--------------------------------------------------------------------------- 1571 | 1572 | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 1573 | # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 1574 | # or super classes. Setting the tag to NO turns the diagrams off. Note that 1575 | # this option also works with HAVE_DOT disabled, but it is recommended to 1576 | # install and use dot, since it yields more powerful graphs. 1577 | 1578 | CLASS_DIAGRAMS = YES 1579 | 1580 | # You can define message sequence charts within doxygen comments using the \msc 1581 | # command. Doxygen will then run the mscgen tool (see 1582 | # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 1583 | # documentation. The MSCGEN_PATH tag allows you to specify the directory where 1584 | # the mscgen tool resides. If left empty the tool is assumed to be found in the 1585 | # default search path. 1586 | 1587 | MSCGEN_PATH = 1588 | 1589 | # If set to YES, the inheritance and collaboration graphs will hide 1590 | # inheritance and usage relations if the target is undocumented 1591 | # or is not a class. 1592 | 1593 | HIDE_UNDOC_RELATIONS = YES 1594 | 1595 | # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 1596 | # available from the path. This tool is part of Graphviz, a graph visualization 1597 | # toolkit from AT&T and Lucent Bell Labs. The other options in this section 1598 | # have no effect if this option is set to NO (the default) 1599 | 1600 | HAVE_DOT = NO 1601 | 1602 | # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 1603 | # allowed to run in parallel. When set to 0 (the default) doxygen will 1604 | # base this on the number of processors available in the system. You can set it 1605 | # explicitly to a value larger than 0 to get control over the balance 1606 | # between CPU load and processing speed. 1607 | 1608 | DOT_NUM_THREADS = 0 1609 | 1610 | # By default doxygen will use the Helvetica font for all dot files that 1611 | # doxygen generates. When you want a differently looking font you can specify 1612 | # the font name using DOT_FONTNAME. You need to make sure dot is able to find 1613 | # the font, which can be done by putting it in a standard location or by setting 1614 | # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the 1615 | # directory containing the font. 1616 | 1617 | DOT_FONTNAME = Helvetica 1618 | 1619 | # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 1620 | # The default size is 10pt. 1621 | 1622 | DOT_FONTSIZE = 10 1623 | 1624 | # By default doxygen will tell dot to use the Helvetica font. 1625 | # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to 1626 | # set the path where dot can find it. 1627 | 1628 | DOT_FONTPATH = 1629 | 1630 | # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 1631 | # will generate a graph for each documented class showing the direct and 1632 | # indirect inheritance relations. Setting this tag to YES will force the 1633 | # CLASS_DIAGRAMS tag to NO. 1634 | 1635 | CLASS_GRAPH = YES 1636 | 1637 | # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 1638 | # will generate a graph for each documented class showing the direct and 1639 | # indirect implementation dependencies (inheritance, containment, and 1640 | # class references variables) of the class with other documented classes. 1641 | 1642 | COLLABORATION_GRAPH = YES 1643 | 1644 | # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 1645 | # will generate a graph for groups, showing the direct groups dependencies 1646 | 1647 | GROUP_GRAPHS = YES 1648 | 1649 | # If the UML_LOOK tag is set to YES doxygen will generate inheritance and 1650 | # collaboration diagrams in a style similar to the OMG's Unified Modeling 1651 | # Language. 1652 | 1653 | UML_LOOK = NO 1654 | 1655 | # If set to YES, the inheritance and collaboration graphs will show the 1656 | # relations between templates and their instances. 1657 | 1658 | TEMPLATE_RELATIONS = NO 1659 | 1660 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 1661 | # tags are set to YES then doxygen will generate a graph for each documented 1662 | # file showing the direct and indirect include dependencies of the file with 1663 | # other documented files. 1664 | 1665 | INCLUDE_GRAPH = YES 1666 | 1667 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 1668 | # HAVE_DOT tags are set to YES then doxygen will generate a graph for each 1669 | # documented header file showing the documented files that directly or 1670 | # indirectly include this file. 1671 | 1672 | INCLUDED_BY_GRAPH = YES 1673 | 1674 | # If the CALL_GRAPH and HAVE_DOT options are set to YES then 1675 | # doxygen will generate a call dependency graph for every global function 1676 | # or class method. Note that enabling this option will significantly increase 1677 | # the time of a run. So in most cases it will be better to enable call graphs 1678 | # for selected functions only using the \callgraph command. 1679 | 1680 | CALL_GRAPH = NO 1681 | 1682 | # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 1683 | # doxygen will generate a caller dependency graph for every global function 1684 | # or class method. Note that enabling this option will significantly increase 1685 | # the time of a run. So in most cases it will be better to enable caller 1686 | # graphs for selected functions only using the \callergraph command. 1687 | 1688 | CALLER_GRAPH = NO 1689 | 1690 | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 1691 | # will generate a graphical hierarchy of all classes instead of a textual one. 1692 | 1693 | GRAPHICAL_HIERARCHY = YES 1694 | 1695 | # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 1696 | # then doxygen will show the dependencies a directory has on other directories 1697 | # in a graphical way. The dependency relations are determined by the #include 1698 | # relations between the files in the directories. 1699 | 1700 | DIRECTORY_GRAPH = YES 1701 | 1702 | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 1703 | # generated by dot. Possible values are svg, png, jpg, or gif. 1704 | # If left blank png will be used. If you choose svg you need to set 1705 | # HTML_FILE_EXTENSION to xhtml in order to make the SVG files 1706 | # visible in IE 9+ (other browsers do not have this requirement). 1707 | 1708 | DOT_IMAGE_FORMAT = png 1709 | 1710 | # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to 1711 | # enable generation of interactive SVG images that allow zooming and panning. 1712 | # Note that this requires a modern browser other than Internet Explorer. 1713 | # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you 1714 | # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files 1715 | # visible. Older versions of IE do not have SVG support. 1716 | 1717 | INTERACTIVE_SVG = NO 1718 | 1719 | # The tag DOT_PATH can be used to specify the path where the dot tool can be 1720 | # found. If left blank, it is assumed the dot tool can be found in the path. 1721 | 1722 | DOT_PATH = 1723 | 1724 | # The DOTFILE_DIRS tag can be used to specify one or more directories that 1725 | # contain dot files that are included in the documentation (see the 1726 | # \dotfile command). 1727 | 1728 | DOTFILE_DIRS = 1729 | 1730 | # The MSCFILE_DIRS tag can be used to specify one or more directories that 1731 | # contain msc files that are included in the documentation (see the 1732 | # \mscfile command). 1733 | 1734 | MSCFILE_DIRS = 1735 | 1736 | # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 1737 | # nodes that will be shown in the graph. If the number of nodes in a graph 1738 | # becomes larger than this value, doxygen will truncate the graph, which is 1739 | # visualized by representing a node as a red box. Note that doxygen if the 1740 | # number of direct children of the root node in a graph is already larger than 1741 | # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 1742 | # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. 1743 | 1744 | DOT_GRAPH_MAX_NODES = 50 1745 | 1746 | # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 1747 | # graphs generated by dot. A depth value of 3 means that only nodes reachable 1748 | # from the root by following a path via at most 3 edges will be shown. Nodes 1749 | # that lay further from the root node will be omitted. Note that setting this 1750 | # option to 1 or 2 may greatly reduce the computation time needed for large 1751 | # code bases. Also note that the size of a graph can be further restricted by 1752 | # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. 1753 | 1754 | MAX_DOT_GRAPH_DEPTH = 0 1755 | 1756 | # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 1757 | # background. This is disabled by default, because dot on Windows does not 1758 | # seem to support this out of the box. Warning: Depending on the platform used, 1759 | # enabling this option may lead to badly anti-aliased labels on the edges of 1760 | # a graph (i.e. they become hard to read). 1761 | 1762 | DOT_TRANSPARENT = NO 1763 | 1764 | # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 1765 | # files in one run (i.e. multiple -o and -T options on the command line). This 1766 | # makes dot run faster, but since only newer versions of dot (>1.8.10) 1767 | # support this, this feature is disabled by default. 1768 | 1769 | DOT_MULTI_TARGETS = YES 1770 | 1771 | # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 1772 | # generate a legend page explaining the meaning of the various boxes and 1773 | # arrows in the dot generated graphs. 1774 | 1775 | GENERATE_LEGEND = YES 1776 | 1777 | # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 1778 | # remove the intermediate dot files that are used to generate 1779 | # the various graphs. 1780 | 1781 | DOT_CLEANUP = YES 1782 | -------------------------------------------------------------------------------- /geom_functions.py: -------------------------------------------------------------------------------- 1 | from shapely.geometry import MultiPoint 2 | import os 3 | import subprocess 4 | 5 | def convex_hull(latlon_list): 6 | """ 7 | Generates the convex hull of a latlon list of tuples 8 | [(lat0,lon0),(lat1,lon1),...(latN,lonN)] 9 | """ 10 | return MultiPoint(latlon_list).convex_hull.wkt 11 | 12 | def alpha_shape(cgalfile,alpha): 13 | """ 14 | External system execution of alpha_shaper to generate a WKT alpha shape file. 15 | Expects a CGAL file with lon lat corrdinates and the first line an integer 16 | of the total number of lines to read 17 | """ 18 | expath = os.path.join(os.path.dirname(os.path.realpath(__file__)),"alpha_shape/alpha_shaper"); 19 | filpath = os.path.realpath(cgalfile.name); 20 | 21 | try: 22 | wkt_polygons = subprocess.check_output([expath,"-i",filpath,"-a",str(alpha)]) 23 | opt_alpha = subprocess.check_output([expath,"-i",filpath,"--optimalalpha"]) 24 | except: 25 | wkt_polygons = "Error Executing:"+str(expath)+" -i "+filpath+" -a "+str(alpha); 26 | alpha = 0 27 | opt_alpha = 0 28 | 29 | return (opt_alpha,wkt_polygons) 30 | 31 | -------------------------------------------------------------------------------- /vagueplaces.py: -------------------------------------------------------------------------------- 1 | """ 2 | Vagueplaces Generator 3 | \author Jordi Castells 4 | \date 10 August 2012 5 | \mainpage 6 | 7 | This software is implemented as a Final project of a Geoinformatics Master course at ITC Faculty of Geo-Information Science and Earth Observation. 8 | 9 | """ 10 | 11 | from SPARQLWrapper import SPARQLWrapper, SPARQLExceptions, JSON 12 | import argparse 13 | import signal 14 | import os 15 | import sys 16 | import tempfile 17 | import xml, warnings 18 | 19 | import cSpinner 20 | import cPlace 21 | import cReport 22 | import geom_functions as GEOM 23 | 24 | 25 | # ########################### 26 | # 27 | # ARGUMENT PARSING 28 | # 29 | # ########################### 30 | 31 | parser = argparse.ArgumentParser(description='Retrieve dbpedia points and generate their alpha shape') 32 | 33 | parser.add_argument('--query', action='store', dest='stringval', default=None,nargs='+', 34 | help='List of keywords to filter from the Abstract results. Interpreted as Logical disjunction') 35 | 36 | parser.add_argument('--alpha',type=float,default=0.1,dest='floatval') 37 | 38 | parser.add_argument('--reportFile', default=None, dest='reportFile',help='Store report to a file instead that StdOut') 39 | 40 | parser.add_argument('CSV_POINT_OUTPUT', type=argparse.FileType('wb', 0), 41 | help='Retrieved points file out as CSV.') 42 | 43 | parser.add_argument('--live', action='store_true',default=False, 44 | dest='live_bool', 45 | help='Use Dbpedia live SPARQL endpoint instead of last released version') 46 | 47 | parser.add_argument('--verbose', action='store_true', default=False, 48 | dest='debug_bool', 49 | help='Verbose output') 50 | 51 | arguments = parser.parse_args() 52 | 53 | 54 | # ########################### 55 | # 56 | # INITIALIZATIONS 57 | # 58 | # ########################### 59 | query_list = arguments.stringval 60 | OF = arguments.CSV_POINT_OUTPUT 61 | alpha = arguments.floatval 62 | isdebug = arguments.debug_bool 63 | islive = arguments.live_bool 64 | RESULTS_QUERY = 500000 65 | PLACES = [] 66 | 67 | #sparql endpoint 68 | if islive: 69 | #sparql = SPARQLWrapper("http://live.dbpedia.org/sparql") 70 | sparql = SPARQLWrapper("http://dbpedia-live.openlinksw.com/sparql") 71 | else: 72 | sparql = SPARQLWrapper("http://dbpedia.org/sparql") 73 | 74 | #Spinner 75 | S = cSpinner.cSpinner() 76 | S.set_msg("loading") 77 | S.start() 78 | 79 | #report 80 | REPORT = cReport.cReport(); 81 | REPORT.set_query(str(query_list)); 82 | REPORT.set_points_filename(os.path.realpath(str(OF.name))); 83 | 84 | # ########################### 85 | # 86 | # FUNCTIONS 87 | # 88 | # ########################### 89 | def european_countries(): 90 | """ 91 | Retrieve an europe country list from DBpedia with URIs. 92 | @return List with country URIS 93 | """ 94 | sparql.setReturnFormat(JSON) 95 | 96 | sparql.setQuery(""" 97 | PREFIX rdf: 98 | PREFIX yago: 99 | PREFIX dbo: 100 | 101 | SELECT DISTINCT ?place WHERE { 102 | ?place rdf:type yago:EuropeanCountries . 103 | ?place rdf:type dbo:Country 104 | } 105 | """ 106 | ) 107 | 108 | results = sparql.query().convert() 109 | 110 | if not isinstance(results, dict): 111 | warnings.warn("Parsing Failure. Not a dictionary") 112 | finish_program() 113 | 114 | return results["results"]["bindings"] 115 | 116 | def get_points(country_uri,query_list,offset,limit): 117 | """ 118 | Retrieve a list of points from DBpedia matching the input. 119 | \param country_uri country to query 120 | \param query_list substring to check in the Abstract 121 | \param offset Offset to start retrieving 122 | \param limit Limit of lines to retrieve 123 | \return List with points with title,geolat,geolong 124 | """ 125 | regex_list = [] 126 | for q in query_list: 127 | regex_list.append("""regex(?abstract,\" """+str(q)+"""\","i") """) 128 | 129 | query = "||".join(regex_list) 130 | 131 | querystr = """ 132 | SELECT DISTINCT ?title,?geolat,?geolong 133 | WHERE{ 134 | ?place rdf:type dbo:Place . 135 | ?place dbo:country <""" + country_uri + """> . 136 | ?place foaf:name ?title . 137 | ?place geo:lat ?geolat . 138 | ?place geo:long ?geolong . 139 | ?place dbo:abstract ?abstract . 140 | FILTER ("""+ query +""") 141 | } 142 | OFFSET """ + str(offset) + """ 143 | LIMIT """ + str(limit)+ """ 144 | """ 145 | 146 | sparql.setQuery(querystr) 147 | 148 | country_results = sparql.query().convert() 149 | return country_results["results"]["bindings"] 150 | 151 | def gen_heatmap(): 152 | """ 153 | \todo gen_heatmap is not implemented 154 | """ 155 | pass 156 | 157 | def gen_convex_hull(): 158 | """ 159 | Generate the convex hull for the report 160 | """ 161 | plist = [] 162 | 163 | for p in PLACES: 164 | plist.append((float(p.lon),float(p.lat))) 165 | 166 | REPORT.set_wkt_chull(GEOM.convex_hull(plist)) 167 | 168 | def gen_alpha_shape(cgalfile,alpha): 169 | """ 170 | External system execution of alpha_shaper to generate a WKT alpha shape file. 171 | Expects a CGAL file with lon lat corrdinates and the first line an integer 172 | of the total number of lines to read 173 | """ 174 | opt_alpha,wkt_polygons = GEOM.alpha_shape(cgalfile,alpha); 175 | REPORT.set_alphas(alpha,opt_alpha) 176 | REPORT.set_wkt_ashape(wkt_polygons) 177 | 178 | def finish_program(): 179 | OF.close() 180 | S.stop() 181 | sys.exit(0) 182 | 183 | def write_file_cgal(fileh): 184 | """ 185 | Writes a file to be read by cgal alpha_shape generator 186 | """ 187 | fileh.write(str(len(PLACES))+"\n") 188 | for p in PLACES: 189 | fileh.write(p.lon+" "+p.lat+"\n") 190 | 191 | def write_file_csv(fileh): 192 | """ 193 | Writes a CSV file to be opened by a GIS software. WKT 194 | """ 195 | header = "name;WKT;Country;Abstract\n" 196 | fileh.write(header) 197 | 198 | for p in PLACES: 199 | fileh.write(p.name+"; POINT("+p.lon+" "+p.lat+");"+p.country+";"+p.text+"\n") 200 | 201 | def write_file(fileh,wf): 202 | """ 203 | Write a file (fileh) with the format (wf). Accepting csv and cgal 204 | """ 205 | if wf.lower() == 'cgal': 206 | write_file_cgal(fileh) 207 | elif wf.lower() == 'csv': 208 | write_file_csv(fileh) 209 | fileh.close() 210 | 211 | 212 | # ########################### 213 | # 214 | # SIGNAL HANDLING 215 | # 216 | # ########################### 217 | def kill_handler(signal, frame): 218 | print 'Kill Signal Recieved' 219 | finish_program() 220 | 221 | signal.signal(signal.SIGINT, kill_handler) 222 | 223 | # ########################### 224 | # 225 | # START 226 | # 227 | # ########################### 228 | for country in european_countries(): 229 | country_uri = country["place"]["value"] 230 | country_name = country_uri.rpartition('/')[-1] 231 | total_results = 0 232 | offset = 0 233 | query_results = 1 234 | 235 | S.set_msg(country_name) 236 | 237 | while query_results > 0: 238 | try: 239 | country_results = get_points(country_uri,query_list,offset,RESULTS_QUERY) 240 | 241 | for result in country_results: 242 | title = result["title"]["value"].encode('ascii','ignore') 243 | lat = result ["geolat"]["value"] 244 | lon = result["geolong"]["value"] 245 | country = country_name 246 | #abstract = result["abstract"]["value"].encode('ascii','ignore') 247 | abstract = "" 248 | if(lat!='NAN' and lon != 'NAN'): 249 | PLACES.append(cPlace.cPlace(title,lat,lon,abstract,country)) 250 | 251 | query_results = len(country_results) 252 | offset = offset + query_results 253 | total_results += query_results 254 | except Exception as inst: 255 | print type(inst) 256 | print "EXCEPTION" 257 | 258 | 259 | if isdebug: 260 | sys.stdout.write("\r\x1b[K"+country_uri+" "+str(total_results)+"\n") 261 | sys.stdout.flush() 262 | 263 | REPORT.set_country_count(PLACES); 264 | 265 | if (len(PLACES) > 0): 266 | # ########################### 267 | # 268 | # POLYGON GENERATION 269 | # 270 | # ########################### 271 | tmpfile = tempfile.NamedTemporaryFile(prefix='vagueplace',delete=False); 272 | write_file(tmpfile,'cgal') 273 | 274 | gen_alpha_shape(tmpfile,alpha); 275 | gen_convex_hull(); 276 | 277 | # ########################### 278 | # 279 | # REPORT PRINTING 280 | # 281 | # ########################### 282 | if arguments.reportFile: 283 | if not REPORT.write_report(arguments.reportFile): 284 | print "Failure writing report file %s"% arguments.reportFile 285 | else: 286 | REPORT.print_report(); 287 | 288 | 289 | # ########################### 290 | # 291 | # FILE WRITING 292 | # 293 | # ########################### 294 | S.pause(); 295 | write_file(OF,'csv') 296 | 297 | # ########################### 298 | # 299 | # CLOSURE 300 | # 301 | # ########################### 302 | print 303 | else: 304 | print "No results for this query" 305 | 306 | finish_program() 307 | --------------------------------------------------------------------------------