-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_rd5.ps1
More file actions
29 lines (22 loc) · 1.68 KB
/
Copy pathcreate_rd5.ps1
File metadata and controls
29 lines (22 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[CmdletBinding()]
param
(
[string]$PbfPath,
[string]$Srtm3BefFolder
)
# Or full java bin path.
$JAVA = "java"
$JAVA_MEM_ARGS = @("-Xmx2600m", "-Xms2600m", "-Xmn32m")
$BROUTER_PROFILES = Join-Path -Path $PSScriptRoot -ChildPath "profiles2"
$BROUTER_JAR = (Join-Path -Path $PSScriptRoot -ChildPath "brouter-*-all.jar" | Resolve-Path).Path
New-Item -Path tmp -ItemType Directory -Force | Out-Null
Set-Location tmp | Out-Null
New-Item segments -ItemType Directory -Force | Out-Null
New-Item nodetiles -ItemType Directory -Force | Out-Null
New-Item waytiles -ItemType Directory -Force | Out-Null
New-Item waytiles55 -ItemType Directory -Force | Out-Null
New-Item nodes55 -ItemType Directory -Force | Out-Null
New-Item unodes55 -ItemType Directory -Force | Out-Null
& $JAVA $JAVA_MEM_ARGS -cp $BROUTER_JAR -DavoidMapPolling=true -Ddeletetmpfiles=false -DuseDenseMaps=true btools.mapcreator.OsmFastCutter (Join-Path -Path $BROUTER_PROFILES -ChildPath lookups.dat) nodetiles waytiles nodes55 waytiles55 bordernids.dat relations.dat restrictions.dat (Join-Path -Path $BROUTER_PROFILES -ChildPath all.brf) (Join-Path -Path $BROUTER_PROFILES -ChildPath trekking.brf) (Join-Path -Path $BROUTER_PROFILES -ChildPath softaccess.brf) $PbfPath
& $JAVA $JAVA_MEM_ARGS -cp $BROUTER_JAR -Ddeletetmpfiles=false -DuseDenseMaps=true btools.mapcreator.PosUnifier nodes55 unodes55 bordernids.dat bordernodes.dat /srtm1 $Srtm3BefFolder
& $JAVA $JAVA_MEM_ARGS -cp $BROUTER_JAR -DuseDenseMaps=true -DskipEncodingCheck=true btools.mapcreator.WayLinker unodes55 waytiles55 bordernodes.dat restrictions.dat (Join-Path -Path $BROUTER_PROFILES -ChildPath lookups.dat) (Join-Path -Path $BROUTER_PROFILES -ChildPath all.brf) segments rd5