class TopLevelGeometryProvider {

    public List<AbstractTileGeometry<?>> getTopLevelGeometries(String layerId)
    {
        List<AbstractTileGeometry<?>> geometries = New.list();

        for (Geometry geometry : myGeometryRegistry.getGeometries())
        {
            if (geometry instanceof AbstractTileGeometry)
            {
                AbstractTileGeometry<?> tile = (AbstractTileGeometry<?>)geometry;
                if (layerId.equals(tile.getLayerId()))
                {
                    geometries.add(tile.clone());
                }
            }
        }

        return geometries;
    }

    public  TopLevelGeometryProvider(GeometryRegistry geometryRegistry);

}