From: <no...@so...> - 2002-05-15 05:27:08
|
Patch, fixes and other code item #556212, was opened at 2002-05-15 15:27 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=426285&aid=556212&group_id=4091 Category: None Group: None Status: Open Priority: 5 Submitted By: Bryan Scott (bryanscott) Assigned to: Nobody/Anonymous (nobody) Summary: Updated getLength method for ShapeArc Initial Comment: /*** * Return the shape length in WORDS. * * * ESRI White Paper : Shapefile Technical Description * PolyLine * A PolyLine is an ordered set of vertices that consists of one or * more parts. A part is a connected sequence of two or more points. * Parts may or may not be connected to one another. Parts may or may * not intersect one another. * ...... * Table 6 * PolyLine Record Contents * Position | Field | Value | Type | Number | Byte Order * ------------------------------------------------------------------- * Byte 0 | Shape Type | 3 | Integer | 1 | Little * Byte 4 | Box | Box | Double | 4 | Little * Byte 36 | NumParts | NumParts | Integer | 1 | Little * Byte 40 | NumPoints | NumPoints | Integer | 1 | Little * Byte 44 | Parts | Parts | Integer | NumParts | Little * Byte X | Points | Points | Point | NumPoints | Little * -------------------------------------------------------------------- * * Note 1: X = 44 + 4 * NumParts * Note 2: 1 WORD = 2 Bytes * */ public int getLength(){ /// return (44+(4*numParts)) ; Previously (In error); return (22+(2*numParts) + (8*numPoints) ) ; } ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=426285&aid=556212&group_id=4091 |