james-willis commented on code in PR #974: URL: https://github.com/apache/sedona-db/pull/974#discussion_r3462182458
########## docs/reference/sql/rs_value.qmd: ########## @@ -0,0 +1,85 @@ +--- +# 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. + +title: RS_Value +description: > + Returns the value of a single raster pixel as a double, selected either by a + point geometry or by 1-based grid coordinates. Returns null if the location is + outside the raster or the pixel holds the band's nodata value. +kernels: + - returns: float64 + args: + - raster + - name: point + type: geometry + description: > + The pixel that contains this point is sampled (no resampling). + Reprojected into the raster CRS when both carry one. + - returns: float64 + args: + - raster + - name: point + type: geometry + - name: band + type: int + description: Band index (1-based). Defaults to 1 if not specified. + - returns: float64 + args: + - raster + - name: colX + type: int + description: Column index (1-based). + - name: rowY + type: int + description: Row index (1-based). Review Comment: But the signature here is based on trying to match postgis as much as possible: > Here are PostGIS's ST_Value (raster) signatures, straight from the current docs: > * ST_Value(raster rast, geometry pt, boolean exclude_nodata_value=true) > * ST_Value(raster rast, integer band, geometry pt, boolean exclude_nodata_value=true, text > resample='nearest') > * ST_Value(raster rast, integer x, integer y, boolean exclude_nodata_value=true) > * ST_Value(raster rast, integer band, integer x, integer y, boolean exclude_nodata_value=true) -- 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]
