3

I am using Repast Simphony for a project that involves airspace and would like to have agents move in 3D continuous space above a GIS projection that has static ground-based agents. Currently, I have separate Geography and ContinuousSpace projections in the same context and move agents simultaneously in both projections, but the GIS display is only 2D in terms of agent motion.

I noticed that the Geometry objects used to set position in a Geography have a Coordinate.z fields, but setting the z value to anything other than NaN does nothing. I haven't found anything in the docs about this.

I plan on implementing the Projection interface and making my own projection, as I cannot implement the Geography and ContinuousSpace in the same class due to conflicting method signatures ('getAdder'). This seems a rather daunting task, so I figured it would be worth checking if there are any better ways of going about this?

aliaksei
  • 714
  • 1
  • 9
  • 23

1 Answers1

3

You can elevate point markers in the 3D GIS display by overriding the repast.simphony.visualization.gis3D.style.MarkStyle() method

public double getElevation(T obj)

that will place the point marker at the elevation specified in meters in the 3D GIS display. The JTS Coordinate object can store a z-value as you indicated, but none of the Geotools or JTS spatial math use this value as the CRS transforms are all based on 2D topography. I believe the getElevation() in the style specifies elevation relative to ground and not sea level. You can provide a method in your agents that provides the current elevation to the style, and then just have the style return the agent.getElevation().

Eric Tatara
  • 715
  • 3
  • 12