[Shapelib] ESRI ArcMap reading problem

Matthew Gardner mattg at aristatek.com
Thu Feb 10 09:35:58 PST 2005


I was having this same issue I tried multiple solutions I think I even tried
setting panParts[0] to 0 without any luck.  I finally got it to work by
setting the beginning and ending vertices to the same value.  (It was kinda
funny because the file worked just fine with ArcExplorer.  Go figure!)


As a question.

Is it possible to specify the color of a polygon in a shape file and/or make
the polygon transparent?  I would imagine that it would be an attribute
setting.

Thanks,

Matt

------
Message: 3
Date: Wed, 9 Feb 2005 13:09:52 -0500
From: Frank Warmerdam <fwarmerdam at gmail.com>
Subject: Re: [Shapelib] ESRI ArcMap reading problem
To: Shapelib Development <shapelib at lists.maptools.org>
Message-ID: <931f8ea905020910094d1f0a69 at mail.gmail.com>
Content-Type: text/plain; charset=US-ASCII

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,





More information about the Shapelib mailing list