[postgis-users] how to get Point * from datum =heap_getattr(....)?
bluevaley at gmail.com
Fri May 14 22:08:34 PDT 2010
hi,i have this table:
CREATE TABLE pois(
uid integer not null,
catcode VARCHAR(32) not null,
SELECT AddGeometryColumn('pois', 'location', 4214, 'POINT', 2);
and then in my codes,i use this invoke to get location column in tuple:
tuple = heap_getnext(pHeapScanDesc,ForwardScanDirection);
datum = heap_getattr(tuple,6,pRawRelation->rd_att,&isnull);
then on the next,how to write to get Point? is this right?
Point *p = isnull?NULL:(Point *)(PG_DETOAST_DATUM(datum));
i've tried it,but it seems not work.
thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users