Skip to content

Comments

NGWPC-9449 - Update 3D channel mapping#60

Open
brock-hinkson wants to merge 2 commits intomainfrom
NGWPC-9449
Open

NGWPC-9449 - Update 3D channel mapping#60
brock-hinkson wants to merge 2 commits intomainfrom
NGWPC-9449

Conversation

@brock-hinkson
Copy link

@brock-hinkson brock-hinkson commented Feb 18, 2026

Refined the 3D channel mapping by changing flowpaths from lines to polygons, as well as other misc QoL improvements.

Additions

  • Added color gradient legend for 3D channel mapping
  • Added examples and suggested inputs for RAS XS input parameters

Changes

  • Changed channel width mapping to buffer the flowpaths, making them polygonal. This greatly improves accuracy of stream width visualization, as the previous method used absolute pixel width
  • Updated Streamlit server config to increase file size upload limit, allowing for bigger maps to be displayed

Copy link

@quercoak quercoak left a comment

Choose a reason for hiding this comment

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

Looking good! I think the polygon fix is working pretty well. I like the legend and explanation.
A few things to address:

  1. Buffering CRS should be 5070 for CONUS
  2. I'm confused why reference flowpaths are used as the ID in the subset map. My assumption is we should be using fp_id, but if there is reason to keep it with the reference let me know.
  3. I'm confused about whether width and depth are both being used. It seems like only y_ml gets mapped but both are mentioned in tooltip.
  4. Would you be able to check on the amount of nodatas in y_ml? The example gage has no datas for half the map which is a little clumsy to show as an example. Maybe we need a note about no data and how it visualizes? If I were using this I would be confused why half the network disappeared in the example gage.
  5. If we are only visualizing the ML data, can you add that to the tooltip?
  6. I think we should rename 3D to whatever it actually is - channel depth or width. 3D feels ab it generous given it's a 2D map and we are only mapping one dimension at a time (if we are even mapping both).
  7. Performance: With the addition of polygons, the ras_xs map really fails with the New Mexico bounding box if you try to move the map at all. I think as lines it was okay but too much data as polygons. How do you feel about enforcing an upper limit on xs that can be shown? We could paginate the results for the map and leave the download full. If you have a look at how STAC browsers work, they paginate search results.

)

# Project flowpath line geometry to a metric CRS for buffering (to visualize width as a buffer around the line)
three_dim_fp_data = reference_flowpaths.to_crs(epsg=32632)

Choose a reason for hiding this comment

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

Why are you using this CRS? Should be 5070 for conus. This is what you selected: https://epsg.io/32632 which is for
Is there a reason to use reference flowpaths for geom rather than the NHF flowpaths? It makes more sense to me to use the finished product (NHF flowpaths) but if there's a practical reason to use reference let me know

tooltip=folium.GeoJsonTooltip(
fields=[fp_popup_fields[0], "width", "depth"],
aliases=["Reference Flowpath ID:", "Width (ft):", "Depth (ft):"],
aliases=["Reference Flowpath ID:", "Width (m):", "Depth (m):"],

Choose a reason for hiding this comment

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

If we change from reference flowpaths change the alias here

fp_hl_style = STYLE_MAP["flowpaths"].get("highlight_styling", {})

# Project flowpath line geometry to a metric CRS for buffering (to visualize width as a buffer around the line)
fp_data = fp_data.to_crs(epsg=32632)

Choose a reason for hiding this comment

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

again crs should be 5070

},
popup_keep_highlighted=True,
)
m.add_child(folium.FeatureGroup(name="3D Flowpaths", show=False).add_child(three_dim_fp_poly))

Choose a reason for hiding this comment

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

Can we call this feature channel width? I think 3D is a bit generous given it's still a 2d map.

"The subset returned will include only cross-sections that fully fit into the bounding box."
)

three_dim_flowpath_tooltip = """The 3D Flowpaths map layer visualizes flowpath width and depth.

Choose a reason for hiding this comment

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

It looks like the legend in the subsetter only has depth legend. Are we using width somewhere? I don't think a single layer would accommodate both depth and width unless you are calculating the cross-sectional area. I don't recommend that because of the no datas. I'm wondering if it would be better to use topwdth since I think we have that filled out for more places than using y_ml which seems to have a fair amount of no datas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants