/** * Constructs a new map information object. * * @param mapProjection the map projection, must not be null * @param pixelX reference pixel position in image coordinates in X direction * @param pixelY reference pixel position in image coordinates in Y direction * @param easting easting in map units of the reference pixel in X direction * @param northing norting in map units of the reference pixel in Y direction * @param pixelSizeX size of pixel in map units in image X direction * @param pixelSizeY size of pixel in map units in image Y direction * @param datum the datum to be used, must not be null */ public MapInfo( MapProjection mapProjection, float pixelX, float pixelY, float easting, float northing, float pixelSizeX, float pixelSizeY, Datum datum) { Guardian.assertNotNull("mapProjection", mapProjection); Guardian.assertNotNull("datum", datum); _mapProjection = mapProjection; _pixelX = pixelX; _pixelY = pixelY; _easting = easting; _northing = northing; _pixelSizeX = pixelSizeX; _pixelSizeY = pixelSizeY; _datum = datum; _sceneSizeFitted = false; _noDataValue = DEFAULT_NO_DATA_VALUE; _elevationModelName = null; _resampling = Resampling.NEAREST_NEIGHBOUR; alterMapTransform(); }
public static int[] parseEastingNorthing(final String text) throws ParseException { Guardian.assertNotNullOrEmpty("text", text); if (text.length() == 0) { return null; } return PARSER.parse(text); }
public void write(final ImageOutputStream ios, final long ifdOffset, final long nextIfdOffset) throws IOException { Guardian.assertGreaterThan("ifdOffset", ifdOffset, -1); computeOffsets(ifdOffset); ios.seek(ifdOffset); final TiffDirectoryEntry[] entries = entrySet.getEntries(); new TiffShort(entries.length).write(ios); long entryPosition = ios.getStreamPosition(); for (TiffDirectoryEntry entry : entries) { ios.seek(entryPosition); entry.write(ios); entryPosition += TiffDirectoryEntry.BYTES_PER_ENTRY; } writeNextIfdOffset(ios, ifdOffset, nextIfdOffset); }