MCPcopy Create free account
hub / github.com/OSGeo/gdal / main

Method main

swig/java/apps/gdalinfo.java:52–583  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

50 /************************************************************************/
51
52 public static void main(String[] args) {
53 {
54 Dataset hDataset;
55 Band hBand;
56 int i, iBand;
57 double[] adfGeoTransform = new double[6];
58 Driver hDriver;
59 Vector papszMetadata;
60 boolean bComputeMinMax = false;
61 /* boolean bSample = false; */
62 boolean bShowGCPs = true, bShowMetadata = true;
63 boolean bStats = false, bApproxStats = true;
64 boolean bShowColorTable = true, bComputeChecksum = false;
65 boolean bReportHistograms = false;
66 boolean bShowRAT = true;
67 String pszFilename = null;
68 Vector papszFileList;
69 Vector papszExtraMDDomains = new Vector();
70
71 gdal.AllRegister();
72
73 args = gdal.GeneralCmdLineProcessor(args);
74
75 if (args.length < 1) {
76 Usage();
77 System.exit(0);
78 }
79 /* -------------------------------------------------------------------- */
80 /* Parse arguments. */
81 /* -------------------------------------------------------------------- */
82 for (i = 0; i < args.length; i++) {
83 if (args[i].equals("-mm"))
84 bComputeMinMax = true;
85 else if (args[i].equals("-hist"))
86 bReportHistograms = true;
87 else if (args[i].equals("-stats"))
88 {
89 bStats = true;
90 bApproxStats = false;
91 }
92 else if (args[i].equals("-approx_stats"))
93 {
94 bStats = true;
95 bApproxStats = true;
96 }
97 else if (args[i].equals("-nogcp"))
98 bShowGCPs = false;
99 else if( args[i].equals("-noct"))
100 bShowColorTable = false;
101 else if (args[i].equals("-nomd"))
102 bShowMetadata = false;
103 else if (args[i].equals("-norat"))
104 bShowRAT = false;
105 else if (args[i].equals("-checksum"))
106 bComputeChecksum = true;
107 else if (args[i].equals("-mdd") && i + 1 < args.length)
108 papszExtraMDDomains.addElement(args[++i]);
109 else if (args[i].startsWith("-"))

Callers

nothing calls this directly

Calls 15

UsageMethod · 0.95
sizeMethod · 0.95
lengthMethod · 0.95
GDALInfoReportCornerMethod · 0.95
AllRegisterMethod · 0.80
GetLastErrorNoMethod · 0.80
GetLastErrorMsgMethod · 0.80
getRasterXSizeMethod · 0.80
getRasterYSizeMethod · 0.80
deleteMethod · 0.80
getRasterCountMethod · 0.80
getDataTypeMethod · 0.80

Tested by

no test coverage detected