[Git][debian-gis-team/mkgmap-splitter][master] 4 commits: New upstream version 0.0.0+svn592

Bas Couwenberg gitlab at salsa.debian.org
Tue Jan 1 10:03:58 GMT 2019


Bas Couwenberg pushed to branch master at Debian GIS Project / mkgmap-splitter


Commits:
8db49148 by Bas Couwenberg at 2019-01-01T09:57:55Z
New upstream version 0.0.0+svn592
- - - - -
53871270 by Bas Couwenberg at 2019-01-01T09:57:56Z
Merge tag 'upstream/0.0.0+svn592'

Upstream version 0.0.0+svn592

- - - - -
4bf47948 by Bas Couwenberg at 2019-01-01T09:59:15Z
New upstream SVN snapshot.

- - - - -
613afa7c by Bas Couwenberg at 2019-01-01T09:59:27Z
Set distribution to unstable.

- - - - -


4 changed files:

- debian/changelog
- resources/splitter-version.properties
- src/uk/me/parabola/splitter/ProblemListProcessor.java
- src/uk/me/parabola/splitter/args/SplitterParams.java


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,9 @@
-mkgmap-splitter (0.0.0+svn591-5) UNRELEASED; urgency=medium
+mkgmap-splitter (0.0.0+svn592-1) unstable; urgency=medium
 
+  * New upstream SVN snapshot.
   * Bump Standards-Version to 4.3.0, no changes.
 
- -- Bas Couwenberg <sebastic at debian.org>  Tue, 25 Dec 2018 22:40:03 +0100
+ -- Bas Couwenberg <sebastic at debian.org>  Tue, 01 Jan 2019 10:59:19 +0100
 
 mkgmap-splitter (0.0.0+svn591-4) unstable; urgency=medium
 


=====================================
resources/splitter-version.properties
=====================================
@@ -1,2 +1,2 @@
-svn.version: 591
-build.timestamp: 2018-03-09T14:31:20+0000
+svn.version: 592
+build.timestamp: 2018-12-13T08:19:25+0000


=====================================
src/uk/me/parabola/splitter/ProblemListProcessor.java
=====================================
@@ -55,6 +55,7 @@ class ProblemListProcessor extends AbstractMapProcessor {
 	private final HashSet<String> wantedBoundaryAdminLevels = new HashSet<>();
 	
 	private final HashSet<String> wantedBoundaryTagValues;
+	private final HashSet<String> wantedRouteTagValues;
 	
 	ProblemListProcessor(DataStorer dataStorer, int areaOffset,
 			int numAreasThisPass, SplitterParams mainOptions) {
@@ -83,6 +84,13 @@ class ProblemListProcessor extends AbstractMapProcessor {
 			wantedBoundaryTagValues = new HashSet<>(Arrays.asList(boundaryTags));
 		}
 		setWantedAdminLevel(mainOptions.getWantedAdminLevel());
+		String routeRelationValuesParm = mainOptions.getRouteRelValues();
+		if (routeRelationValuesParm.isEmpty()) {
+			wantedRouteTagValues = null;
+		} else {
+			String[] routeValues = routeRelationValuesParm.split(Pattern.quote(","));
+			wantedRouteTagValues = new HashSet<>(Arrays.asList(routeValues));
+		}
 	}
 	
 	public void setWantedAdminLevel(int adminLevel) {
@@ -205,6 +213,8 @@ class ProblemListProcessor extends AbstractMapProcessor {
 		boolean isMPRelType = false;
 		boolean hasBoundaryTag = false;
 		boolean isWantedBoundary = (wantedBoundaryTagValues == null) ? true:false;
+		boolean isRouteRelType = false;
+		boolean isWantedRoute = (wantedRouteTagValues == null) ? false : true;
 		Iterator<Element.Tag> tags = rel.tagsIterator();
 		String admin_level = null;
 		while(tags.hasNext()) {
@@ -214,6 +224,8 @@ class ProblemListProcessor extends AbstractMapProcessor {
 					useThis= true; // no need to check other tags
 				else if ("multipolygon".equals((t.value))  || "boundary".equals((t.value)))
 					isMPRelType= true;
+				else if ("route".equals(t.value))
+					isRouteRelType = true;
 				else if ("associatedStreet".equals((t.value))  || "street".equals((t.value)))
 					useThis= true; // no need to check other tags
 			} else if ("boundary".equals(t.key)){
@@ -228,7 +240,12 @@ class ProblemListProcessor extends AbstractMapProcessor {
 			} else if ("admin_level".equals(t.key)){
 				admin_level = t.value;
 			}
-			
+			if ("route".equals((t.value))) {
+				if (wantedRouteTagValues != null) {
+					if (wantedRouteTagValues.contains(t.value))
+						isWantedRoute = true;
+				}
+			} 			
 			if (useThis)
 				break;
 		}
@@ -237,7 +254,8 @@ class ProblemListProcessor extends AbstractMapProcessor {
 		else if (isMPRelType && hasBoundaryTag  && admin_level != null){
 			if (wantedBoundaryAdminLevels.contains(admin_level))
 				useThis = true;
-		}
+		} else if (isRouteRelType && isWantedRoute)
+			useThis = true;
 		if (!useThis){
 			return;
 		}


=====================================
src/uk/me/parabola/splitter/args/SplitterParams.java
=====================================
@@ -112,7 +112,6 @@ public interface SplitterParams {
 			+ "Used to filter boundary relations for problem-list processing. Ignored when keep-complete is false.")
 	int getWantedAdminLevel();
 	
-	
 
 	@Option(defaultValue = "200000", description = "Search limit in split algo. Higher values may find better splits, but will take longer.")
 	int getSearchLimit();
@@ -123,4 +122,8 @@ public interface SplitterParams {
 	@Option(defaultValue = "false", description = "Specify if splitter should ignore bounds tags in input files")
 	boolean getIgnoreOsmBounds();
 
+	@Option(defaultValue="", description = "A comma separated list of tag values for route relations. " 
+			+ "Can be used to keep route relations of the given type complete. Only route values listed are kept complete. Default is empty.")
+	String getRouteRelValues();
+	
 }



View it on GitLab: https://salsa.debian.org/debian-gis-team/mkgmap-splitter/compare/79462160d3587c867081de9a2649ba63101ad5d3...613afa7c98bfe36a14307d6730cdde296032b46e

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/mkgmap-splitter/compare/79462160d3587c867081de9a2649ba63101ad5d3...613afa7c98bfe36a14307d6730cdde296032b46e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190101/7d0cff3f/attachment-0001.html>


More information about the Pkg-grass-devel mailing list