[postgis-devel] questions about wktraster

xie_jiong xie_jiong at 163.com
Mon Mar 2 06:12:32 PST 2009


    I know wkb raster format must consider endian, but does serialized format need? I puzzled about following code:
    when rt_raster_serialize, we just memcpy nodata value to serialized ptr,such as: 
            case PT_16BSI:
            case PT_16BUI:
            {
                uint16_t v = band->nodataval;
                memcpy(ptr, &v, 2); ptr+=2;
                break;
            }

    but when rt_raster_deserialize, we must consider Endian when read nodata value, such as
          case PT_16BSI:
          {
               band->nodataval = read_int16(&ptr, littleEndian);
               break;
          }
   Why?


Jiong
   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20090302/a90c677e/attachment.html>


More information about the postgis-devel mailing list