Select to view content in your preferred language

Data that spans 2 grid squares

5976
19
Jump to solution
10-26-2015 02:07 PM
janehansen
Regular Contributor

I have a polygon grid that covers the an area of concern, I have created polylines from the fishing events, each fishing event is associated with the number of salmon caught.  Some of the lines span two grid squares.  I need to rank the grids based on the number of salmon caught.  If the line spans two grids what grid should be ranked highest is one question.  We don't know if the majority of the fish were caught in one grid square or the other so how can you defend that one or the other grid square should be ranked the highest. 

Is there a way to address this is the most defensible way possible?

Thanks

0 Kudos
19 Replies
janehansen
Regular Contributor

Thanks Dan, my file was not projected but it is now.... I added a new field and used the field calculator and the length field works just fine. 

Thanks again, I think I can move forward.

0 Kudos
DanPatterson_Retired
MVP Emeritus

good news... good luck

0 Kudos
janehansen
Regular Contributor

Well, I am getting closer.

Now that I have created my split.  I have two columns for length.  One with the the total length of the line, and one with the split line lengths. 

one set of rows for one line that spans 2 grid squares

total length field

4518

4518

split length field

2475

2042

I am unsure how to calculate the percents using the field calculator as each set of total length and split length are unique.  I can not use the query split length/total length to get the percent for each set of split lines as the query would lump all rows together

Is there a query that can be used that will separate out each set of split length rows  based on the total length field and the identical values found for one set within those rows?

0 Kudos
janehansen
Regular Contributor

I have a column that is numbered 1 to... for each set of rows that correlate to a split line those numbers are duplicated...such as in the example below :

number field   total length field   split length field

1                              4518               2475

1                               4518              2042

the same applies for all the sets. Can I write a query that would identify each set based on the number field ?

0 Kudos
DanPatterson_Retired
MVP Emeritus

you shouldn't need to query, just divide the split length field by the total length field.  Should you need to do a subset, ie query for 1, then perform the calculation, the field calculator does the calculations on 

a selection.... just like in a spreadsheet

janehansen
Regular Contributor

Ok, I thought there might be a way to do all the sub sets at once so I didn't have to select ea. subset, perform the calculation and repeat.

Thanks

0 Kudos
DanPatterson_Retired
MVP Emeritus

that is my point

if each segment has an original id number and you split it, there should be 2 or more records with the same original id, the same original length and a new length.... take the new length field and divide by the original length field.... don't be afraid...make a copy of the file first and test on the copy

0 Kudos
janehansen
Regular Contributor

I got it, thanks

0 Kudos
DanPatterson_Retired
MVP Emeritus

  and everyone around you survived

0 Kudos
janehansen
Regular Contributor

barely ha ha....thanks for sticking with me.

0 Kudos