public MapGeoCoding createDeepClone() { return new MapGeoCoding(mapInfo.createDeepClone()); }
private MapGeoCoding createNonRotatedMapGeoCoding() { return new MapGeoCoding(createMapInfo(Datum.WGS_84)); }
private MapGeoCoding createRotatedMapGeoCoding() { final MapInfo mapInfo = createMapInfo(Datum.WGS_84); mapInfo.setOrientation(42.0f); return new MapGeoCoding(mapInfo); }
mapInfo.setOrientation(0); return new MapGeoCoding(mapInfo);
private MapGeoCoding createIdentityMapGeoCoding() { final IdentityTransformDescriptor td = new IdentityTransformDescriptor(); final MapTransform transform = td.createTransform(null); final MapProjection projection = new MapProjection("wullidutsch", transform); final MapInfo mapInfo = new MapInfo(projection, 0, 0, 0, 0, 1, 1, Datum.WGS_84); return new MapGeoCoding(mapInfo); }
mapInfo.setSceneWidth(product.getSceneRasterWidth()); mapInfo.setSceneHeight(product.getSceneRasterHeight()); return new GeoCoding[]{new MapGeoCoding(mapInfo)}; } else { return null; mapInfo.setSceneHeight(Integer.parseInt(strings[10])); return new GeoCoding[]{new MapGeoCoding(mapInfo)}; } else { Debug.trace(
destMapInfo.setSceneWidth(destScene.getRasterWidth()); destMapInfo.setSceneHeight(destScene.getRasterHeight()); destScene.setGeoCoding(new MapGeoCoding(destMapInfo)); return true;
private static void setLambertConformalConicGeoCoding_MapGeoCoding(final Product product) { final MapTransformDescriptor descriptor = MapProjectionRegistry.getDescriptor( LambertConformalConicDescriptor.TYPE_ID); final double[] values = descriptor.getParameterDefaultValues(); for (int i = 0; i < values.length; i++) { values[i] = values[i] - 0.001; } final MapTransform transform = descriptor.createTransform(values); final MapProjection mapProjection = new MapProjection(descriptor.getTypeID(), transform); final MapInfo mapInfo = new MapInfo(mapProjection, .5f, .6f, .7f, .8f, .09f, .08f, Datum.WGS_84); mapInfo.setSceneWidth(product.getSceneRasterWidth()); mapInfo.setSceneHeight(product.getSceneRasterHeight()); product.setGeoCoding(new MapGeoCoding(mapInfo)); }
/** * Creates the UTM MapGeocoding */ private void setMapGeoCoding() { final LandsatHeader landsatHeader = landsatTM.getHeader(); final GeometricData geoData = landsatHeader.getGeoData(); final float pixelSize = landsatHeader.getPixelSize(); GeoPoint projCenter = geoData.getGeoPointAt(LandsatConstants.Points.CENTER); float pcX = projCenter.getPixelX(); float pcY = projCenter.getPixelY(); final MapProjection mappro = UTM.createProjection(geoData.getMapZoneNumber() - 1, !projCenter.isNorthernHemisphere()); final int width = landsatHeader.getImageWidth(); final int height = landsatHeader.getImageHeight(); MapInfo map = new MapInfo(mappro, pcX, pcY, (float) projCenter.getEasting(), (float) projCenter.getNorthing(), pixelSize, pixelSize, Datum.WGS_84); map.setSceneWidth(width); map.setSceneHeight(height); map.setOrientation(geoData.getLookAngle() * -1); final MapGeoCoding mapGeocoding = new MapGeoCoding(map); product.setGeoCoding(mapGeocoding); }
private void initProduct(final String productName) { final int width = _fileInfo.getWidth(); final int height = _fileInfo.getHeight(); _product = new Product(productName, GETASSE30ReaderPlugIn.FORMAT_NAME, width, height, this); final MapInfo mapInfo = new MapInfo(MapProjectionRegistry.getProjection(IdentityTransformDescriptor.NAME), 0.5F, 0.5F, _fileInfo.getEasting(), _fileInfo.getNorthing() + height * _fileInfo.getPixelSizeY(), _fileInfo.getPixelSizeX(), _fileInfo.getPixelSizeY(), Datum.WGS_84); mapInfo.setSceneWidth(width); mapInfo.setSceneHeight(height); _product.setGeoCoding(new MapGeoCoding(mapInfo)); _product.setDescription("GETASSE30 DEM"); Band elevationBand = new Band("elevation", ProductData.TYPE_INT16, width, height); elevationBand.setUnit("m"); elevationBand.setDescription("GETASSE30 Elevation"); // setting geo-physical no-data value to prevent for scaling elevationBand.setGeophysicalNoDataValue(_fileInfo.getNoDataValue()); _product.addBand(elevationBand); }
mapInfo.setSceneWidth(sceneWidth); mapInfo.setSceneHeight(sceneHeight); product.setGeoCoding(new MapGeoCoding(mapInfo)); mapInfo.setSceneWidth(sceneRasterWidth); mapInfo.setSceneHeight(sceneRasterHeight); product.setGeoCoding(new MapGeoCoding(mapInfo));
@Test public void testDecodeQualificationForTIFFWithGeoInformation() throws IOException { final Product product = new Product("p", "t", 20, 10); final Band band = product.addBand("band1", ProductData.TYPE_INT8); band.ensureRasterData(); final MapInfo mapInfo = new MapInfo(UTM.createProjection(26, true), 0, 0, 0, 0, 1, 1, Datum.WGS_84); mapInfo.setSceneWidth(product.getSceneRasterWidth()); mapInfo.setSceneHeight(product.getSceneRasterHeight()); product.setGeoCoding(new MapGeoCoding(mapInfo)); final ImageInputStream inputStream = writeToInputStream(product); final DecodeQualification decodeQualification = GeoTiffProductReaderPlugIn.getDecodeQualificationImpl(inputStream); assertEquals(DecodeQualification.SUITABLE, decodeQualification); }
mapInfo.setSceneWidth(sceneWidth); mapInfo.setSceneHeight(sceneHeight); product.setGeoCoding(new MapGeoCoding(mapInfo)); mapInfo.setSceneWidth(sceneRasterWidth); mapInfo.setSceneHeight(sceneRasterHeight); product.setGeoCoding(new MapGeoCoding(mapInfo));
MapProjection projection = createMapProjectionForTestSetGeocoding(); MapInfo mapInfo = new MapInfo(projection, 0, 0, 23, 24, 12, 13, Datum.WGS_84); MapGeoCoding mapGeoCoding = new MapGeoCoding(mapInfo); int sceneRasterWidth = 243; int sceneRasterHeight = 524;
mapInfo.setSceneHeight(product.getSceneRasterHeight()); mapInfo.setElevationModelName("GETASSE30"); final MapGeoCoding mapGeoCoding = new MapGeoCoding(mapInfo); product.setGeoCoding(mapGeoCoding); break;
mapInfo.setSceneSizeFitted(sceneFitted); mapInfo.setResampling(resampling); product.setGeoCoding(new MapGeoCoding(mapInfo));