[pprepair] 01/05: New upstream version 0.0~20170614-dd91a21

Bas Couwenberg sebastic at debian.org
Sat Jul 1 15:39:17 UTC 2017


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

sebastic pushed a commit to branch master
in repository pprepair.

commit 3f61d7e7914ae632097666fea9be15dcf6b35fb1
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Jul 1 17:28:52 2017 +0200

    New upstream version 0.0~20170614-dd91a21
---
 CMakeLists.txt |  4 ++++
 IOWorker.cpp   |  6 ++++--
 README.md      | 22 +++++++++++++++-------
 3 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 393e273..68e69cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,6 +63,10 @@ endif()
 
 include_directories( ${GDAL_INCLUDE_DIR} )
 
+# Hardening buildflags
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{CXXFLAGS}")
+set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} $ENV{LDFLAGS}")
+
 # Creating entries for target: pprepair
 # ############################
 
diff --git a/IOWorker.cpp b/IOWorker.cpp
index ff0fd74..1131178 100644
--- a/IOWorker.cpp
+++ b/IOWorker.cpp
@@ -54,8 +54,9 @@ bool IOWorker::addToTriangulation(Triangulation &triangulation, TaggingVector &e
     OGRLayer *dataLayer = dataSource->GetLayer(currentLayer);
     dataLayer->ResetReading();
     OGRSpatialReference* tmp = dataLayer->GetSpatialRef();
-    if ( (tmp != NULL) && (spatialReference != NULL) )
-      spatialReference = tmp->CloneGeogCS();
+    if ( (tmp != NULL) && (spatialReference != NULL) ) {
+      spatialReference = tmp->Clone();
+    }
 		
 		unsigned int numberOfPolygons = dataLayer->GetFeatureCount(true);
 		std::cout << "\tReading layer #" << currentLayer+1 << " (" << numberOfPolygons << " polygons)...";
@@ -97,6 +98,7 @@ bool IOWorker::addToTriangulation(Triangulation &triangulation, TaggingVector &e
     // Reads all features in this layer
 		OGRFeature *feature;
 		while ((feature = dataLayer->GetNextFeature()) != NULL) {
+      if (!feature->GetGeometryRef()) continue;
 			
 			// STEP 1: Get polygons from input
 			std::vector<std::list<Point> > outerRingsList;
diff --git a/README.md b/README.md
index 6cdee9e..c8a7c35 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 ## What is pprepair?
 
-pprepair (*p*lanar *p*artition repair) takes a set of polygons and ensures that they form a valid planar partition, made of valid polygons and having no gaps or overlaps. It can be used as a validator, telling of problems in individual polygons or in the planar partition, and also as an automatic repair tool, outputting a set of polygons that do form a valid planar partition. If you are only interested in repairing individual polygons, have a look at [prepair](https://github.com/tudelft- [...]
+pprepair (*p*lanar *p*artition repair) takes a set of polygons and ensures that they form a valid planar partition, made of valid polygons and having no gaps or overlaps. It can be used as a validator, telling of problems in individual polygons or in the planar partition, and also as an automatic repair tool, outputting a set of polygons that do form a valid planar partition. If you are only interested in repairing individual polygons, have a look at [prepair](https://github.com/tudelft3 [...]
 
 ## What is a planar partition and why is it important to have valid planar partitions?
 
@@ -14,11 +14,11 @@ When software that expects a planar partition received one that is not so, it ca
 
 In short, pprepair creates a constrained triangulation of the polygons, tags each triangle with the polygon that it belongs to, modifies the triangulation to ensure that only one tag is present in each, and reconstructs the polygons from the triangulation. 
 
-Many more details are available in Ken Arroyo Ohori's MSc thesis [here](http://www.gdmc.nl/ken/files/10_msc_thesis.pdf).
+Many more details are available in Ken Arroyo Ohori's MSc thesis [here](https://3d.bk.tudelft.nl/ken/files/10_msc_thesis.pdf).
 
 If you use pprepair for your research, please cite this publication:
 
-> Arroyo Ohori, Ken, Ledoux, Hugo and Meijers, Martijn (2012). Validation and automatic repair of planar partitions using a constrained triangulation. *Photogrammetrie, Fernerkundung, Geoinformation (PFG)*. 5:613–630. [ [PDF] ](http://www.gdmc.nl/ken/files/12_pfg.pdf) [ [DOI] ](http://dx.doi.org/10.1127/1432-8364/2012/0143)
+> Arroyo Ohori, Ken, Ledoux, Hugo and Meijers, Martijn (2012). Validation and automatic repair of planar partitions using a constrained triangulation. *Photogrammetrie, Fernerkundung, Geoinformation (PFG)*. 5:613–630. [ [PDF] ](https://3d.bk.tudelft.nl/ken/files/12_pfg.pdf) [ [DOI] ](http://dx.doi.org/10.1127/1432-8364/2012/0143)
 
 ## How do I use pprepair?
 
@@ -26,13 +26,21 @@ pprepair is a command-line program, which we provide as source code. It is very
 
 To compile pprepair, you first need to install the free libraries [CGAL](http://www.cgal.org) and [GDAL](http://www.gdal.org). [CMake](http://www.cmake.org) is highly recommended. Under Mac, we recommend using [Homebrew](http://brew.sh/) to install CGAL (and all its dependencies) and CMake, and GDAL is easily installed with the framework installed of [KyngChaos](http://www.kyngchaos.com/software/frameworks#gdal_complete).
 
-To install it, run:
+To install it, run (inside the root of the source tree):
 
-    $ cmake -DDRIVER="ESRI Shapefile" .
+    $ mkdir build
+    $ cd build
+    $ cmake ..
     $ make
+    
+Eventually, you can edit the CMakeLists.txt file to use a different OGR driver for output files (e.g. GeoJSON or ESRI Shapefile).
+
+After successful compilation, run:
+
     $ ./pprepair -i inputfile -o outputfile -fix
 
-You can get all the options simply by running pprepair with no arguments
+You can get all the (advanced) options by running pprepair with no arguments:
+
     $ ./pprepair
 
 ## Can I use pprepair in my organisation? What is the license of pprepair?
@@ -49,4 +57,4 @@ This can be due to several reasons. 99% of the time it can be solved by:
   - If your data set has very large polygons, try passing the -bd flag
   - If your data set has points that are **very** close together, try uncommenting line 26 in definitions/CGALDefinitions.h (#define EXACT_CONSTRUCTIONS)
 
-If your problem persists, please report it [here](https://github.com/tudelft-gist/pprepair/issues?state=open).
+If your problem persists, please report it [here](https://github.com/tudelft3d/pprepair/issues?state=open).

-- 
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