Hello,
I want to calculate a midpoint from a geo-polygon. I know I should use the ruby filter but I don't know how.
My formula looks like this:
pmidlat = plat2 - ((plat2 - plat3) / 2)
pmidlong = plong4 - ((plong4 - plong3) / 2)
My geo polygon is an array with nested fields and looks like this:
"StageLocation": [
{"GPSHeight": 0, "GPSLatitude": 44.13380000000005, "GPSLongitude": 39.126500000000064},
{"GPSHeight": 0, "GPSLatitude": 44.13380000000005, "GPSLongitude": 39.06050000000006},
{"GPSHeight": 0, "GPSLatitude": 44.06780000000005, "GPSLongitude": 39.06050000000006},
{"GPSHeight": 0, "GPSLatitude": 44.06780000000005, "GPSLongitude": 39.126500000000064}
],
Could anybody help me or give me some advice? Thank you so much!