james-willis commented on code in PR #749: URL: https://github.com/apache/sedona-db/pull/749#discussion_r3197005874
########## rust/sedona-raster/src/outdb_uri.rs: ########## @@ -0,0 +1,133 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/// Parsed components of an outdb_uri. +/// +/// The outdb_uri format is `scheme://path#fragment`, e.g.: +/// - `geotiff://s3://bucket/file.tif#band=1` +/// - `zarr://s3://bucket/store#temperature/0.0.0` +/// +/// The scheme determines which loader to dispatch to. +/// The path is the external resource location (what RS_BandPath returns to users). +/// The fragment encodes loader-specific details (band id, chunk coords, etc.). +/// Each loader defines its own fragment convention. +/// +/// TODO: For formats like Zarr that may need complex metadata (array path, chunk +/// coordinates, byte ranges), a simple key-value fragment may not be sufficient. +/// If this becomes a limitation, consider switching the fragment to a JSON object +/// or making the entire outdb_uri a JSON string for those formats. +#[derive(Debug, PartialEq)] +pub struct OutDbUri<'a> { + /// Loader scheme (e.g., "geotiff", "zarr") + pub scheme: &'a str, + /// External resource path (e.g., "s3://bucket/file.tif") + pub path: &'a str, + /// Loader-specific fragment (e.g., "band=1"), or None if absent + pub fragment: Option<&'a str>, +} Review Comment: we settled on start/step/steps for the interface for lazy cropping -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
