void setTransform(double xStart, double yStart, double xInc, double yInc) { // tie the raster 0, 0 to xStart, yStart addTag(new IFDEntry(Tag.ModelTiepointTag, FieldType.DOUBLE).setValue( new double[]{0.0, 0.0, 0.0, xStart, yStart, 0.0})); // define the "affine transformation" : requires grid to be regular (!) addTag(new IFDEntry(Tag.ModelPixelScaleTag, FieldType.DOUBLE).setValue( new double[]{xInc, yInc, 0.0})); }
/** * Constructor * * @param fileOut name of output file. */ public GeotiffWriter(String fileOut) { geotiff = new GeoTiff(fileOut); }
int value(int idx) { if (idx == 0) return value(); return value[idx]; }
public int compareTo( Object o) { if (!(o instanceof TagValue)) return 0; int ret = tag.compareTo( o); if (ret != 0) return ret; return value - ((TagValue)o).value; } }
int value() { if (tagValue != null) return tagValue.value(); return value[0]; }
void setTransform(double xStart, double yStart, double xInc, double yInc) { // tie the raster 0, 0 to xStart, yStart addTag(new IFDEntry(Tag.ModelTiepointTag, FieldType.DOUBLE).setValue( new double[]{0.0, 0.0, 0.0, xStart, yStart, 0.0})); // define the "affine transformation" : requires grid to be regular (!) addTag(new IFDEntry(Tag.ModelPixelScaleTag, FieldType.DOUBLE).setValue( new double[]{xInc, yInc, 0.0})); }
/** * Constructor * * @param fileOut name of output file. */ public GeotiffWriter(String fileOut) { geotiff = new GeoTiff(fileOut); }
int value(int idx) { if (idx == 0) return value(); return value[idx]; }
void setTransform(double xStart, double yStart, double xInc, double yInc) { // tie the raster 0, 0 to xStart, yStart addTag(new IFDEntry(Tag.ModelTiepointTag, FieldType.DOUBLE).setValue(new double[]{0.0, 0.0, 0.0, xStart, yStart, 0.0})); // define the "affine transformation" : requires grid to be regular (!) addTag(new IFDEntry(Tag.ModelPixelScaleTag, FieldType.DOUBLE).setValue(new double[]{xInc, yInc, 0.0})); }
private void addLatLonTags() { geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTModelTypeGeoKey, GeoKey.TagValue.ModelType_Geographic)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTRasterTypeGeoKey, GeoKey.TagValue.RasterType_Area)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeographicTypeGeoKey, GeoKey.TagValue.GeographicType_WGS_84)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeogPrimeMeridianGeoKey, GeoKey.TagValue.GeogPrimeMeridian_GREENWICH)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeogAngularUnitsGeoKey, GeoKey.TagValue.GeogAngularUnits_DEGREE)); }
int value(int idx) { if (idx == 0) return value(); return value[idx]; }
private void addLatLonTags() { geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTModelTypeGeoKey, GeoKey.TagValue.ModelType_Geographic)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTRasterTypeGeoKey, GeoKey.TagValue.RasterType_Area)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeographicTypeGeoKey, GeoKey.TagValue.GeographicType_WGS_84)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeogPrimeMeridianGeoKey, GeoKey.TagValue.GeogPrimeMeridian_GREENWICH)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeogAngularUnitsGeoKey, GeoKey.TagValue.GeogAngularUnits_DEGREE)); }
private void addLatLonTags() { geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTModelTypeGeoKey, GeoKey.TagValue.ModelType_Geographic)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTRasterTypeGeoKey, GeoKey.TagValue.RasterType_Area)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeographicTypeGeoKey, GeoKey.TagValue.GeographicType_WGS_84)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeogPrimeMeridianGeoKey, GeoKey.TagValue.GeogPrimeMeridian_GREENWICH)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeogAngularUnitsGeoKey, GeoKey.TagValue.GeogAngularUnits_DEGREE)); }