-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
143 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
contribs/simwrapper/src/main/java/org/matsim/simwrapper/viz/ColorScheme.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.matsim.simwrapper.viz; | ||
|
||
/** | ||
* Utility class that holds some, but not all available color schemes. | ||
* See {@link <a href="https://github.com/d3/d3-scale-chromatic/tree/main">here</a>} | ||
*/ | ||
public final class ColorScheme { | ||
|
||
public static final String Accent = "Accent"; | ||
public static final String Dark2 = "Dark2"; | ||
public static final String Paired = "Paired"; | ||
public static final String Pastel1 = "Pastel1"; | ||
public static final String Pastel2 = "Pastel2"; | ||
public static final String Set1 = "Set1"; | ||
public static final String Set2 = "Set2"; | ||
public static final String Set3 = "Set3"; | ||
public static final String Tableau10 = "Tableau10"; | ||
public static final String RdGy = "RdGy"; | ||
public static final String RdYlBu = "RdYlBu"; | ||
public static final String RdBu = "RdBu"; | ||
public static final String PiYG = "PiYG"; | ||
public static final String RdYlGn = "RdYlGn"; | ||
public static final String Spectral = "Spectral"; | ||
public static final String Turbo = "Turbo"; | ||
public static final String CubehelixDefault = "CubehelixDefault"; | ||
public static final String Viridis = "Viridis"; | ||
public static final String Inferne = "Inferne"; | ||
public static final String Cividis = "Cividis"; | ||
public static final String Rainbow = "Rainbow"; | ||
|
||
|
||
private ColorScheme() { | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
contribs/simwrapper/src/main/java/org/matsim/simwrapper/viz/GridMap.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package org.matsim.simwrapper.viz; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* The Tile plug-in creates an overview of important key figures. | ||
*/ | ||
public class GridMap extends Viz { | ||
|
||
/** | ||
* The filepath containing the data. | ||
*/ | ||
@JsonProperty(required = true) | ||
public String file; | ||
|
||
/** | ||
* The projection containing the projection e.g. EPSG:25832. | ||
*/ | ||
@JsonProperty(required = true) | ||
public String projection; | ||
|
||
/** | ||
* The cellSize containing the cellSize in meters. | ||
*/ | ||
@JsonProperty(required = false) | ||
public Integer cellSize; | ||
|
||
/** | ||
* The opacity defines the opacity of the grids (between 0 and 1); | ||
*/ | ||
@JsonProperty(required = false) | ||
public Double opacity; | ||
|
||
/** | ||
* The maxHeight defines the maximum height of the "towers". | ||
*/ | ||
@JsonProperty(required = false) | ||
public Integer maxHeight; | ||
|
||
private Map<String, Object> colorRamp; | ||
|
||
public GridMap() { | ||
super("gridmap"); | ||
} | ||
|
||
/** | ||
* Set the color ramp name. | ||
*/ | ||
public GridMap setColorRamp(String ramp) { | ||
colorRamp = Map.of("ramp", ramp); | ||
return this; | ||
} | ||
|
||
/** | ||
* Sets the full color ramps settings. | ||
*/ | ||
public GridMap setColorRamp(String ramp, int steps, boolean reverse) { | ||
colorRamp = Map.of("ramp", ramp, "reverse", reverse, "steps", steps); | ||
return this; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
contribs/simwrapper/src/main/java/org/matsim/simwrapper/viz/XYTime.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters