[GRASS-dev] Re: [GRASS GIS] #22: Grass r.out.mat 64bit Matlab reading problem

GRASS GIS trac at osgeo.org
Thu Jan 24 01:14:50 EST 2008


#22: Grass r.out.mat 64bit Matlab reading problem
----------------------+-----------------------------------------------------
  Reporter:  alexice  |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect   |      Status:  new                      
  Priority:  minor    |   Milestone:  6.3.0                    
 Component:  default  |     Version:  6.2.3                    
Resolution:           |    Keywords:                           
----------------------+-----------------------------------------------------
Comment (by hamish):

 Glynn:
 > The correct solution is to explicitly [de]serialise values rather
 > than reading/writing the in-memory representation directly from/to
 > files.

 If anyone wants to write a patch, feel free.

 1grey:
 > but won't the explicit [de]serialisation also solve endianness
 > issues, if any?

 r.in|out.mat's endian code is in a only-just-working state. As the
 endianness of the file's data is stored in one of the header bits I
 propose  we follow one of Glynn's earlier suggestions and just force
 r.out.mat to always produce little endian output regardless of platform
 instead of dynamically picking what to use based on the current platform.
 With Mac moving to intel this is less of an issue, but since we know it's
 a problem we might as well take the opportunity to fix that too.

 1gray:
 > BTW, shouldn't the other modules also be checked for similar
 > issues? These [de]serialization routines are, to my mind, good
 > candidates to inclusion into the library.

 r.in|out.bin is the main one to worry about. I am not sure but hopefully
 r.*.gdal and v.*.ogr 64bit+endian stuff is all handled upstream in the
 (well maintained) support libraries.



 Hamish

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/22#comment:6>
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/


More information about the grass-dev mailing list