[Shapelib] Odd lines

Corazao, Tony TCorazao at overwatch.com
Fri Jun 16 11:27:49 PDT 2006


I think I found my own answer.  I didn't understand the nParts and the
panPartStart members of the SHPObject that tell in the vertex lists
where to start and stop drawing each 'part' in each shape.  So, my
application was just connecting all of the dots.

Thanks.

 

________________________________

 

Tony Corazao

 

Software Engineer

512-329-5661 x3096

tcorazao at overwatch.com

 

________________________________

301 Camp Craft Rd.  *   Austin, TX 78746  *  www.overwatch.com
<https://mail.ausinfo.com/exchweb/bin/redir.asp?URL=http://www.overwatch
.com/> 

 

 

 

 

 

 

 

 

 

 

 

-----Original Message-----
From: shapelib-bounces at lists.maptools.org
[mailto:shapelib-bounces at lists.maptools.org] On Behalf Of Corazao, Tony
Sent: Friday, June 16, 2006 12:07 PM
To: shapelib at lists.maptools.org
Subject: [Shapelib] Odd lines

 

I am using shapeLib to parse the .shp file called 'country.shp' that
comes with ArcMap and am getting some odd results.  My application will
take the vertex points from each shape and simply draw them as a polygon
on my screen.  The problem, however, is that many of the shapes have
stray lines associated with them.  For instance, the country France gets
drawn, but then a line is drawn to Corsica and then the island of
Corsica is drawn.  I see that both land masses are part of France, but
how can I scrub the data to get rid of that extra line.  I've tried just
cutting off one polygon drawn when the next point is more than 2 degrees
away, but then on other parts of the world, not all the land masses get
drawn.  

Does anyone know what I can look for to predict when the shape will
suddenly have a vertex point away, then start plotting in a different
position?  The map I'm drawing looks rather odd.

Thanks.

 

________________________________



Tony Corazao

 

Software Engineer

512-329-5661 x3096

tcorazao at overwatch.com

 

________________________________

301 Camp Craft Rd.  *   Austin, TX 78746  *  www.overwatch.com
<https://mail.ausinfo.com/exchweb/bin/redir.asp?URL=http://www.overwatch
.com/> 

 

 

 

 

 

 

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20060616/6354b3d4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 6919 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20060616/6354b3d4/attachment.jpg>


More information about the Shapelib mailing list