code: public static GeometryCollection<Geometry> readGeometryCollection(
  			ByteReader reader, boolean hasZ, boolean hasM) {
  
  		GeometryCollection<Geometry> geometryCollection = new GeometryCollection<Geometry>(
  				hasZ, hasM);
  
  		int numGeometries = reader.readInt();
  
  		for (int i = 0; i < numGeometries; i++) {
  			Geometry geometry = readGeometry(reader, Geometry.class);
  			geometryCollection.addGeometry(geometry);
  
  		}
  
  		return geometryCollection;
  	}
docs: Read a Geometry Collection
  
  @param reader
  @param hasZ
  @param hasM
  @return geometry collection