renaming extractLargeNetwork to extractor
This commit is contained in:
		
							parent
							
								
									b5c92f20b4
								
							
						
					
					
						commit
						78df3ae23a
					
				| @ -93,9 +93,7 @@ env.Append(CCFLAGS = ' -fopenmp') | |||||||
| env.Append(LINKFLAGS = ' -fopenmp') | env.Append(LINKFLAGS = ' -fopenmp') | ||||||
| env.StaticObject("DataStructures/pbf-proto/fileformat.pb.cc") | env.StaticObject("DataStructures/pbf-proto/fileformat.pb.cc") | ||||||
| env.StaticObject("DataStructures/pbf-proto/osmformat.pb.cc") | env.StaticObject("DataStructures/pbf-proto/osmformat.pb.cc") | ||||||
| env.Program("extractNetwork.cpp") | env.Program("extractor.cpp") | ||||||
| env.Program("extractLargeNetwork.cpp")	 |  | ||||||
| env.Program("createHierarchy.cpp") |  | ||||||
| if os.path.exists("many-to-many.cpp"): | if os.path.exists("many-to-many.cpp"): | ||||||
| 	env.Program("many-to-many.cpp") | 	env.Program("many-to-many.cpp") | ||||||
| env.Append(CCFLAGS = ' -lboost_regex -lboost_iostreams -lboost_system -lbz2 -lz -lprotobuf') | env.Append(CCFLAGS = ' -lboost_regex -lboost_iostreams -lboost_system -lbz2 -lz -lprotobuf') | ||||||
|  | |||||||
| @ -185,7 +185,6 @@ int main (int argc, char *argv[]) { | |||||||
|                 fout.write((char*)&(nodesIT->id), sizeof(unsigned)); |                 fout.write((char*)&(nodesIT->id), sizeof(unsigned)); | ||||||
|                 fout.write((char*)&(nodesIT->lon), sizeof(int)); |                 fout.write((char*)&(nodesIT->lon), sizeof(int)); | ||||||
|                 fout.write((char*)&(nodesIT->lat), sizeof(int)); |                 fout.write((char*)&(nodesIT->lat), sizeof(int)); | ||||||
|                 //                std::cout << "serializing: " << nodesIT->id << ", lat: " << nodesIT->lat << ", lon: " << nodesIT->lon << std::endl;
 |  | ||||||
|                 usedNodeCounter++; |                 usedNodeCounter++; | ||||||
|                 usedNodeIDsIT++; |                 usedNodeIDsIT++; | ||||||
|                 nodesIT++; |                 nodesIT++; | ||||||
| @ -310,24 +309,15 @@ int main (int argc, char *argv[]) { | |||||||
| 
 | 
 | ||||||
|         std::cout << "[extractor] writing street name index ... " << std::flush; |         std::cout << "[extractor] writing street name index ... " << std::flush; | ||||||
|         std::vector<unsigned> * nameIndex = new std::vector<unsigned>(nameVector.size()+1, 0); |         std::vector<unsigned> * nameIndex = new std::vector<unsigned>(nameVector.size()+1, 0); | ||||||
|         unsigned currentNameIndex = 0; |  | ||||||
|         unsigned elementCounter(0); |  | ||||||
|         for(STXXLStringVector::iterator it = nameVector.begin(); it != nameVector.end(); it++) { |  | ||||||
|             nameIndex->at(elementCounter) = currentNameIndex; |  | ||||||
|             currentNameIndex += it->length(); |  | ||||||
|             elementCounter++; |  | ||||||
|         } |  | ||||||
|         nameIndex->at(nameVector.size()) = currentNameIndex; |  | ||||||
|         outputFileName.append(".names"); |         outputFileName.append(".names"); | ||||||
|         std::ofstream nameOutFile(outputFileName.c_str(), std::ios::binary); |         std::ofstream nameOutFile(outputFileName.c_str(), std::ios::binary); | ||||||
|         unsigned sizeOfNameIndex = nameIndex->size(); |         unsigned sizeOfNameIndex = nameIndex->size(); | ||||||
|         nameOutFile.write((char *)&(sizeOfNameIndex), sizeof(unsigned)); |         nameOutFile.write((char *)&(sizeOfNameIndex), sizeof(unsigned)); | ||||||
| 
 | 
 | ||||||
|         for(unsigned i = 0; i < nameIndex->size(); i++) { |  | ||||||
|             nameOutFile.write((char *)&(nameIndex->at(i)), sizeof(unsigned)); |  | ||||||
|         } |  | ||||||
|         for(STXXLStringVector::iterator it = nameVector.begin(); it != nameVector.end(); it++) { |         for(STXXLStringVector::iterator it = nameVector.begin(); it != nameVector.end(); it++) { | ||||||
|             nameOutFile << *it; |             unsigned lengthOfRawString = strlen(it->c_str()); | ||||||
|  |             nameOutFile.write((char *)&(lengthOfRawString), sizeof(unsigned)); | ||||||
|  |             nameOutFile.write(it->c_str(), lengthOfRawString); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         nameOutFile.close(); |         nameOutFile.close(); | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user