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


##########
baremaps-gdal/src/main/java/org/apache/baremaps/gdal/TranslateOptions.java:
##########
@@ -0,0 +1,323 @@
+/*
+ * 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;
+
+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/1543)



##########
baremaps-gdal/src/main/java/org/apache/baremaps/gdal/WarpOptions.java:
##########
@@ -0,0 +1,373 @@
+/*
+ * 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;
+
+public class WarpOptions extends Options {
+
+  public WarpOptions() {
+    super();
+  }
+
+  // Basic Options
+  public WarpOptions help() {
+    add("--help");
+    return this;
+  }
+
+  public WarpOptions longUsage() {
+    add("--long-usage");
+    return this;
+  }
+
+  public WarpOptions helpGeneral() {
+    add("--help-general");
+    return this;
+  }
+
+  public WarpOptions quiet() {
+    add("--quiet");
+    return this;
+  }
+
+  public WarpOptions overwrite() {
+    add("-overwrite");
+    return this;
+  }
+
+  public WarpOptions format(String format) {
+    add("-of");
+    add(format);
+    return this;
+  }
+
+  public WarpOptions creationOption(String name, String value) {
+    add("-co");
+    add(name + "=" + value);
+    return this;
+  }
+
+  public WarpOptions sourceSRS(String srs) {
+    add("-s_srs");
+    add(srs);
+    return this;
+  }
+
+  public WarpOptions targetSRS(String srs) {
+    add("-t_srs");
+    add(srs);
+    return this;
+  }
+
+  public WarpOptions srcAlpha() {
+    add("-srcalpha");
+    return this;
+  }
+
+  public WarpOptions noSrcAlpha() {
+    add("-nosrcalpha");
+    return this;
+  }
+
+  public WarpOptions dstAlpha() {
+    add("-dstalpha");
+    return this;
+  }
+
+  public WarpOptions targetResolution(double xRes, double yRes) {
+    add("-tr");
+    add(xRes);
+    add(yRes);
+    return this;
+  }
+
+  public WarpOptions targetResolutionSquare(double res) {
+    add("-tr");
+    add(res);
+    add(res);
+    return this;
+  }
+
+  public WarpOptions targetSize(int width, int height) {
+    add("-ts");
+    add(width);
+    add(height);
+    return this;
+  }
+
+  public WarpOptions targetExtent(double xmin, double ymin, double xmax, 
double ymax) {
+    add("-te");
+    add(xmin);
+    add(ymin);
+    add(xmax);
+    add(ymax);
+    return this;
+  }
+
+  public WarpOptions targetExtentSRS(String srs) {
+    add("-te_srs");
+    add(srs);
+    return this;
+  }
+
+  public WarpOptions resampling(String resampling) {
+    add("-r");
+    add(resampling);
+    return this;
+  }
+
+  public WarpOptions outputFormat(String format) {
+    add("-of");
+    add(format);
+    return this;
+  }
+
+  public WarpOptions srcDataset(String datasetName) {
+    add(datasetName);
+    return this;
+  }
+
+  public WarpOptions dstDataset(String datasetName) {
+    add(datasetName);
+    return this;
+  }
+
+  // Advanced Options
+  public WarpOptions warpOption(String name, String value) {
+    add("-wo");
+    add(name + "=" + value);
+    return this;
+  }
+
+  public WarpOptions multi() {
+    add("-multi");
+    return this;
+  }
+
+  public WarpOptions srcCoordEpoch(String epoch) {
+    add("-s_coord_epoch");
+    add(epoch);
+    return this;
+  }
+
+  public WarpOptions tgtCoordEpoch(String epoch) {

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



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