def layers(self): """List all layers Attributes objects Returns: ``[:class:`~geopyspark.geotrellis.catalog.AttributeStore.Attributes`]`` """ layers = self.wrapper.attributeStore().layerIds() util = scala_companion("geopyspark.geotrellis.GeoTrellisUtils") return [self.Attributes(self, l.name(), l.zoom()) for l in util.seqToIterable(layers)]
def delete(self, name, zoom=None): """Delete layer and all its attributes Args: name (str): Layer name zoom (int, optional): Layer zoom """ layer_id = scala_companion("geotrellis.spark.LayerId").apply(name, zoom or 0) self.underlying.delete(layer_id)
def __init__(self, store, layer_name, layer_zoom): self.store = store self.layer_name = layer_name self.layer_zoom = layer_zoom self.layer_id = scala_companion("geotrellis.spark.LayerId").apply(layer_name, layer_zoom or 0) self.utils = scala_companion("geopyspark.geotrellis.GeoTrellisUtils")
def __init__(self, uri): self.uri = uri self.underlying = scala_companion("geotrellis.spark.io.AttributeStore").apply(uri)