Question

Is there a transformer for calculating "Directional distribution" ellipspoids (spatial statistics)?


Badge

Hi

I am a GIS Manager working in a police force in the UK.

Our crime analysts use ArcMap and use the "directional distribution" spatial statistics tool (toolbox) to look at directional distribution of crime.

see link: http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/directional-distribution.htm

We would like to create those as an output of a workflow which would be automated on a large scale and on a regular basis - however i can't find anything about that kind of spatial statistics tool in FME on the web.

At the moment we have an alternative using HullAccumulator to create a area shape from key locations eliminating outliers... but we would like something a little bit more ellispoidal.

Apologies but i can not send sample data etc. as senstitive information. Just wanted to know if any of you had some ideas on what is the equivalent FME transformer.

THANK YOU ALL.


15 replies

Badge +3

How about using R in an RCaller transformer? Or arcpy in a PythonCaller, and calling that ArcGIS tool you mention?

Badge +10

There isn't a transformer to do the same but I believe there is code for calculating a Standard Deviation Ellipse in R or you could use a pythoncaller to call the ArcPy function. The latter is probably the better option for consistency if other areas will continue using Arc to perform the analysis as there are slightly different methods which will produce different results. You could also do the math within FME itself.

Badge

Thanks both - yes I did not think about that! there are so many transformers, I just thought I was missing something.

Many thanks! :-)

Userlevel 4
Badge +25

If it's important to you (or others) please do file it as an "idea" where it can collect upvotes. This is the sort of tool our geometry team can implement, but only if there is sufficient demand. I would attempt a Hub transformer, but I think it's a bit complex to do a proper job on.

Badge +10

If it's important to you (or others) please do file it as an "idea" where it can collect upvotes. This is the sort of tool our geometry team can implement, but only if there is sufficient demand. I would attempt a Hub transformer, but I think it's a bit complex to do a proper job on.

It's not too difficult to recreate an ellipse that matches the one produced by ArcPy - they both look totally wrong to me though!

 

 

Userlevel 4
Badge +25

For what it's worth, I created a StandardDistanceEllipseCreator transformer and put it on the FME Hub. This is the first step towards an Standard Deviation ellipse. So it's part of the way there at least. It's a circle so it doesn't have the ellipse shape created yet, but it does measure standard distance and dispersion.

See: https://hub.safe.com/publishers/safe-lab/transformers/standarddistanceellipsecreator

I'll see if I can do the full deviation transformer later, though I'm not finding it as easy as @egomm !!!

Badge +10

For what it's worth, I created a StandardDistanceEllipseCreator transformer and put it on the FME Hub. This is the first step towards an Standard Deviation ellipse. So it's part of the way there at least. It's a circle so it doesn't have the ellipse shape created yet, but it does measure standard distance and dispersion.

See: https://hub.safe.com/publishers/safe-lab/transformers/standarddistanceellipsecreator

I'll see if I can do the full deviation transformer later, though I'm not finding it as easy as @egomm !!!

@mark2atsafe I'm not sure how easy it is to follow but the calculations are in the workspace below

ellipse.fmwt

Badge

For what it's worth, I created a StandardDistanceEllipseCreator transformer and put it on the FME Hub. This is the first step towards an Standard Deviation ellipse. So it's part of the way there at least. It's a circle so it doesn't have the ellipse shape created yet, but it does measure standard distance and dispersion.

See: https://hub.safe.com/publishers/safe-lab/transformers/standarddistanceellipsecreator

I'll see if I can do the full deviation transformer later, though I'm not finding it as easy as @egomm !!!

Wow amazing! I'll check it out!

 

Userlevel 4
Badge +25

@mark2atsafe I'm not sure how easy it is to follow but the calculations are in the workspace below

ellipse.fmwt

Wow, that's a lot of expressions in there!!! I'll do a few tests to make sure then make a transformer out of it - giving you full credit of course. Thanks for passing this on. I'm sure it will be useful to a number of users.

Badge +10

Wow, that's a lot of expressions in there!!! I'll do a few tests to make sure then make a transformer out of it - giving you full credit of course. Thanks for passing this on. I'm sure it will be useful to a number of users.

I think turning it into a reuseable transformer is the challenging part :-) The calculations are for 1 standard deviation btw. The square root of 2 in AttributeCreator3 is the bit to change if you want to make this flexible

Userlevel 4
Badge +25

I think turning it into a reuseable transformer is the challenging part :-) The calculations are for 1 standard deviation btw. The square root of 2 in AttributeCreator3 is the bit to change if you want to make this flexible

OK... I'm getting there. It's a slog but I daren't stop though, because I don't think I'll ever figure out where I was!

Userlevel 4
Badge +25

I think turning it into a reuseable transformer is the challenging part :-) The calculations are for 1 standard deviation btw. The square root of 2 in AttributeCreator3 is the bit to change if you want to make this flexible

I have it. At least, I followed an algorithm somewhere else, compared it to yours, and it all works out the same. Apart from my primary/secondary axes are the other way around to yours, which I can't figure out why (I mean, it's an easy swap, but I don't see why it's not right to start with). Anyway, we make progress...

Badge +2

If it's important to you (or others) please do file it as an "idea" where it can collect upvotes. This is the sort of tool our geometry team can implement, but only if there is sufficient demand. I would attempt a Hub transformer, but I think it's a bit complex to do a proper job on.

@mark2atsafe, this tool is important if it can be implemented in FME. I support this effort 100% I use a lot of directional distribution tool in Arc.Thanks guys for raising this!

Wes

Userlevel 4
Badge +25

OK, I implemented a DistanceDeviationEllipseCreator and posted it to the hub where I deprecated the previous StandardDistanceEllipseCreator (whose functionality is also inside this transformer)

https://hub.safe.com/publishers/safe-lab/transformers/distancedeviationellipsecreator

Basically you get the choice of 3 different techniques/modes, the ultimate being the Deviational Ellipse.

I hope this is useful - and sincerely hope it is correct too! I would suggest, if possible, comparing the results against a known/existing tool to ensure the results coincide, before using it on a regular basis.

Many thanks to @egomm for the great workspace.

Userlevel 4
Badge +25

@mark2atsafe, this tool is important if it can be implemented in FME. I support this effort 100% I use a lot of directional distribution tool in Arc.Thanks guys for raising this!

Wes

Well I made a custom transformer and it's on the hub at https://hub.safe.com/publishers/safe-lab/transformers/distancedeviationellipsecreator - please do let me know how it works for you. It's not an "official" transformer, but I think it is all correct and does most of the work you might need.

Reply