QGIS 3.4 Stream delineation problem, lines running too far into oceanProblem with hub lines (in...
Is there a word to describe the feeling of being transfixed out of horror?
Reply ‘no position’ while the job posting is still there (‘HiWi’ position in Germany)
What should I use for Mishna study?
Can I create an upright 7ft x 5ft wall with Minor Illusion?
node command while defining a coordinate in TikZ
Why isn't KTEX's runway designation 10/28 instead of 9/27?
Can I rely on these GitHub repository files?
When is separating the total wavefunction into a space part and a spin part possible?
Could solar power be utilized and substitute coal in the 19th century?
Is the next prime number always the next number divisible by the current prime number, except for any numbers previously divisible by primes?
How do ultrasonic sensors differentiate between transmitted and received signals?
My boss asked me to take a one-day class, then signs it up as a day off
Did US corporations pay demonstrators in the German demonstrations against article 13?
Can a Bard use an arcane focus?
Who must act to prevent Brexit on March 29th?
How can I successfully establish a nationwide combat training program for a large country?
Giant Toughroad SLR 2 for 200 miles in two days, will it make it?
A known event to a history junkie
I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?
Can I Retrieve Email Addresses from BCC?
How do I repair my stair bannister?
Lifted its hind leg on or lifted its hind leg towards?
Can somebody explain Brexit in a few child-proof sentences?
Hostile work environment after whistle-blowing on coworker and our boss. What do I do?
QGIS 3.4 Stream delineation problem, lines running too far into ocean
Problem with hub lines (in Qgis)Watershed delineation with meandering river?Lines to Polygons problem qgis 2.14.9Multiple flow distance rasters produce low distance values along catchment boundaryDelineating coastal subbasins using SAGA GIS or GRASS in QGIS?Save ocean shape layer using another CRS problem using QGISMerging overlapping lines into one line. QGISDEM reconditioning?UBUNTU 16.04, QGIS 3.4 above Installation problemProblem editing, clipping, and saving large shapefile QGIS 3.4
I am using QGIS 3.4.4 Madeira version trying to delineate the stream and catchment areas of a small Bay in Honduras based on the technique of Hanz van der kwast tutorial "Stream and Catchment delineation in QGIS 3".
I imported DEM > reprojected > Used SAGAs Fill Sinks (Wang and Liu) > USED SAGAs Strahler Order to delineate streams.
What happens is that the tool cannot decipher what is land at sea level and what is the actual sea and creates channels running straight off into the ocean. HOW CAN I CORRECT THE DEM BEFORE USING STREAM DELINEATION TOOL SO I DON'T HAVE MY STREAMS RUNNING FAR OFF INTO THE OCEAN? I WANT THEM TO STOP WHEN THEY HIT THEIR DRAINAGE POINT (i.e. Bay/Ocean).
I've already tried clipping the raster to a polygon of the land area to simply cut out the ocean from the raster, but then the results don't work as I am guessing I cut out important information that the tool needs to process (streams and basins are completely missing).
Let me know if I haven't voiced the problem clearly. I'm rusty with GIS in general and am totally new to QGIS. Please use layman's terms if possible. Thanks

qgis dem ocean strahler stream
New contributor
Olivia Dat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I am using QGIS 3.4.4 Madeira version trying to delineate the stream and catchment areas of a small Bay in Honduras based on the technique of Hanz van der kwast tutorial "Stream and Catchment delineation in QGIS 3".
I imported DEM > reprojected > Used SAGAs Fill Sinks (Wang and Liu) > USED SAGAs Strahler Order to delineate streams.
What happens is that the tool cannot decipher what is land at sea level and what is the actual sea and creates channels running straight off into the ocean. HOW CAN I CORRECT THE DEM BEFORE USING STREAM DELINEATION TOOL SO I DON'T HAVE MY STREAMS RUNNING FAR OFF INTO THE OCEAN? I WANT THEM TO STOP WHEN THEY HIT THEIR DRAINAGE POINT (i.e. Bay/Ocean).
I've already tried clipping the raster to a polygon of the land area to simply cut out the ocean from the raster, but then the results don't work as I am guessing I cut out important information that the tool needs to process (streams and basins are completely missing).
Let me know if I haven't voiced the problem clearly. I'm rusty with GIS in general and am totally new to QGIS. Please use layman's terms if possible. Thanks

qgis dem ocean strahler stream
New contributor
Olivia Dat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
are you open to a python-based solution?
– Paul H
22 mins ago
add a comment |
I am using QGIS 3.4.4 Madeira version trying to delineate the stream and catchment areas of a small Bay in Honduras based on the technique of Hanz van der kwast tutorial "Stream and Catchment delineation in QGIS 3".
I imported DEM > reprojected > Used SAGAs Fill Sinks (Wang and Liu) > USED SAGAs Strahler Order to delineate streams.
What happens is that the tool cannot decipher what is land at sea level and what is the actual sea and creates channels running straight off into the ocean. HOW CAN I CORRECT THE DEM BEFORE USING STREAM DELINEATION TOOL SO I DON'T HAVE MY STREAMS RUNNING FAR OFF INTO THE OCEAN? I WANT THEM TO STOP WHEN THEY HIT THEIR DRAINAGE POINT (i.e. Bay/Ocean).
I've already tried clipping the raster to a polygon of the land area to simply cut out the ocean from the raster, but then the results don't work as I am guessing I cut out important information that the tool needs to process (streams and basins are completely missing).
Let me know if I haven't voiced the problem clearly. I'm rusty with GIS in general and am totally new to QGIS. Please use layman's terms if possible. Thanks

qgis dem ocean strahler stream
New contributor
Olivia Dat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I am using QGIS 3.4.4 Madeira version trying to delineate the stream and catchment areas of a small Bay in Honduras based on the technique of Hanz van der kwast tutorial "Stream and Catchment delineation in QGIS 3".
I imported DEM > reprojected > Used SAGAs Fill Sinks (Wang and Liu) > USED SAGAs Strahler Order to delineate streams.
What happens is that the tool cannot decipher what is land at sea level and what is the actual sea and creates channels running straight off into the ocean. HOW CAN I CORRECT THE DEM BEFORE USING STREAM DELINEATION TOOL SO I DON'T HAVE MY STREAMS RUNNING FAR OFF INTO THE OCEAN? I WANT THEM TO STOP WHEN THEY HIT THEIR DRAINAGE POINT (i.e. Bay/Ocean).
I've already tried clipping the raster to a polygon of the land area to simply cut out the ocean from the raster, but then the results don't work as I am guessing I cut out important information that the tool needs to process (streams and basins are completely missing).
Let me know if I haven't voiced the problem clearly. I'm rusty with GIS in general and am totally new to QGIS. Please use layman's terms if possible. Thanks

qgis dem ocean strahler stream
qgis dem ocean strahler stream
New contributor
Olivia Dat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Olivia Dat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Olivia Dat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 33 mins ago
Olivia DatOlivia Dat
1
1
New contributor
Olivia Dat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Olivia Dat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Olivia Dat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
are you open to a python-based solution?
– Paul H
22 mins ago
add a comment |
are you open to a python-based solution?
– Paul H
22 mins ago
are you open to a python-based solution?
– Paul H
22 mins ago
are you open to a python-based solution?
– Paul H
22 mins ago
add a comment |
1 Answer
1
active
oldest
votes
I would create a new raster dataset with the ocean's masked out. Assuming any cell with an elevation less than or equal to zero, I would do:
import numpy
import rasterio
with rasterio.open('path/to/orig.tif', 'r') as orig:
land_and_sea = orig.read(1)
meta_data = orig.meta.copy()
nodata_value = -9999
meta_data['nodata'] = nodata_value
with rasterio.open('/path/to/masked.tif', 'w', **meta_data) as masked:
land_only = numpy.where(land_and_sea >= 0, land_and_sea, nodata_value)
masked.write(land_only, 1)
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Olivia Dat is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f316656%2fqgis-3-4-stream-delineation-problem-lines-running-too-far-into-ocean%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I would create a new raster dataset with the ocean's masked out. Assuming any cell with an elevation less than or equal to zero, I would do:
import numpy
import rasterio
with rasterio.open('path/to/orig.tif', 'r') as orig:
land_and_sea = orig.read(1)
meta_data = orig.meta.copy()
nodata_value = -9999
meta_data['nodata'] = nodata_value
with rasterio.open('/path/to/masked.tif', 'w', **meta_data) as masked:
land_only = numpy.where(land_and_sea >= 0, land_and_sea, nodata_value)
masked.write(land_only, 1)
add a comment |
I would create a new raster dataset with the ocean's masked out. Assuming any cell with an elevation less than or equal to zero, I would do:
import numpy
import rasterio
with rasterio.open('path/to/orig.tif', 'r') as orig:
land_and_sea = orig.read(1)
meta_data = orig.meta.copy()
nodata_value = -9999
meta_data['nodata'] = nodata_value
with rasterio.open('/path/to/masked.tif', 'w', **meta_data) as masked:
land_only = numpy.where(land_and_sea >= 0, land_and_sea, nodata_value)
masked.write(land_only, 1)
add a comment |
I would create a new raster dataset with the ocean's masked out. Assuming any cell with an elevation less than or equal to zero, I would do:
import numpy
import rasterio
with rasterio.open('path/to/orig.tif', 'r') as orig:
land_and_sea = orig.read(1)
meta_data = orig.meta.copy()
nodata_value = -9999
meta_data['nodata'] = nodata_value
with rasterio.open('/path/to/masked.tif', 'w', **meta_data) as masked:
land_only = numpy.where(land_and_sea >= 0, land_and_sea, nodata_value)
masked.write(land_only, 1)
I would create a new raster dataset with the ocean's masked out. Assuming any cell with an elevation less than or equal to zero, I would do:
import numpy
import rasterio
with rasterio.open('path/to/orig.tif', 'r') as orig:
land_and_sea = orig.read(1)
meta_data = orig.meta.copy()
nodata_value = -9999
meta_data['nodata'] = nodata_value
with rasterio.open('/path/to/masked.tif', 'w', **meta_data) as masked:
land_only = numpy.where(land_and_sea >= 0, land_and_sea, nodata_value)
masked.write(land_only, 1)
answered 11 mins ago
Paul HPaul H
374211
374211
add a comment |
add a comment |
Olivia Dat is a new contributor. Be nice, and check out our Code of Conduct.
Olivia Dat is a new contributor. Be nice, and check out our Code of Conduct.
Olivia Dat is a new contributor. Be nice, and check out our Code of Conduct.
Olivia Dat is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f316656%2fqgis-3-4-stream-delineation-problem-lines-running-too-far-into-ocean%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
are you open to a python-based solution?
– Paul H
22 mins ago