Conversation
|
Changes unknown |
apps/gdalalg_raster_as_features.cpp
Outdated
| while (m_row < m_window.nYSize) | ||
| { | ||
| const double *pSrcVal = static_cast<double *>(m_buf) + | ||
| (m_row * m_window.nXSize * m_bands.size() + |
There was a problem hiding this comment.
should make codeql happy:
| (m_row * m_window.nXSize * m_bands.size() + | |
| (m_bands.size() * m_row * m_window.nXSize + |
apps/gdalalg_raster_as_features.cpp
Outdated
| m_bandFields.push_back(m_defn->GetFieldIndex(fieldName)); | ||
| } | ||
|
|
||
| ResetReading(); |
There was a problem hiding this comment.
to make cppcheck happy
| ResetReading(); | |
| GDALRasterAsFeaturesLayer::ResetReading(); |
|
Should we have some sort of test for pixel-is-area and pixel-is-point rasters? And should we warn users if they want to convert pixel-is-point data into polygons? |
|
clang static analyzer failing with Code in question: Lines 9634 to 9644 in 4eb6fd8 I confess I don't understand the problem. |
apps/gdalalg_raster_as_features.cpp
Outdated
| m_it = m_ds.GetRasterBand(1)->IterateWindows().begin(); | ||
| m_end = m_ds.GetRasterBand(1)->IterateWindows().end(); |
There was a problem hiding this comment.
maybe try the following to make clang static analyzer happy ?
| m_it = m_ds.GetRasterBand(1)->IterateWindows().begin(); | |
| m_end = m_ds.GetRasterBand(1)->IterateWindows().end(); | |
| #include <cassert> |
| m_it = m_ds.GetRasterBand(1)->IterateWindows().begin(); | |
| m_end = m_ds.GetRasterBand(1)->IterateWindows().end(); | |
| GDALRasterBand* poFirstBand = m_ds.GetRasterBand(1); | |
| assert(poFirstBand); | |
| m_it = poFirstBand->IterateWindows().begin(); | |
| m_end = poFirstBand->IterateWindows().end(); |
and this will need to be rebased on top of latest master to fix conflict
4eb6fd8 to
01c34ca
Compare
|
hum, CSA still no happy. maybe try the following (using plain assert(), and adding a otherwise we'll need to add a suppression in ci/travis/csa_common/script.sh |
| // If invalid block size is reported, just use a value of 1. | ||
| CPLErrorStateBackuper state(CPLQuietErrorHandler); | ||
| #ifdef CSA_BUILD | ||
| assert(this); |
There was a problem hiding this comment.
I doubt this will be effective here as we are in a constructor, so this cannot be null. Did you consider my proposal of putting it in GDALRasterBand::IterateWindows() instead ? There this could be null if calling IterateWindows() from a null pointer
There was a problem hiding this comment.
Yes, I tried that locally but it didn't seem to have an effect. This did, though I'm not confident in the diagnostic reporting from incremental builds.
There was a problem hiding this comment.
ok, weird. You'll need to rebase on top of latest master, due to changes in const'ness of virtual methods
755b83a to
5a44cc5
Compare
5a44cc5 to
fc5cd1f
Compare
|
arg, I messed up something on master (now fixed) before you rebased on it. I've rebased for you and pushed on your branch, so nothing to do (but you'll need to "git fetch dbaston gdal-raster-as-features" and "git rebase dbaston/gdal-raster-as-features" if you need to apply further updates) |
Adds a command to convert individual raster pixels into features (points, polygons, or non-spatial). Some of this could previously be done with
gdal2ogr.