Clay Dowling wrote:

[EMAIL PROTECTED] said:


CREATE TABLE polygons (id INTEGER PRIMARY KEY, externalref INTEGER,
pointcount INTEGER, pointlist BLOB)

When I insert data to this table, I have to write a binary list of x,y
coordinates in a sequential memory region before storing in the database.
Getting information back from the database requires a conversion in the
opposite direction.  Typically these lists contain 10-20 points, so they
are not very large.

This currently works, but I'm wondering if it would be better to create a
new table for the points and reference the polygon primary key:



Create the second table. There shouldn't be any question about this. That's just good database design.


Clay Dowling
Opinionated Programmer



maybe but none of the GIS database use that option, store your point in a blob and create function to manipulate it, look the OpenGis simple feature spec for inspiration.

--
Noël Frankinet
Gistek Software SA
http://www.gistek.net



Reply via email to