public LineString getLineString ( Geometry geometry ) { if ( geometry instanceof MultiLineString ) { if ( geometryIndex >= 0 && geometryIndex < geometry . getNumGeometries ( ) ) { return getLinearRing ( geometry . getGeometryN ( geometryIndex ) ) ; } } else if ( geometry instanceof LineString ) { return ( LineString ) geometry ; } return getLinearRing ( geometry ) ; }
Returns a LineString or LinearRing that is described by this index .