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 borderNodesOut;
|
||||
private File nodeTilesOut;
|
||||
private File outNodeFile;
|
||||
private CompactLongSet[] positionSets;
|
||||
|
||||
private Map<String, ElevationRaster> srtmmap;
|
||||
|
@ -107,8 +108,8 @@ public class PosUnifier extends MapCreatorBase {
|
|||
@Override
|
||||
public void nodeFileStart(File nodefile) throws Exception {
|
||||
resetElevationRaster();
|
||||
|
||||
nodesOutStream = createOutStream(fileFromTemplate(nodefile, nodeTilesOut, "u5d"));
|
||||
outNodeFile = fileFromTemplate(nodefile, nodeTilesOut, "u5d");
|
||||
nodesOutStream = createOutStream(outNodeFile);
|
||||
|
||||
positionSets = new CompactLongSet[2500];
|
||||
}
|
||||
|
@ -138,6 +139,12 @@ public class PosUnifier extends MapCreatorBase {
|
|||
@Override
|
||||
public void nodeFileEnd(File nodeFile) throws Exception {
|
||||
nodesOutStream.close();
|
||||
if (outNodeFile != null) {
|
||||
if (lastSrtmRaster != null) {
|
||||
String newName = outNodeFile.getAbsolutePath() + (lastSrtmRaster.nrows > 6001 ? "_1": "_3");
|
||||
outNodeFile.renameTo(new File(newName));
|
||||
}
|
||||
}
|
||||
resetElevationRaster();
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ public class WayLinker extends MapCreatorBase implements Runnable {
|
|||
private short lookupMinorVersion;
|
||||
|
||||
private long creationTimeStamp;
|
||||
private byte elevationType;
|
||||
|
||||
private BExpressionContextWay expctxWay;
|
||||
|
||||
|
@ -217,7 +218,14 @@ public class WayLinker extends MapCreatorBase implements Runnable {
|
|||
File trafficFile = fileFromTemplate(wayfile, trafficTilesIn, "trf");
|
||||
|
||||
// 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()) {
|
||||
reset();
|
||||
|
||||
|
@ -539,6 +547,7 @@ public class WayLinker extends MapCreatorBase implements Runnable {
|
|||
for (int i55 = 0; i55 < 25; i55++) {
|
||||
os.writeInt(fileHeaderCrcs[i55]);
|
||||
}
|
||||
os.writeByte(elevationType);
|
||||
|
||||
os.close();
|
||||
|
||||
|
|
Loading…
Reference in a new issue