[postgis-devel] questions about wktraster

xie_jiong xie_jiong at 163.com
Mon Mar 2 17:41:07 PST 2009


   Thanks, it means serialized format needn't consider endian, but in the 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?


----- Original Message ----- 
From: "strk" <strk at keybit.net>
To: "PostGIS Development Discussion" <postgis-devel at postgis.refractions.net>
Sent: Tuesday, March 03, 2009 1:24 AM
Subject: Re: [postgis-devel] questions about wktraster


> On Mon, Mar 02, 2009 at 10:12:32PM +0800, xie_jiong wrote:
>> 
>>     I know wkb raster format must consider endian, but does serialized format need? 
> 
> Nope. Serialized format is only for the postgresql-internal
> representatio of the type, will be only written/read by
> the stored procedures, so on the same host.
> 
> --strk;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel


More information about the postgis-devel mailing list