Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
svencc committed Mar 6, 2024
1 parent 9f99278 commit c8fd1ee
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ private int calculateForestFragment(
surroundingForestNeighbourSpaces++;
}
}

}

int baseColorForest = mapScheme.getBaseColorForest();
final int baseColorForest = mapScheme.getBaseColorForest();

if (treeDensity < forestDensityThreshold) {
return mapScheme.getBaseColorContourBackground(); // @TODO extract to new variable baseColorOfForestBackground!!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public int[] rasterizeForestMap(
@NonNull final SpacialIndex<ForestItem> spacialIndex,
@NonNull final MapDesignScheme mapScheme
) {
final D8AlgorithmForForestMap d8AlgorithmForForestMap = new D8AlgorithmForForestMap(5.0);
final D8AlgorithmForForestMap d8AlgorithmForForestMap = new D8AlgorithmForForestMap(demDescriptor.getStepSize());

final int[][] forestMap = d8AlgorithmForForestMap.generateForestMap(demDescriptor, spacialIndex, mapScheme);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ public class DEMInterpolationAlgorithmBilinear implements DEMInterpolationAlgori

@Override
public float[][] interpolate(
@NonNull DEMDescriptor DEMDescriptor,
@NonNull DEMDescriptor demDescriptor,
final int scaleFactor
) {
return interpolate(DEMDescriptor.getDem(), scaleFactor);
return interpolate(demDescriptor.getDem(), scaleFactor);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,4 @@ private DEMDescriptor invertDEM(@NonNull final TopographyData topograpyModel) {
.build();
}

// warum muss ich das machen? die daten kommen aus einer 3d engine; die koordinaten muss hich hier quasi invertieren
// in der 3d engine ist unten links 0,0, ich brauche aber ein 0,0 oben links (image)
// ich muss also die daten um 180° drehen; wie mache ich das?
// ich iteriere über die daten und schreibe sie in ein neues array; das neue array ist dann um 180° gedreht
// gibts da einen algorithmus?

}

0 comments on commit c8fd1ee

Please sign in to comment.