[Shapelib] ESRI ArcMap reading problem
Frank Warmerdam
fwarmerdam at gmail.com
Thu Feb 10 09:47:57 PST 2005
On Thu, 10 Feb 2005 10:35:58 -0700, Matthew Gardner <mattg at aristatek.com> wrote:
> 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!)
Matt,
Hmm, that is interesting. Different products have been more or less
forgiving of various failures in Shapefiles. I think what are seeing here is
that modern ArcGIS is more picky.
In reviewing the Shapefile specification I see it does show the first
vertex in a ring being repeated in the last position as well. I think it
might be prudent for me to modify shapelib to manage this for the
application, inserting extra closing vertices for each ring as needed
when writing polygons.
I would add that with shapelib you currently need to manually call
SHPRewindObject() to set winding order appropriately unless you are
managing this yourself.
I have submitted this bug at:
http://bugzilla.maptools.org/bugzilla/show_bug.cgi?id=956
For the time being, users of shapelib should take care to close polygon
rings themselves.
> 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.
Generally speaking shapefiles contain nothing that is explicitly related to
styling. You could emit colors in an attribute in the dbf file, but I think you
would still need to be able to tell the application (ie. ArcGIS) how to use
this color for rendering. In ArcView 3.x all the styling rules were held in
the .apr file (a project file).
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