Changeset 99


Ignore:
Timestamp:
Jun 6, 2005, 10:34:42 AM (19 years ago)
Author:
darran
Message:
  • global attribute now "texture" rather that "bedslope_image"
Location:
Swollen
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Swollen/swollen/version.cpp

    r89 r99  
    1 const char* version() { const char* s = "Revision: 87:88M"; return s; }
     1const char* version() { const char* s = "Revision: 98M"; return s; }
  • Swollen/swwreader/swwreader.cpp

    r95 r99  
    7474
    7575
    76         // sww file can optionally contain bedslope texture image filename
    77         size_t attlen; // length of text attribute (if it exists)
    78         if( nc_inq_attlen(_ncid, NC_GLOBAL, "bedslope_image", &attlen) != NC_ENOTATT )
    79         {
    80         char* filename;
    81         if( (filename = (char*) malloc(attlen+1)) != NULL){
    82             int status;
    83                 status = nc_get_att_text(_ncid, NC_GLOBAL, "bedslope_image", filename);
    84             if( status == NC_NOERR )
    85             {
    86                 filename[attlen] = '\0';  // ensure string is terminated, not a requirement for netcdf attributes
    87                 osg::notify(osg::INFO) << "[SWWReader] embedded image filename: " << filename <<  std::endl;
    88                         setBedslopeTexture( std::string(filename) );
    89             }
    90         free( filename );
    91         }
    92         }
     76    // sww file can optionally contain bedslope texture image filename
     77    size_t attlen; // length of text attribute (if it exists)
     78    if( nc_inq_attlen(_ncid, NC_GLOBAL, "texture", &attlen) != NC_ENOTATT )
     79    {
     80       char* filename;
     81       if( (filename = (char*) malloc(attlen+1)) != NULL){
     82          int status;
     83          status = nc_get_att_text(_ncid, NC_GLOBAL, "texture", filename);
     84          if( status == NC_NOERR )
     85          {
     86             filename[attlen] = '\0';  // ensure string is terminated, not a requirement for netcdf attributes
     87             osg::notify(osg::INFO) << "[SWWReader] embedded image filename: " << filename <<  std::endl;
     88             setBedslopeTexture( std::string(filename) );
     89          }
     90          free( filename );
     91       }
     92    }
    9393
    9494    // loop index
Note: See TracChangeset for help on using the changeset viewer.