Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate SedNitr value from SoilN raster #2261

Merged
merged 2 commits into from
Sep 15, 2017
Merged

Conversation

rajadain
Copy link
Member

Overview

Calculates the average SoilN value for a given area of interest
and multiplies it by 4.0 to get the SedNitr value. This was
previously staticly set at 2000.

Connects #1754

Demo

Here is the GMS file produced on this branch: MapShed_SoilN.gms.txt

As can be seen on line 37 position 1, the value is not 2000:

1004,320,5.576021102150538,0.047421639784946235,0.25,0.25

The value of 1004 is for a square kilometer AoI in Center City Philadelphia.

image

Notes

I imagine that the value of 2000 is typical of agricultural land use heavy areas of interest, so a value of ~1000 for a city sounds reasonable. For an area of interest with most land use in the categories of Cultivated Crops and Pasture / Hay, we are more likely to get a higher value.

Testing Instructions

  • Check out this branch, and restart Celery vagrant ssh worker -c 'sudo service celeryd restart'
  • Go to :8000/ and draw a shape and create a MapShed job
  • Export the GMS file and observer line 37, position 1. Ensure that it isn't 2000.

Calculates the average SoilN value for a given area of interest
and multiplies it by 4.0 to get the SedNitr value. This was
previously staticly set at 2000.

Originally a static value of 2000 at Class1.vb@1.3.0:9587
"""
if 'error' in sjs_result:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonder when it would make sense to rename sjs_result -> geoprocessing_result.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it just this file that refers to it as such? I'd be happy to include a rename commit while working on the other two cards in this family.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a lint commit to this PR that changes all of them. Good catch.

Copy link

@arottersman arottersman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, and working as far as I can tell.

Thanks for the true mapshed initiation! Really helpful.

@arottersman arottersman assigned rajadain and unassigned arottersman Sep 15, 2017
@rajadain rajadain merged commit 9edc2d8 into develop Sep 15, 2017
@rajadain rajadain deleted the tt+arr/mapshed-soiln branch September 15, 2017 22:32
@rajadain rajadain mentioned this pull request Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants