[Shapelib] Fwd: Adding a polygon to a shapefile

Joaquin Perez Valera joaquinperezvalera at gmail.com
Thu Feb 21 12:43:05 PST 2008


---------- Forwarded message ----------
From: Joaquin Perez Valera <joaquinperezvalera at gmail.com>
Date: 20-feb-2008 20:17
Subject: Re: Adding a polygon to a shapefile
To: shapelib at lists.maptools.org

Hi Tom

With your corrections and suggestions the program runs very good, but exists
a "but".
When I want to view the shapefile from the ArcCatalog the program sends and
error message
"Error openning feature class. The number of shapes does not match the
number of fields of table records."

I suposse exists a shape, but in the dbf file there is nothing to read.
But, the program you said "shapeviewer" can open the shape, and I can view
the shape in the file.
And after from in file menu I clicked "create an empty dbf file", and then I
can read the shape with ArcCatalog. But I can't do it forever.

I can't understand, I guess this line creates a dbf file
"hDBF = DBFCreate( shape_name.c_str());"

but why not?

There is another time a problem with my code?

I must write a record for each shape in the file?

Can you send me an example? or teach me how?

Well, with these results I can be happy, but not totally.

Thanks and Cheers

Joaquin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20080221/bd16254e/attachment.html>


More information about the Shapelib mailing list