public int getDomainRank() { return 2 + CoordinateSystem.makeDomain(builder.independentAxes).size(); }
public int getDomainRank() { return CoordinateSystem.makeDomain(builder.independentAxes).size(); }
private FeatureType classify () { // now to classify boolean is2Dtime = (rtAxis != null) && (timeOffsetAxis != null || (timeAxis != null && timeAxis.getRank() == 2)); if (is2Dtime) { return FeatureType.FMRC; // LOOK this would allow 2d horiz } boolean is2Dhoriz = isLatLon && (xaxis.getRank() == 2) && (yaxis.getRank() == 2); if (is2Dhoriz) { Set<Dimension> xyDomain = CoordinateSystem.makeDomain(Lists.newArrayList(xaxis, yaxis)); if (timeAxis != null && CoordinateSystem.isSubset(timeAxis.getDimensionsAll(), xyDomain)) return FeatureType.SWATH; // LOOK prob not exactly right else return FeatureType.CURVILINEAR; } // what makes it a grid? // each dimension must have its own coordinate variable Set<Dimension> indDimensions = CoordinateSystem.makeDomain(independentAxes); Set<Dimension> allDimensions = CoordinateSystem.makeDomain(allAxes); if (indDimensions.size() == allDimensions.size()) { return FeatureType.GRID; } // default return FeatureType.COVERAGE; }
f2.format("%s, ", axis.getShortName()); f2.format(") {"); for (Dimension dim : CoordinateSystem.makeDomain(independentAxes)) f2.format("%s, ", dim.getShortName()); f2.format("}"); f2.format("%s, ", axis.getShortName()); f2.format(") {"); for (Dimension dim : CoordinateSystem.makeDomain(otherAxes)) f2.format("%s, ", dim.getShortName()); f2.format("}"); f2.format("%s, ", axis.getShortName()); f2.format(") {"); for (Dimension dim : CoordinateSystem.makeDomain(allAxes)) f2.format("%s, ", dim.getShortName()); f2.format("}%n");
List<Dimension> xyDomain = CoordinateSystem.makeDomain(new CoordinateAxis[]{xaxis, yaxis}); if (xyDomain.size() < 2) { if (sbuff != null)
List<Dimension> xyDomain = CoordinateSystem.makeDomain(new CoordinateAxis[]{xaxis, yaxis}); if (xyDomain.size() < 2) { if (sbuff != null)
List<Dimension> xyDomain = CoordinateSystem.makeDomain(new CoordinateAxis[]{xaxis, yaxis}); if (xyDomain.size() < 2) { if (errlog != null) errlog.format("%s: X and Y axis must have 2 or more dimensions%n", cs.getName());
List<Dimension> xyDomain = CoordinateSystem.makeDomain(new CoordinateAxis[]{xaxis, yaxis}); if (xyDomain.size() < 2) { if (errlog != null) errlog.format("%s: X and Y axis must have 2 or more dimensions%n", cs.getName());
List<Dimension> xyDomain = CoordinateSystem.makeDomain(new Variable[] {latAxis, lonAxis}); if (xyDomain.size() < 2) featureType = FeatureType.PROFILE; // ??
@Test public void testAdapter() throws IOException { System.out.printf("open %s%n", endpoint); try (DtCoverageDataset gds = DtCoverageDataset.open(endpoint)) { Assert.assertNotNull(endpoint, gds); Assert.assertEquals("NGrids", ncoverages, gds.getGrids().size()); Assert.assertEquals(expectType, gds.getCoverageType()); } // check DtCoverageCS try (NetcdfDataset ds = NetcdfDataset.openDataset(endpoint)) { Formatter errlog = new Formatter(); DtCoverageCSBuilder builder = DtCoverageCSBuilder.classify(ds, errlog); // uses cs with largest # axes Assert.assertNotNull(errlog.toString(), builder); DtCoverageCS cs = builder.makeCoordSys(); Assert.assertEquals(expectType, cs.getCoverageType()); Assert.assertEquals("Domain", domain, CoordinateSystem.makeDomain(cs.getCoordAxes()).size()); Assert.assertEquals("Range", range, cs.getCoordAxes().size()); } }
List<Dimension> xyDomain = CoordinateSystem.makeDomain(new Variable[] {latAxis, lonAxis}); if (xyDomain.size() < 2) featureType = FeatureType.PROFILE; // ??