// Use Range object, which calculates requested i, j
// values and incorporates stride
for (int i = 0; i < geoXRange.length(); i++) {
for (int j = 0; j < geoYRange.length(); j++) {
pixel[0][0] = (double) geoXRange.element(i);
pixel[1][0] = (double) geoYRange.element(j);
latLon = nav.toLatLon(pixel);
if (varname.equals("lat")) {
dataArray.setFloat(dataIndex.set(j, i),
(float) (latLon[0][0]));