WikiWatershed / model-my-watershed

The web application front end for Model My Watershed.
https://modelmywatershed.org
Apache License 2.0
57 stars 31 forks source link

Create visual tiles for % slope #2348

Closed ajrobbins closed 6 years ago

ajrobbins commented 7 years ago

Using either GeoTrellis or the gdal script Matt's used previously, create visual tiles for % slope and store on S3 as we do for other overlays. Add the applicable layers to the layer selector and enable visualization in the app, under the coverage grid category.

arottersman commented 6 years ago

Just to get the color ramp thread going here — is there already a color ramp out for approval/coming from client or do we need to make one? If we need to make one, are stats needed for the layer?

If we'd like to start this work without it, we can write a class in civic-apps-etl using a built-in GT color ramp, confirm a local test works, and then be ready to go for the national scale when the final color ramp comes in.

arottersman commented 6 years ago

Layer in catalog is called us-percent-slope-30m-epsg5070-512

ajrobbins commented 6 years ago

We need to make one; there isn't one out for approval yet. If you could provide the summary stats for the layer, that would be great.

arottersman commented 6 years ago

Calculated stats on us-percent-slope-30m-epsg5070-512 via the GT Histogram[Double] statistics. Class is here

---- STATISTICS ----
Mean: 8.854093957743567
StdDev: 14.561038278135415
Min: 0.0
Max: 951.4365844726562
arottersman commented 6 years ago

The ocean, which I would expect to contain a NoData value, has a value of 0 instead. This makes sense in that it's "flat", but means our tiles will be as ugly as the NLCD with a big green box around the country.

/cc @ajrobbins @mmcfarland

arottersman commented 6 years ago

On further inspection, it seems the data does have NoData values farther out from the land:

screen shot 2018-01-18 at 2 21 05 pm
ajrobbins commented 6 years ago

Color ramp has been approved! Here are the RGB values and the raster values they should be associated with, on a stretched color ramp:

Image examples: boulder_opaque.png delaware_opaque.png

ajrobbins commented 6 years ago

Color ramp: ramp_bottom.png

ramp_top.png

arottersman commented 6 years ago

There are some small discrepancies at higher % slope values, but I think this is close enough to move forward with the national. I'm unsure what ArcMap does to spread the uppermost quartile — I had to add in an additional step pulled from the boulder screencap, 51 -> RBG(162, 72, 29), to get the results below.

screen shot 2018-01-29 at 12 59 52 pm

screen shot 2018-01-29 at 12 58 31 pm

ajrobbins commented 6 years ago

Never seen something so beautiful in my life!

arottersman commented 6 years ago

The tiles are in s3://tiles.us-east-1.azavea.com/us-percent-slope-30m. @ajrobbins, what should the layer be called in the layer picker?

ajrobbins commented 6 years ago

"Slope (Percent)"

ajrobbins commented 6 years ago

Note that we should be incorporating the legend in the layer picker in the style of mean monthly precip: screen shot 2018-01-29 at 2 39 27 pm

If that's out of scope for this card, we can make a new one.