Commit 3f175671 authored by Stefan Schuhbaeck's avatar Stefan Schuhbaeck
Browse files

retrun default ReferenceSystem in TraCI

parent 65888632
Pipeline #661881 failed with stages
in 4 minutes and 59 seconds
......@@ -389,6 +389,8 @@ public class SimulationCommandHandler extends CommandHandler<SimulationVar> {
ReferenceCoordinateSystem coord =
state.getScenarioStore().getTopography()
.getAttributes().getReferenceCoordinateSystem();
// ensure default EPSG:32632 ReferenceCoordinateSystem if nothing is set.
coord = coord == null ? new ReferenceCoordinateSystem() : coord;
if (coord != null){
coord.initialize();
CompoundObject o = CoordRef.asCompoundObject(
......
......@@ -16,7 +16,7 @@ public class AttributesTopography extends Attributes {
* Reference coordinate system to translate vadere topography to world cooridnate systems
* such as UTM zones, or GPS lon lat.
*/
private ReferenceCoordinateSystem referenceCoordinateSystem = null;
private ReferenceCoordinateSystem referenceCoordinateSystem = new ReferenceCoordinateSystem();
// Getters...
......
......@@ -48,10 +48,6 @@ public class ReferenceCoordinateSystem {
*/
private VPoint translation = new VPoint(0.0,0.0);
public ReferenceCoordinateSystem() {
this.initialized = false;
}
public ReferenceCoordinateSystem(String epsgCode, String description, VPoint translation) {
this.epsgCode = epsgCode;
this.description = description;
......@@ -59,6 +55,10 @@ public class ReferenceCoordinateSystem {
this.initialized = false;
}
public ReferenceCoordinateSystem() {
this("EPSG:32632", "default reference system(EPSG:32632) without offset", new VPoint(0.0, 0.0));
}
public void initialize(){
if (initialized)
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment