github-advanced-security[bot] commented on code in PR #890:
URL: 
https://github.com/apache/incubator-baremaps/pull/890#discussion_r1740201380


##########
baremaps-gdal/src/main/java/org/apache/baremaps/gdal/TranslateOptions.java:
##########
@@ -0,0 +1,326 @@
+/*
+ * 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.
+ */
+
+package org.apache.baremaps.gdal;
+
+/**
+ * Options for the translate method.
+ */
+public class TranslateOptions extends Options {
+
+  public TranslateOptions() {
+    super();
+  }
+
+  // Basic Options
+  public TranslateOptions help() {
+    add("--help");
+    return this;
+  }
+
+  public TranslateOptions helpGeneral() {
+    add("--help-general");
+    return this;
+  }
+
+  public TranslateOptions longUsage() {
+    add("--long-usage");
+    return this;
+  }
+
+  public TranslateOptions outputType(String type) {
+    add("-ot");
+    add(type);
+    return this;
+  }
+
+  public TranslateOptions strict() {
+    add("-strict");
+    return this;
+  }
+
+  public TranslateOptions inputFormat(String format) {
+    add("-if");
+    add(format);
+    return this;
+  }
+
+  public TranslateOptions outputFormat(String format) {
+    add("-of");
+    add(format);
+    return this;
+  }
+
+  public TranslateOptions band(int band) {
+    add("-b");
+    add(band);
+    return this;
+  }
+
+  public TranslateOptions maskBand(int band) {
+    add("-mask");
+    add(band);
+    return this;
+  }
+
+  public TranslateOptions expand(String option) {
+    add("-expand");
+    add(option);
+    return this;
+  }
+
+  public TranslateOptions outsize(int xSize, int ySize) {
+    add("-outsize");
+    add(xSize);
+    add(ySize);
+    return this;
+  }
+
+  public TranslateOptions outsizePercent(int xPercent, int yPercent) {
+    add("-outsize");
+    add(xPercent + "%");
+    add(yPercent + "%");
+    return this;
+  }
+
+  public TranslateOptions targetResolution(double xRes, double yRes) {
+    add("-tr");
+    add(xRes);
+    add(yRes);
+    return this;
+  }
+
+  public TranslateOptions overview(int level) {
+    add("-ovr");
+    add(level);
+    return this;
+  }
+
+  public TranslateOptions overviewAuto() {
+    add("-ovr");
+    add("AUTO");
+    return this;
+  }
+
+  public TranslateOptions overviewNone() {
+    add("-ovr");
+    add("NONE");
+    return this;
+  }
+
+  public TranslateOptions resamplingMethod(String method) {
+    add("-r");
+    add(method);
+    return this;
+  }
+
+  public TranslateOptions unscale() {
+    add("-unscale");
+    return this;
+  }
+
+  public TranslateOptions scale(int band, double srcMin, double srcMax, double 
dstMin,
+      double dstMax) {
+    add("-scale_" + band);
+    add(srcMin);
+    add(srcMax);
+    add(dstMin);
+    add(dstMax);
+    return this;
+  }
+
+  public TranslateOptions scale(double srcMin, double srcMax, double dstMin, 
double dstMax) {
+    add("-scale");
+    add(srcMin);
+    add(srcMax);
+    add(dstMin);
+    add(dstMax);
+    return this;
+  }
+
+  public TranslateOptions exponent(int band, double expVal) {
+    add("-exponent_" + band);
+    add(expVal);
+    return this;
+  }
+
+  public TranslateOptions exponent(double expVal) {
+    add("-exponent");
+    add(expVal);
+    return this;
+  }
+
+  public TranslateOptions srcWindow(int xOff, int yOff, int xSize, int ySize) {

Review Comment:
   ## Useless parameter
   
   The parameter 'ySize' is never used.
   
   [Show more 
details](https://github.com/apache/incubator-baremaps/security/code-scanning/1551)



-- 
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]

Reply via email to