@ Override public int getLength ( Object geometry ) { MultiPoint mp = ( MultiPoint ) geometry ; int length ; if ( shapeType == ShapeType . MULTIPOINT ) { // two doubles per coord (16 * numgeoms) + 40 for header length = ( mp . getNumGeometries ( ) * 16 ) + 40 ; } else if ( shapeType == ShapeType . MULTIPOINTM ) { // add the additional MMin, MMax for 16, then 8 per measure length = ( mp . getNumGeometries ( ) * 16 ) + 40 + 16 + ( 8 * mp . getNumGeometries ( ) ) ; } else if ( shapeType == ShapeType . MULTIPOINTZ ) { // add the additional ZMin,ZMax, plus 8 per Z length = ( mp . getNumGeometries ( ) * 16 ) + 40 + 16 + ( 8 * mp . getNumGeometries ( ) ) + 16 + ( 8 * mp . getNumGeometries ( ) ) ; } else { throw new IllegalStateException ( "Expected ShapeType of Arc, got " + shapeType ) ; } return length ; }
Calcuates the record length of this object .