make_ss_geodataset#
- make_ss_geodataset(cls, image_uri: str | list[str], label_raster_uri: str | list[str] | None = None, label_vector_uri: str | None = None, class_config: ClassConfig | None = None, aoi_uri: str | list[str] = [], label_vector_default_class_id: int | None = None, image_raster_source_kw: dict = {}, label_raster_source_kw: dict = {}, label_vector_source_kw: dict = {}, **kwargs)[source]#
Create an instance of this class from image and label URIs.
This is a convenience method. For more fine-grained control, it is recommended to use the default constructor.
- Parameters:
image_uri (str | list[str]) – URI or list of URIs of GeoTIFFs to use as the source of image data.
label_raster_uri (str | list[str] | None) – URI or list of URIs of GeoTIFFs to use as the source of segmentation label data. If the labels are in the form of GeoJSONs, use
label_vector_uriinstead. Defaults toNone.label_vector_uri (str | None) – URI of GeoJSON file to use as the source of segmentation label data. If the labels are in the form of GeoTIFFs, use
label_raster_uriinstead. Defaults toNone.class_config (ClassConfig | None) – The
ClassConfig. Can beNoneif not using any labels.aoi_uri (str | list[str]) – URI or list of URIs of GeoJSONs that specify the area-of-interest. If provided, the dataset will only access data from this area. Defaults to
[].label_vector_default_class_id (int | None) – If using
label_vector_uriand all polygons in that file belong to the same class and they do not contain aclass_idproperty, then use this argument to map all of the polygons to the appropriate class ID. See docs forClassInferenceTransformerfor more details. Defaults toNone.image_raster_source_kw (dict) – Additional arguments to pass to the
RasterioSourceused for image data. See docs forRasterioSourcefor more details. Defaults to{}.label_raster_source_kw (dict) – Additional arguments to pass to the
RasterioSourceused for label data, iflabel_raster_uriis used. See docs forRasterioSourcefor more details. Defaults to{}.label_vector_source_kw (dict) – Additional arguments to pass to the
GeoJSONVectorSourceused for label data, iflabel_vector_uriis used. See docs forGeoJSONVectorSourcefor more details. Defaults to{}.**kwargs – All other keyword args are passed to the default constructor for this class.
- Raises:
ValueError – If both label_raster_uri and label_vector_uri are specified.
- Returns:
An instance of this GeoDataset subclass.