I have a point layer (stored in SQL Server 2008) that is being served up by a map service in ArcGIS Server 10.1. I am consuming this service in a web client.

Lets say the points are boats out at sea.
This is mock data, but I want to simulate these boats moving around in a logical pattern.

At the moment, I have an arcpy script that updates the X,Y within a bounding box, and also updates two fields for speed and direction (which the layer is symbolised by)

This is all done using the random module from Python.

It works fine, but does not look realistic.

I have formulated some ideas about having a LUT, with X,Y, Speed, Direction, for each 'boat' that could be referenced to update by.

However, this must have been done before, but I have yet to find any examples. I would prefer not to spend development time to try to re-invent the wheel, so was wondering if anyone had a similar script for achieving this that they could share as an answer for all?

Reason I choose boats, as its not essential for them to be following a path such as a road. The simulation does not need to be 99% accurate on how the (insert moving something) actually moves around in the real world, but does simulate movement.

Perhaps if the answer was using a pre-cooked LUT, then the paths could be defined beforehand?

  • 2
    Any simulation determines the evolution of the system it simulates, and thereby contains all the information needed to compute the evolution. This means it is absolutely precise and quantitative. The challenge, then, is to translate your knowledge of the system into quantitative rules to conduct the simulation. Unfortunately, "logical pattern" is far too vague to admit any such translation. This makes the question unanswerable. Could you supply additional information about how the boats are supposed to move around? – whuber Sep 9 '12 at 14:26
  • Do you want the boats to change direction if they reach the edge of some predefined box? – Kirk Kuykendall Sep 9 '12 at 16:17
  • The link in this post is broken, which is why we ask that code snippets always be provided within the question as formatted text. – PolyGeo Sep 21 '17 at 23:44

It seems what you want to implement is some sort of agent-based simulation. This might be an overcomplicated thing to do if all you want is some mock data for testing your real-time map app. I'd recommend to get hold of real ship gps tracking data and use that to update your database. The data provided by the AIS system might be good for that. For example, you can download .kmz data containing single vessel tracks via http://shipfinder.co/.

However, if you really want to do some sort of agent-based simulation, I might be able to help you with this if you specify what exactly it is you want the vessels to do (move from harbour a to harbour b? with or without collision avoidance? shortest path or navigation via buoys and other marine traffic signs?).

Not the answer you're looking for? Browse other questions tagged or ask your own question.