Print

Print


Annetta,

I noticed a note to myself at my desk this morning. It has 1degree = 111.32 Km. So, 1/1000 of a degree (0.001) would be 111.32 meters, not 1.11 meter.

Right?

//
Bill


> On Feb 13, 2019, at 1:54 PM, Annetta Burger <[log in to unmask]> wrote:
> 
> I am currently using setUserData() and getUserData() to get the dynamic health status of my agents for Portrayals:
> 
>               this.getGeometry().setUserData(this.getHealthStatus());  --- in the Constructor
> and
>               int hColor = (int) (((MasonGeometry)object).getUserData());  --- in the UI
> 
> 
> However, I am now trying to use GeoMason's getObjectsWithinDistance(), which returns a bag of objects with points. This function requires the use of casting to get the object or any attribute of the object other than the Point Geometry. For example, I'd like to get either the object itself or the object's assigned ID.
> 
> Example of casting solution from getObjectsWithinDistance() in DSchelling:
> DPerson neighbor = (DPerson) ((MasonGeometry) o).getUserData();
> 
> I can't use getUserData() for both purposes. It seems to only set one agent attribute. Is there another way to do either of these things? Can setUserData() ever be used for more than one attribute.
> 
> Thanks in advance!
> Annetta