[Shapelib] ESRI ArcMap reading problem
Frank Warmerdam
fwarmerdam at gmail.com
Wed Feb 9 10:09:52 PST 2005
On Wed, 09 Feb 2005 11:53:07 -0600, Brian Peschel <brianp at occinc.com> wrote:
> I am having a problem with ESRI's ArcMap reading the shapes I create.
> It appears if ArcMap is taking the last point in a polygon and moving it
> to coord (0,0) causing a spike in the object displayed. The shpDump
> program that is provided with the library isn't reporting any problems.
> I tried adding a call to SHPComputeExtents() but that didn't work
> either. Any thoughts are this point would eb helpful. Thanks!
>
> Here is glimpse of the code:
>
> SHPGetInfo(shpHandle, NULL, &shapeType, NULL, NULL);
>
> // Allocate memory for the points
> padfX = static_cast<double *>(malloc(sizeof(double) * (geo.size() +
> 1)));
> padfY = static_cast<double *>(malloc(sizeof(double) * (geo.size() +
> 1)));
>
> // We never do multiple parts
> panParts[0] = 1;
Brian,
>From the SHPCreateObject() docs:
panPartStart: The list of zero based start vertices for the rings
(parts) in this object. The first should always be
zero. This may be NULL if nParts is 0.
So, I think panParts[0] should be set to 0.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Shapelib
mailing list