[Shapelib] question about dbf file

Mateusz Loskot mateusz at loskot.net
Thu Sep 28 15:47:42 EDT 2006


Ro wrote:
> Hi! I am trying to create a shape with several points.

Ro,

Have you walked through the "white paper" (PDF) linked from
Shapelib website?

http://shapelib.maptools.org/

You should be able to find there short explanation of types of
geometries supported by Shapefile format.

> Each point should have different information in the dbf file.

If a shape == a shapefile, then you can store points in shapefile
as separate features and every point (a feature) will have its own
record (unique information) in the DBF table.

> My question is: Does the shapelib allow creating one shape with
> different features (points in my case) and creating the dbf file for
> this unique shape but with different records for each feature
> (point)? Or should I create one shape for each point?

I'm sorry, but I don't understand it.

What you mean saying "this unique shape"?
Is this a single object stored in a shapefile or you mean it's a shapefile.

In a shapefile (files triple), you can store objects (features) of type:

- point, then every point (feature) is a separate object and
has assigned a record in DBF table

- multipoint, then one object (feature) consists of a set of points
and this multipoint object (a set of points as a whole) has assigned
*one* record in DBF table. In other words, all points in multipoint
geometry have common set of attributes (a record in DBF table)

I hope it helps.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net


More information about the Shapelib mailing list