'Contour Lines from Grid' generates contours/polygons not to full grid extent but only up to the centres of the edge pixels. See attached image 1. This leads to serious artefacts in the resulting image: not only at the edges of the image, but also inside (gaps), if it is made up of separate parts. See attached image 2.
I had high hopes for the tool because of its useful 'Interpolation Scale' parameter, but this extent issue is a blocker for me.
Is it possible to implement contours/polygons creation aligned to the full raster extent?
I understand the problem, but I can't say how much effort it would take to adapt the tool as suggested. In my investigations I always choose data sets that are much larger than my area of interest / map because many algorithms behave differently at the edges. I then crop the resulting data sets, such as contour lines, accordingly to my AOI/map.
Would this be possible for your investigations?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Justus,
unfortunately, now I use data for a whole world. Yes, I can merge data, then retile this data with overlap, but I don't understand what to do with the edges along the dateline meridian. I need to eliminate the gap there somehow.
I've used 'gdal_contour' before and did not expect that SAGA generates contours/polygons differently, smaller than the raster extent. But I really want to use SAGA.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This solution is kinda hacky so please take it with a grain of salt. You could copy the column at the meridian and then manipulate the metadata. For example if you have a .sg-grd file extension you cloud open it in a text editor an offset the POSITION_YMIN Value so it wraps around the dateline.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually, I already tried to do this yesterday. I merged the data tiles, extracted the outermost pixels, added them to the west and east of the 180° meridian, corrected the extent. But then I stopped at the difficulty of dividing the grid, enlarged by 2 pixels, back into tiles.
So now I'm just waiting for the decision of the SAGA developers on the possibility of improving the 'Contour Lines from Grid' algorithm: to add an option that is available in many SAGA grid tools with 'grid cells' / 'grid nodes' available choices.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear developers,
'Contour Lines from Grid' generates contours/polygons not to full grid extent but only up to the centres of the edge pixels. See attached image 1. This leads to serious artefacts in the resulting image: not only at the edges of the image, but also inside (gaps), if it is made up of separate parts. See attached image 2.
I had high hopes for the tool because of its useful 'Interpolation Scale' parameter, but this extent issue is a blocker for me.
Is it possible to implement contours/polygons creation aligned to the full raster extent?
I understand the problem, but I can't say how much effort it would take to adapt the tool as suggested. In my investigations I always choose data sets that are much larger than my area of interest / map because many algorithms behave differently at the edges. I then crop the resulting data sets, such as contour lines, accordingly to my AOI/map.
Would this be possible for your investigations?
Justus,
unfortunately, now I use data for a whole world. Yes, I can merge data, then retile this data with overlap, but I don't understand what to do with the edges along the dateline meridian. I need to eliminate the gap there somehow.
I've used 'gdal_contour' before and did not expect that SAGA generates contours/polygons differently, smaller than the raster extent. But I really want to use SAGA.
This solution is kinda hacky so please take it with a grain of salt. You could copy the column at the meridian and then manipulate the metadata. For example if you have a
.sg-grd
file extension you cloud open it in a text editor an offset thePOSITION_YMIN
Value so it wraps around the dateline.Actually, I already tried to do this yesterday. I merged the data tiles, extracted the outermost pixels, added them to the west and east of the 180° meridian, corrected the extent. But then I stopped at the difficulty of dividing the grid, enlarged by 2 pixels, back into tiles.
So now I'm just waiting for the decision of the SAGA developers on the possibility of improving the 'Contour Lines from Grid' algorithm: to add an option that is available in many SAGA grid tools with 'grid cells' / 'grid nodes' available choices.
Would it make sense to create a feature request for this?
I'am sure this will be answered properly in the next days. I see no need for a feature request.
I decided that it would be right to commit the feature request.
Hi Andrey,
please have a look at my response to your feature request.
Best regards,
Volker