Is this a correct recursive Scala iterator creation?
micro changes:
use == instead of equals because "==" means "equals".

Scala does not follow the Java convention of prepending set/get to mutator and accessor methods.

Try to split different parts of work (abstraction)

def innerPolygons(geometry: Geometry) : Iterator[Geometry] =
  innerGeometry(geometry).flatMap(inner)

def innerGeometry(geometry: Geometry): Iterator[Geometry]=
  (0 to geometry.GetGeometryCount()).map(geometry.GetGeometryRef(_))

def inner:Geometry =&gt; Iterator = g =&gt; if ("LINEARRING"== g.GetGeometryName()) 
  Iterator.single(g) 
 else            
  innerPolygons(g)