From 64605e856191d77f9822182f36a9ecd4b2b18021 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 13 Jun 2012 12:00:12 +0200 Subject: [PATCH] Routing update --- .../osmand/data/index/IndexBatchCreator.java | 4 + .../net/osmand/data/index/WikiIndexer.java | 1 + .../src/net/osmand/data/index/batch.xml | 2 +- .../osmand/data/preparation/IndexCreator.java | 14 +- .../data/preparation/OsmDbAccessor.java | 549 +++++------------- .../osmand/data/preparation/OsmDbCreator.java | 66 ++- .../net/osmand/router/BinaryRoutePlanner.java | 99 ++-- .../src/net/osmand/router/RoutingContext.java | 100 +++- .../src/net/osmand/swing/MapClusterLayer.java | 5 +- .../src/net/osmand/swing/OsmExtractionUI.java | 9 +- .../osmand/swing/swing_messages.properties | 1 + build-scripts/indexes-batch-generate.xml | 2 +- 12 files changed, 321 insertions(+), 531 deletions(-) diff --git a/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java b/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java index 1123e2eec1..e39f2e965f 100644 --- a/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java +++ b/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java @@ -82,6 +82,7 @@ public class IndexBatchCreator { boolean indexTransport = false; boolean indexAddress = false; boolean indexMap = false; + boolean indexRouting = false; private String wget; @@ -147,6 +148,8 @@ public class IndexBatchCreator { indexPOI = Boolean.parseBoolean(process.getAttribute("indexPOI")); indexMap = Boolean.parseBoolean(process.getAttribute("indexMap")); + indexRouting = process.getAttribute("indexRouting") == null || + process.getAttribute("indexRouting").equalsIgnoreCase("true"); indexTransport = Boolean.parseBoolean(process.getAttribute("indexTransport")); indexAddress = Boolean.parseBoolean(process.getAttribute("indexAddress")); parseProcessAttributes(process); @@ -432,6 +435,7 @@ public class IndexBatchCreator { indexCreator.setIndexPOI(indexPOI); indexCreator.setIndexTransport(indexTransport); indexCreator.setIndexMap(indexMap); + indexCreator.setIndexRouting(indexRouting); indexCreator.setLastModifiedDate(f.lastModified()); indexCreator.setNormalizeStreets(true); indexCreator.setRegionName(rName); diff --git a/DataExtractionOSM/src/net/osmand/data/index/WikiIndexer.java b/DataExtractionOSM/src/net/osmand/data/index/WikiIndexer.java index 0a38cbf247..e0a9759d0a 100644 --- a/DataExtractionOSM/src/net/osmand/data/index/WikiIndexer.java +++ b/DataExtractionOSM/src/net/osmand/data/index/WikiIndexer.java @@ -130,6 +130,7 @@ public class WikiIndexer { IndexCreator ic = new IndexCreator(workPath); ic.setIndexPOI(true); ic.setIndexMap(false); + ic.setIndexRouting(false); ic.setIndexTransport(false); ic.setIndexAddress(false); ic.generateIndexes(outFile, new ConsoleProgressImplementation(3), null, null, null, log); diff --git a/DataExtractionOSM/src/net/osmand/data/index/batch.xml b/DataExtractionOSM/src/net/osmand/data/index/batch.xml index c6c6c77829..2aeab284e1 100644 --- a/DataExtractionOSM/src/net/osmand/data/index/batch.xml +++ b/DataExtractionOSM/src/net/osmand/data/index/batch.xml @@ -13,7 +13,7 @@ --> + skipExistingIndexesAt="/home/..." indexPOI="true" indexRouting="true" indexMap="true" indexTransport="true" indexAddress="true"> + skipExistingIndexesAt="/var/lib/jenkins/indexes/uploaded" indexPOI="true" indexMap="true" indexRouting="true" indexTransport="true" indexAddress="true">