Reformat whole codebase using Android Studio
This commit is contained in:
parent
d5322667d5
commit
c15913c1ab
161 changed files with 15124 additions and 18537 deletions
|
|
@ -1,54 +1,53 @@
|
|||
package btools.mapcreator;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import java.net.URL;
|
||||
import java.io.File;
|
||||
|
||||
public class MapcreatorTest
|
||||
{
|
||||
@Test
|
||||
public void mapcreatorTest() throws Exception
|
||||
{
|
||||
URL mapurl = this.getClass().getResource( "/dreieich.osm.gz" );
|
||||
Assert.assertTrue( "test-osm-map dreieich.osm not found", mapurl != null );
|
||||
File mapFile = new File(mapurl.getFile());
|
||||
File workingDir = mapFile.getParentFile();
|
||||
File profileDir = new File( workingDir, "/../../../../misc/profiles2" );
|
||||
File tmpdir = new File( workingDir, "tmp" );
|
||||
tmpdir.mkdir();
|
||||
|
||||
File nodes = new File( tmpdir, "nodetiles" );
|
||||
nodes.mkdir();
|
||||
File ways = new File( tmpdir, "waytiles" );
|
||||
ways.mkdir();
|
||||
File nodes55 = new File( tmpdir, "nodes55" );
|
||||
nodes55.mkdir();
|
||||
File ways55 = new File( tmpdir, "waytiles55" );
|
||||
ways55.mkdir();
|
||||
File lookupFile = new File( profileDir, "lookups.dat" );
|
||||
File relFile = new File( tmpdir, "cycleways.dat" );
|
||||
File resFile = new File( tmpdir, "restrictions.dat" );
|
||||
File profileAll = new File( profileDir, "all.brf" );
|
||||
File profileReport = new File( profileDir, "trekking.brf" );
|
||||
File profileCheck = new File( profileDir, "softaccess.brf" );
|
||||
File borderFile = new File( tmpdir, "bordernids.dat" );
|
||||
|
||||
new OsmFastCutter().doCut( lookupFile, nodes, ways, nodes55, ways55, borderFile, relFile, resFile, profileAll, profileReport, profileCheck, mapFile );
|
||||
|
||||
|
||||
// run PosUnifier
|
||||
File unodes55 = new File( tmpdir, "unodes55" );
|
||||
File bordernodes = new File( tmpdir, "bordernodes.dat" );
|
||||
unodes55.mkdir();
|
||||
new PosUnifier().process( nodes55, unodes55, borderFile, bordernodes, "/private-backup/srtm" );
|
||||
|
||||
// run WayLinker
|
||||
File segments = new File( tmpdir, "segments" );
|
||||
segments.mkdir();
|
||||
new WayLinker().process( unodes55, ways55, bordernodes, resFile, lookupFile, profileAll, segments, "rd5" );
|
||||
}
|
||||
}
|
||||
package btools.mapcreator;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.net.URL;
|
||||
import java.io.File;
|
||||
|
||||
public class MapcreatorTest {
|
||||
@Test
|
||||
public void mapcreatorTest() throws Exception {
|
||||
URL mapurl = this.getClass().getResource("/dreieich.osm.gz");
|
||||
Assert.assertTrue("test-osm-map dreieich.osm not found", mapurl != null);
|
||||
File mapFile = new File(mapurl.getFile());
|
||||
File workingDir = mapFile.getParentFile();
|
||||
File profileDir = new File(workingDir, "/../../../../misc/profiles2");
|
||||
File tmpdir = new File(workingDir, "tmp");
|
||||
tmpdir.mkdir();
|
||||
|
||||
File nodes = new File(tmpdir, "nodetiles");
|
||||
nodes.mkdir();
|
||||
File ways = new File(tmpdir, "waytiles");
|
||||
ways.mkdir();
|
||||
File nodes55 = new File(tmpdir, "nodes55");
|
||||
nodes55.mkdir();
|
||||
File ways55 = new File(tmpdir, "waytiles55");
|
||||
ways55.mkdir();
|
||||
File lookupFile = new File(profileDir, "lookups.dat");
|
||||
File relFile = new File(tmpdir, "cycleways.dat");
|
||||
File resFile = new File(tmpdir, "restrictions.dat");
|
||||
File profileAll = new File(profileDir, "all.brf");
|
||||
File profileReport = new File(profileDir, "trekking.brf");
|
||||
File profileCheck = new File(profileDir, "softaccess.brf");
|
||||
File borderFile = new File(tmpdir, "bordernids.dat");
|
||||
|
||||
new OsmFastCutter().doCut(lookupFile, nodes, ways, nodes55, ways55, borderFile, relFile, resFile, profileAll, profileReport, profileCheck, mapFile);
|
||||
|
||||
|
||||
// run PosUnifier
|
||||
File unodes55 = new File(tmpdir, "unodes55");
|
||||
File bordernodes = new File(tmpdir, "bordernodes.dat");
|
||||
unodes55.mkdir();
|
||||
new PosUnifier().process(nodes55, unodes55, borderFile, bordernodes, "/private-backup/srtm");
|
||||
|
||||
// run WayLinker
|
||||
File segments = new File(tmpdir, "segments");
|
||||
segments.mkdir();
|
||||
new WayLinker().process(unodes55, ways55, bordernodes, resFile, lookupFile, profileAll, segments, "rd5");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue