[pprepair] 03/08: Imported Upstream version 0.0~20160321-87ffae5

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri May 13 11:32:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository pprepair.

commit 4fad50f203a0458bd1ded4c01692dcf444230420
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu May 5 13:17:40 2016 +0200

    Imported Upstream version 0.0~20160321-87ffae5
---
 CMakeLists.txt | 3 +++
 IOWorker.cpp   | 6 +++---
 README.md      | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d3d348b..393e273 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,3 +73,6 @@ add_to_cached_list( CGAL_EXECUTABLE_TARGETS pprepair )
 # Link the executable to CGAL and third-party libraries
 target_link_libraries(pprepair   ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${GDAL_LIBRARY})
 
+# Driver for output
+add_definitions(-DDRIVER="GeoJSON")
+# add_definitions(-DDRIVER="ESRI Shapefile")
diff --git a/IOWorker.cpp b/IOWorker.cpp
index 037d307..ff0fd74 100644
--- a/IOWorker.cpp
+++ b/IOWorker.cpp
@@ -1259,14 +1259,14 @@ bool IOWorker::reconstructPolygons(Triangulation &triangulation, std::vector<std
 bool IOWorker::exportPolygons(std::vector<std::pair<PolygonHandle *, Polygon> > &outputPolygons, const char *file, bool withProvenance) {
 	
 	// Prepare file
-	const char *driverName = "ESRI Shapefile";
+	const char *driverName = DRIVER;
 #if GDAL_VERSION_MAJOR < 2
 	OGRSFDriver *driver = OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(driverName);
 #else
 	GDALDriver *driver = GetGDALDriverManager()->GetDriverByName(driverName);
 #endif
 	if (driver == NULL) {
-		std::cout << "\tError: OGR Shapefile driver not found." << std::endl;
+		std::cout << "\tError: OGR " << DRIVER << " driver not found." << std::endl;
 		return false;
 	}
 	
@@ -1400,7 +1400,7 @@ bool IOWorker::exportPolygons(std::vector<std::pair<PolygonHandle *, Polygon> >
 bool IOWorker::exportTriangulation(Triangulation &t, const char *file, bool withNumberOfTags, bool withFields, bool withProvenance) {
 	
 	// Prepare file
-	const char *driverName = "ESRI Shapefile";
+	const char *driverName = DRIVER;
 #if GDAL_VERSION_MAJOR < 2
 	OGRSFDriver *driver = OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(driverName);
 #else
diff --git a/README.md b/README.md
index 32205b3..6cdee9e 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ To compile pprepair, you first need to install the free libraries [CGAL](http://
 
 To install it, run:
 
-    $ cmake .
+    $ cmake -DDRIVER="ESRI Shapefile" .
     $ make
     $ ./pprepair -i inputfile -o outputfile -fix
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pprepair.git



More information about the Pkg-grass-devel mailing list