/** * Returns the number of dimensions of target coordinates in the <cite>"grid to CRS"</cite> conversion. * This is the number of dimensions of the <em>coordinate reference system</em>. * It should be equal to the size of the array returned by {@link #getAxes()}, * but caller should be robust to inconsistencies. */ @Override public int getTargetDimensions() { return netcdfCS.getRankRange(); }
/** * Returns the number of dimensions of target coordinates in the <cite>"grid to CRS"</cite> conversion. * This is the number of dimensions of the <em>coordinate reference system</em>. * It should be equal to the size of the array returned by {@link #getAxes()}, * but caller should be robust to inconsistencies. */ @Override public int getTargetDimensions() { return netcdfCS.getRankRange(); }
/** * Creates a new {@code NetcdfCRS} with {@link NetcdfAxis} instances fetched * from the given components. This is used by the {@link Compound} constructor. */ NetcdfCRS(final CoordinateSystem netcdfCS, final NetcdfCRS... components) { cs = netcdfCS; final List<NetcdfAxis> axes = new ArrayList<>(netcdfCS.getRankRange()); for (final NetcdfCRS c : components) { axes.addAll(Arrays.asList(c.axes)); } this.axes = axes.toArray(new NetcdfAxis[axes.size()]); }
public void setCoordMap(java.util.List<CoordinateSystem> csysList) { CoordinateSystem use = null; for (CoordinateSystem csys : csysList) { if (use == null) use = csys; else if (csys.getCoordinateAxes().size() > use.getCoordinateAxes().size()) use = csys; } coordMap = (use == null) ? "" : "f:D(" + use.getRankDomain() + ")->R(" + use.getRankRange() + ")"; }
public void setCoordMap(java.util.List<CoordinateSystem> csysList) { CoordinateSystem use = null; for (CoordinateSystem csys : csysList) { if (use == null) use = csys; else if (csys.getCoordinateAxes().size() > use.getCoordinateAxes().size()) use = csys; } coordMap = (use == null) ? "" : "f:D(" + use.getRankDomain() + ")->R(" + use.getRankRange() + ")"; }
static private boolean isGrid(java.util.List<CoordinateSystem> csysList) { CoordinateSystem use = null; for (CoordinateSystem csys : csysList) { if (use == null) use = csys; else if (csys.getCoordinateAxes().size() > use.getCoordinateAxes().size()) use = csys; } if (use == null) return false; CoordinateAxis lat = use.getLatAxis(); CoordinateAxis lon = use.getLonAxis(); if ((lat != null) && (lat.getSize() <= 1)) return false; // COARDS singletons if ((lon != null) && (lon.getSize() <= 1)) return false; // hueristics - cant say i like this, multidim point features could easily violate return (use.getRankDomain() > 2) && (use.getRankDomain() <= use.getRankRange()); }
static private boolean isGrid(java.util.List<CoordinateSystem> csysList) { CoordinateSystem use = null; for (CoordinateSystem csys : csysList) { if (use == null) use = csys; else if (csys.getCoordinateAxes().size() > use.getCoordinateAxes().size()) use = csys; } if (use == null) return false; CoordinateAxis lat = use.getLatAxis(); CoordinateAxis lon = use.getLonAxis(); if ((lat != null) && (lat.getSize() <= 1)) return false; // COARDS singletons if ((lon != null) && (lon.getSize() <= 1)) return false; // hueristics - cant say i like this, multidim point features could easily violate return (use.getRankDomain() > 2) && (use.getRankDomain() <= use.getRankRange()); }
existing = ve.getCoordinateSystems().get(0); if (!existing.isImplicit()) continue; // cant overrrride explicit if (existing.getRankRange() >= ve.getRank()) continue; // looks ok implicit = existing; if ((existing != null) && (axisList.size() <= existing.getRankRange())) continue; if (axisList.size() < 2) continue;
existing = ve.getCoordinateSystems().get(0); if (!existing.isImplicit()) continue; // cant overrrride explicit if (existing.getRankRange() >= ve.getRank()) continue; // looks ok implicit = existing; if ((existing != null) && (axisList.size() <= existing.getRankRange())) continue; if (axisList.size() < 2) continue;