org.esa.beam.framework.datamodel.GeoCoding.getGeoCRS()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中org.esa.beam.framework.datamodel.GeoCoding.getGeoCRS()方法的一些代码示例,展示了GeoCoding.getGeoCRS()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GeoCoding.getGeoCRS()方法的具体详情如下:
包路径:org.esa.beam.framework.datamodel.GeoCoding
类名称:GeoCoding
方法名:getGeoCRS

GeoCoding.getGeoCRS介绍

暂无

代码示例

代码示例来源:origin: bcdev/beam

@Override
public CoordinateReferenceSystem getGeoCRS() {
  return geoCoding.getGeoCRS();
}

代码示例来源:origin: bcdev/beam

sb.append("\n");
sb.append("Well-known text format (WKT) of the geographical CRS:\n\n");
sb.append(geoCoding.getGeoCRS().toString());
sb.append("\n");
sb.append("\n");

代码示例来源:origin: bcdev/beam

null,
clipGeometry,
product.getGeoCoding().getGeoCRS(),
null,
modelCrs,

代码示例来源:origin: bcdev/beam

@Test
public void testWgs84() throws TransformException, FactoryException {
  String testedWkt = "GEOGCS[\"WGS 84\",\n" +
            "    DATUM[\"WGS_1984\",\n" +
            "        SPHEROID[\"WGS 84\",6378137,298.257223563,\n" +
            "            AUTHORITY[\"EPSG\",\"7030\"]],\n" +
            "        AUTHORITY[\"EPSG\",\"6326\"]],\n" +
            "    PRIMEM[\"Greenwich\",0,\n" +
            "        AUTHORITY[\"EPSG\",\"8901\"]],\n" +
            "    UNIT[\"degree\",0.01745329251994328,\n" +
            "        AUTHORITY[\"EPSG\",\"9122\"]],\n" +
            "    AUTHORITY[\"EPSG\",\"4326\"]]";
  CoordinateReferenceSystem testedCrs = CRS.parseWKT(testedWkt);
  GeoCoding geoCoding = new CrsGeoCoding(testedCrs, new Rectangle(10, 10, 10, 10), new AffineTransform());
  DefaultGeographicCRS testedDefaultCrs = (DefaultGeographicCRS) geoCoding.getGeoCRS();
  Ellipsoid testedSpheroid = testedDefaultCrs.getDatum().getEllipsoid();
  Ellipsoid wgs84Spheroid = DefaultGeographicCRS.WGS84.getDatum().getEllipsoid();
  assertTrue(wgs84Spheroid.getSemiMinorAxis() == testedSpheroid.getSemiMinorAxis());
  assertTrue(wgs84Spheroid.getSemiMajorAxis() == testedSpheroid.getSemiMajorAxis());
  assertSame(DefaultGeographicCRS.WGS84.getCoordinateSystem(), testedDefaultCrs.getCoordinateSystem());
}

代码示例来源:origin: bcdev/beam

this.maxIterationCount = maxIterationCount;
final CoordinateReferenceSystem geoCRS = geoCoding.getGeoCRS();
this.imageCRS = new DefaultDerivedCRS("Image CS based on " + geoCRS.getName(),
                   geoCRS,

代码示例来源:origin: bcdev/beam

addRow("WKT of the geographical CRS", geoCoding.getGeoCRS().toString());

代码示例来源:origin: bcdev/beam

@Test
public void testTransferGeoCodingWithoutSubset() {
  final boolean returnValue = srcScene.transferGeoCodingTo(destScene, null);
  assertTrue(returnValue);
  final GeoCoding destGeoCoding = destScene.getGeoCoding();
  assertNotNull(destGeoCoding);
  assertNotSame(srcGeoCoding, destGeoCoding);
  assertEquals(srcGeoCoding.getDatum(), destGeoCoding.getDatum());
  assertEquals(srcGeoCoding.getMapCRS(), destGeoCoding.getMapCRS());
  assertEquals(srcGeoCoding.getGeoCRS(), destGeoCoding.getGeoCRS());
  assertEquals(srcGeoCoding.getGeoPos(new PixelPos(3.5f, 0.5f), null),
         destGeoCoding.getGeoPos(new PixelPos(3.5f, 0.5f), null));
}

代码示例来源:origin: bcdev/beam

@Test
public void testTransferGeoCodingWithSubset_Subsampling() {
  final ProductSubsetDef subsetDef = new ProductSubsetDef("subset");
  subsetDef.setSubSampling(2, 4);
  final boolean transfered = srcScene.transferGeoCodingTo(destScene, subsetDef);
  assertTrue(transfered);
  final GeoCoding destGeoCoding = destScene.getGeoCoding();
  assertNotNull(destGeoCoding);
  assertNotSame(srcGeoCoding, destGeoCoding);
  assertEquals(srcGeoCoding.getDatum(), destGeoCoding.getDatum());
  assertEquals(srcGeoCoding.getMapCRS(), destGeoCoding.getMapCRS());
  assertEquals(srcGeoCoding.getGeoCRS(), destGeoCoding.getGeoCRS());
  comparePixelPos(destGeoCoding, new PixelPos(0, 0), new PixelPos(0, 0));
  comparePixelPos(destGeoCoding, new PixelPos(8, 0), new PixelPos(4, 0));
  comparePixelPos(destGeoCoding, new PixelPos(8, 16), new PixelPos(4, 4));
  comparePixelPos(destGeoCoding, new PixelPos(0, 16), new PixelPos(0, 4));
}

代码示例来源:origin: bcdev/beam

@Test
public void testTransferGeoCodingWithSubset_SubsamplingAndRegion() {
  final ProductSubsetDef subsetDef = new ProductSubsetDef("subset");
  subsetDef.setRegion(2, 2, 8, 8);
  subsetDef.setSubSampling(2, 2);
  final boolean transfered = srcScene.transferGeoCodingTo(destScene, subsetDef);
  assertTrue(transfered);
  final GeoCoding destGeoCoding = destScene.getGeoCoding();
  assertNotNull(destGeoCoding);
  assertNotSame(srcGeoCoding, destGeoCoding);
  assertEquals(srcGeoCoding.getDatum(), destGeoCoding.getDatum());
  assertEquals(srcGeoCoding.getMapCRS(), destGeoCoding.getMapCRS());
  assertEquals(srcGeoCoding.getGeoCRS(), destGeoCoding.getGeoCRS());
  comparePixelPos(destGeoCoding, new PixelPos(2, 2), new PixelPos(0, 0));
  comparePixelPos(destGeoCoding, new PixelPos(10, 2), new PixelPos(4, 0));
  comparePixelPos(destGeoCoding, new PixelPos(10, 10), new PixelPos(4, 4));
  comparePixelPos(destGeoCoding, new PixelPos(2, 10), new PixelPos(0, 4));
}

相关文章