private boolean getYFlippedProperty(ProfileWriteContext ctx) { Object yFlippedProperty = ctx.getProperty(Constants.Y_FLIPPED_PROPERTY_NAME); if (yFlippedProperty instanceof Boolean) { return (Boolean) yFlippedProperty; } return false; }
@Override protected void writeProductNodesImpl() throws IOException { AbstractNetCdfWriterPlugIn plugIn = getWriterPlugIn(); writeable = plugIn.createWritable(getOutputString()); NetCdfWriteProfile profile = new NetCdfWriteProfile(); configureProfile(profile, plugIn); ProfileWriteContext context = new ProfileWriteContextImpl(writeable); profile.writeProduct(context, getSourceProduct()); Object yFlippedProperty = context.getProperty(Constants.Y_FLIPPED_PROPERTY_NAME); if (yFlippedProperty instanceof Boolean) { isYFlipped = (Boolean) yFlippedProperty; } Object convertLogScaledBandsProperty = context.getProperty(Constants.CONVERT_LOGSCALED_BANDS_PROPERTY); if (convertLogScaledBandsProperty instanceof Boolean) { convertLogScaledBands = (Boolean) convertLogScaledBandsProperty; } }
final float[] lat = new float[w]; final float[] lon = new float[w]; final boolean isYFlipped = (Boolean) ctx.getProperty(Constants.Y_FLIPPED_PROPERTY_NAME); for (int y = 0; y < h; y++) { pixelPos.y = y + 0.5f;