How can I calculate area when I have multiple equations for many feature types?

2752
27
03-11-2019 02:51 PM
KaitlynAbrahamson
Occasional Contributor

Hi All,

I have another formula to create, but I am new to Survey123 and am not sure how to get what I need on the survey.  The project I am working on is sign inventory and the question I am having trouble with is with the area of each sign (200 different sign types).  I will have the width and height of each of the sign, but the signs, being all different shapes, have different area formulas. 

These are all the different formulas:

(Width * Height)/144 (The majority of the signs have this equation)

(SQUARE(Height/12)) * .76

((1 + (SQRT(2))) * 2) * (SQUARE((Width / 12)/2.4))

(Height * Height /333)

(Width * Width * .0052083)

(Width)/12

(Width * Height)/182.5

(Height * Height * .0042918)

I have this for an equation (${SignWidth}*(${SignHeight})div144) for the majority of the signs, but the more advanced equations I am clueless on.  If you know how to write out some of these, that would be very helpful.  I am not even sure which survey column I should be writing these in either (calculation, relevent, etc.?)

I think I am in need of a very intense, nested if statement, but maybe it needs to be broken up in some way. I've included what my data looks like for reference.  Please help!

0 Kudos
27 Replies
DougBrowning
MVP Esteemed Contributor

Have the last equation just show you the value ( without the if part) and see what value it is getting.  It may be a ‘’ if hidden via a relevant.  If so adjust your if.

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi Kaitlyn

Just to confirm, Doug Browning is right regarding pulldata - using pulldata in the calculation column to pull a formula from a CSV won't work; the formula would simply be returned as a string rather than being evaluated as an expression.

Sounds like you're making progress with your if statements and calculations!

Best regards,

Jim

0 Kudos
KaitlynAbrahamson
Occasional Contributor

Thank you for your help!  I ended up trying to use the pulldata function, but am having little luck.  My data is not showing up and I am not sure what is wrong.

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi Kaitlyn, how are you using the pulldata function? Would it be possible to share your XLSForm and CSV so I can see how your survey is structured? Thanks, Jim

0 Kudos
KaitlynAbrahamson
Occasional Contributor

Hi Jim,

I have ended up restructuring my survey so many times.  I am using the pulldata function to pull what I can for width and height so I can calculate area.  It's working well, but now I have run into needing a nested if statement will all my formulas.  The syntax is killing me when I try to put them all together.

0 Kudos
KaitlynAbrahamson
Occasional Contributor

On top of that, when I try to do a calculation with even one of my formulas, the area does not change if I alter the width and height in the survey.  I'm not sure Survey123 is that dynamic.

0 Kudos
BenjaminHanzen
New Contributor II

Hey Kaitlyn,

I hope things are going well for you! 

I'm not sure I fully understand the question. Is there a criteria that is met in order to determine area calculation? I'm guessing if its octagonal such as your stop sign you use a certain equation correct?

Might I suggest you use the look up function where you define each sign with the equation so that it pulls that equation for that criteria. I wonder how you're setting up your pull data currently that you are still looking to use nested statements. 

Survey123 for ArcGIS – XLSForm: Enabling CSV Data into your Survey - YouTube 

Let me know if that helps. Nested if functions are exhausting.

0 Kudos
AbdoAbdelrasoul1
New Contributor II

I think first you need to identify scenarios for each equation to use, then come up with code for each scenario/equation e.g. 1, 2,3 for people to enter in the field/office, also you can add another field for exceptions, then query each code (may be with exception) to apply the right equation.  Good luck, Abdo

0 Kudos