Skip to content

fix(GDAL): wrong CoordinateSystem2D constructor - #215

Open
BotellaA wants to merge 2 commits into
nextfrom
fix/geometry-robustness-tier1
Open

BotellaA wants to merge 2 commits into
nextfrom
fix/geometry-robustness-tier1

Conversation

@BotellaA

Copy link
Copy Markdown
Member

No description provided.

@BotellaA
BotellaA requested a review from panquez October 14, 2026 13:04
@github-actions

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v21.1.8) reports: 13 concern(s)
  • src/geode/io/image/gdal_file.cpp:32:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

       32 | namespace geode
          | ^~~~~~~~~~~~~~~
       33 | {
          | ~
       34 |     namespace detail
          |     ~~~~~~~~~~~~~~~~
          |     namespace geode::detail
  • src/geode/io/image/gdal_file.cpp:39:13: warning: [google-explicit-constructor]

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions

       39 |             Impl( std::string_view filename )
          |             ^
          |             explicit 
  • src/geode/io/image/gdal_file.cpp:55:17: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'geo_transform'

       55 |                 std::array< double, 6 > geo_transform;
          |                 ^                                    
          |                                                      {}
  • src/geode/io/image/gdal_file.cpp:55:37: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

       55 |                 std::array< double, 6 > geo_transform;
          |                                     ^
  • src/geode/io/image/gdal_file.cpp:66:59: warning: [bugprone-implicit-widening-of-multiplication-result]

    performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'int'

       66 |                     origin.set_value( axis, geo_transform[3 * axis] );
          |                                                           ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/image/gdal_file.cpp:66:59: note: make conversion explicit to silence this warning
       24 |                     origin.set_value( axis, geo_transform[3 * axis] );
          |                                                           ^~~~~~~~
          |                                                           static_cast<size_type>( )
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/image/gdal_file.cpp:66:59: note: perform multiplication in a wider type
       66 |                     origin.set_value( axis, geo_transform[3 * axis] );
          |                                                           ^
          |                                                           static_cast<long>( )
  • src/geode/io/image/gdal_file.cpp:67:64: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

       67 |                     x_direction.set_value( axis, geo_transform[3 * axis + 1] );
          |                                                                ^~~~~~~~
          |                                                                (       )
  • src/geode/io/image/gdal_file.cpp:68:64: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

       68 |                     y_direction.set_value( axis, geo_transform[3 * axis + 2] );
          |                                                                ^~~~~~~~
          |                                                                (       )
  • src/geode/io/image/gdal_file.cpp:75:17: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'geo_transform'

       75 |                 std::array< double, 6 > geo_transform;
          |                 ^                                    
          |                                                      {}
  • src/geode/io/image/gdal_file.cpp:75:37: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

       75 |                 std::array< double, 6 > geo_transform;
          |                                     ^
  • src/geode/io/image/gdal_file.cpp:83:24: warning: [readability-identifier-naming]

    invalid case style for variable 'papszFileList'

       83 |                 char** papszFileList = dataset_->GetFileList();
          |                        ^~~~~~~~~~~~~
          |                        papsz_file_list
       84 |                 if( !papszFileList )
          |                      ~~~~~~~~~~~~~
          |                      papsz_file_list
       85 |                 {
       86 |                     return {};
       87 |                 }
       88 |                 std::vector< std::string > files;
       89 |                 for( int i = 0; papszFileList[i] != nullptr; i++ )
          |                                 ~~~~~~~~~~~~~
          |                                 papsz_file_list
       90 |                 {
       91 |                     files.emplace_back( papszFileList[i] );
          |                                         ~~~~~~~~~~~~~
          |                                         papsz_file_list
       92 |                 }
       93 |                 CSLDestroy( papszFileList );
          |                             ~~~~~~~~~~~~~
          |                             papsz_file_list
  • src/geode/io/image/gdal_file.cpp:84:22: warning: [readability-implicit-bool-conversion]

    implicit conversion 'char **' -> 'bool'

       84 |                 if( !papszFileList )
          |                     ~^
          |                                    == nullptr
  • src/geode/io/image/gdal_file.cpp:89:33: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

       89 |                 for( int i = 0; papszFileList[i] != nullptr; i++ )
          |                                 ^
  • src/geode/io/image/gdal_file.cpp:91:41: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

       91 |                     files.emplace_back( papszFileList[i] );
          |                                         ^

Have any feedback or feature suggestions? Share it here.

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