[postgis-devel] Geometry Uses
Leticia
lgomez at itba.edu.ar
Thu Mar 15 15:42:32 PDT 2007
Hi, I need to build a new index. It is similar to R-tree but their entries
nodes contains not only the MBRs but some numeric information.
I am using a "CREATE TYPE" in order to create the data type for the table.
The SQL sentences look like
.
CREATE TYPE New_Type
(
internallength = -1,
input = New_Type_IN,
output = New_Type_OUT,
storage= plain
);
.
CREATE TABLE proof (col New_type);
CREATE INDEX anIndex ON proof USING GiST( col New_Type_Ops);
.
As I am creating an opaque data type, I need to create an equivalent one in
C language. I need something like this:
/* C language */
typedef struct My_New_Type
{
unsigned int size;
/* required to be a Postgres varlena type */
float number;
PG_LWGEOM geometry;
} My_New_Type;
As I need to store a "geometry" inside the opaque data type, I use "varlena
type" convention for my declaration. The variable length (size) is because
the geometry that I have to store. I only have to store one geometry inside
my structure.
Must I use PG_LWGEOM? Must I use LWGEOM?
Is it OK to declare my struct as VARIABLE because I encapsulate a GEOMETRY?
Could you help me?
Thanks in advance,
Leticia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20070315/4e81eea5/attachment.html>
More information about the postgis-devel
mailing list