prepare elevation type in rd5
This commit is contained in:
parent
cae367025f
commit
477c675d46
2 changed files with 19 additions and 3 deletions
|
@ -28,6 +28,7 @@ public class PosUnifier extends MapCreatorBase {
|
||||||
private DiffCoderDataOutputStream nodesOutStream;
|
private DiffCoderDataOutputStream nodesOutStream;
|
||||||
private DiffCoderDataOutputStream borderNodesOut;
|
private DiffCoderDataOutputStream borderNodesOut;
|
||||||
private File nodeTilesOut;
|
private File nodeTilesOut;
|
||||||
|
private File outNodeFile;
|
||||||
private CompactLongSet[] positionSets;
|
private CompactLongSet[] positionSets;
|
||||||
|
|
||||||
private Map<String, ElevationRaster> srtmmap;
|
private Map<String, ElevationRaster> srtmmap;
|
||||||
|
@ -107,8 +108,8 @@ public class PosUnifier extends MapCreatorBase {
|
||||||
@Override
|
@Override
|
||||||
public void nodeFileStart(File nodefile) throws Exception {
|
public void nodeFileStart(File nodefile) throws Exception {
|
||||||
resetElevationRaster();
|
resetElevationRaster();
|
||||||
|
outNodeFile = fileFromTemplate(nodefile, nodeTilesOut, "u5d");
|
||||||
nodesOutStream = createOutStream(fileFromTemplate(nodefile, nodeTilesOut, "u5d"));
|
nodesOutStream = createOutStream(outNodeFile);
|
||||||
|
|
||||||
positionSets = new CompactLongSet[2500];
|
positionSets = new CompactLongSet[2500];
|
||||||
}
|
}
|
||||||
|
@ -138,6 +139,12 @@ public class PosUnifier extends MapCreatorBase {
|
||||||
@Override
|
@Override
|
||||||
public void nodeFileEnd(File nodeFile) throws Exception {
|
public void nodeFileEnd(File nodeFile) throws Exception {
|
||||||
nodesOutStream.close();
|
nodesOutStream.close();
|
||||||
|
if (outNodeFile != null) {
|
||||||
|
if (lastSrtmRaster != null) {
|
||||||
|
String newName = outNodeFile.getAbsolutePath() + (lastSrtmRaster.nrows > 6001 ? "_1": "_3");
|
||||||
|
outNodeFile.renameTo(new File(newName));
|
||||||
|
}
|
||||||
|
}
|
||||||
resetElevationRaster();
|
resetElevationRaster();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ public class WayLinker extends MapCreatorBase implements Runnable {
|
||||||
private short lookupMinorVersion;
|
private short lookupMinorVersion;
|
||||||
|
|
||||||
private long creationTimeStamp;
|
private long creationTimeStamp;
|
||||||
|
private byte elevationType;
|
||||||
|
|
||||||
private BExpressionContextWay expctxWay;
|
private BExpressionContextWay expctxWay;
|
||||||
|
|
||||||
|
@ -217,7 +218,14 @@ public class WayLinker extends MapCreatorBase implements Runnable {
|
||||||
File trafficFile = fileFromTemplate(wayfile, trafficTilesIn, "trf");
|
File trafficFile = fileFromTemplate(wayfile, trafficTilesIn, "trf");
|
||||||
|
|
||||||
// process corresponding node-file, if any
|
// process corresponding node-file, if any
|
||||||
File nodeFile = fileFromTemplate(wayfile, nodeTilesIn, "u5d");
|
elevationType = 3;
|
||||||
|
File nodeFile = fileFromTemplate(wayfile, nodeTilesIn, "u5d_1");
|
||||||
|
if (nodeFile.exists()) {
|
||||||
|
elevationType = 1;
|
||||||
|
} else {
|
||||||
|
nodeFile = fileFromTemplate(wayfile, nodeTilesIn, "u5d_3");
|
||||||
|
if (!nodeFile.exists()) nodeFile = fileFromTemplate(wayfile, nodeTilesIn, "u5d");
|
||||||
|
}
|
||||||
if (nodeFile.exists()) {
|
if (nodeFile.exists()) {
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
|
@ -539,6 +547,7 @@ public class WayLinker extends MapCreatorBase implements Runnable {
|
||||||
for (int i55 = 0; i55 < 25; i55++) {
|
for (int i55 = 0; i55 < 25; i55++) {
|
||||||
os.writeInt(fileHeaderCrcs[i55]);
|
os.writeInt(fileHeaderCrcs[i55]);
|
||||||
}
|
}
|
||||||
|
os.writeByte(elevationType);
|
||||||
|
|
||||||
os.close();
|
os.close();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue