Examples of CoverageProperties


Examples of org.geotools.gce.imagemosaic.SpatialRequestHelper.CoverageProperties

   */
    @Test
    public void testBasic2Reproject() throws Exception {
     
      // using CoverageProperties to build the SpatialRequestHelper
        CoverageProperties coverageProperties = new CoverageProperties();

        // source area in project crs
        CoordinateReferenceSystem sourceCRS = DefaultGeographicCRS.WGS84;
    ReferencedEnvelope sourceBBox = new ReferencedEnvelope(
            -180,180,
            -70,70,
            sourceCRS);
    coverageProperties.setBBox(sourceBBox);
        coverageProperties.setCrs2D(sourceCRS);
   
    //raster area
        Rectangle sourceRasterArea = new Rectangle(0,0,1000,1000);
    coverageProperties.setRasterArea(sourceRasterArea);

    // creating the g2d
        final GridToEnvelopeMapper geMapper = new GridToEnvelopeMapper(
            new GridEnvelope2D(sourceRasterArea),
            sourceBBox);
        AffineTransform sourceGridToWorldTransform = geMapper.createAffineTransform();
    coverageProperties.setGridToWorld2D((MathTransform2D) sourceGridToWorldTransform);
        coverageProperties.setFullResolution(new double[]{
            XAffineTransform.getScaleX0(sourceGridToWorldTransform),
            XAffineTransform.getScaleY0(sourceGridToWorldTransform)
            });
        coverageProperties.setGeographicBBox(sourceBBox);
        coverageProperties.setGeographicCRS2D(DefaultGeographicCRS.WGS84);
        SpatialRequestHelper spatialRequestHelper = new SpatialRequestHelper(coverageProperties);
       
        //
        // now the target request
        //
View Full Code Here

Examples of org.geotools.gce.imagemosaic.SpatialRequestHelper.CoverageProperties

   */
    @Test
    public void testBasic3Reproject() throws Exception {
     
      // using CoverageProperties to build the SpatialRequestHelper
        CoverageProperties coverageProperties = new CoverageProperties();

        // source area in project crs
        CoordinateReferenceSystem sourceCRS = DefaultGeographicCRS.WGS84;
    ReferencedEnvelope sourceBBox = new ReferencedEnvelope(
            -180,100,
            -20,90,
            sourceCRS);
    coverageProperties.setBBox(sourceBBox);
        coverageProperties.setCrs2D(sourceCRS);
   
    //raster area
        Rectangle sourceRasterArea = new Rectangle(0,0,1000,1000);
    coverageProperties.setRasterArea(sourceRasterArea);

    // creating the g2d
        final GridToEnvelopeMapper geMapper = new GridToEnvelopeMapper(
            new GridEnvelope2D(sourceRasterArea),
            sourceBBox);
        AffineTransform sourceGridToWorldTransform = geMapper.createAffineTransform();
    coverageProperties.setGridToWorld2D((MathTransform2D) sourceGridToWorldTransform);
        coverageProperties.setFullResolution(new double[]{
            XAffineTransform.getScaleX0(sourceGridToWorldTransform),
            XAffineTransform.getScaleY0(sourceGridToWorldTransform)
            });
        coverageProperties.setGeographicBBox(sourceBBox);
        coverageProperties.setGeographicCRS2D(DefaultGeographicCRS.WGS84);
        SpatialRequestHelper spatialRequestHelper = new SpatialRequestHelper(coverageProperties);
       
        //
        // now the request
        //
View Full Code Here

Examples of org.geotools.gce.imagemosaic.SpatialRequestHelper.CoverageProperties

   */
  @Test
  public void testBasic() throws Exception {
   
    // using CoverageProperties to build the SpatialRequestHelper
      CoverageProperties coverageProperties = new CoverageProperties();
 
      // source area in project crs
      CoordinateReferenceSystem sourceCRS =DefaultGeographicCRS.WGS84;
    ReferencedEnvelope sourceBBox = new ReferencedEnvelope(
          -180,180,
          -90,90,
          sourceCRS);
    coverageProperties.setBBox(sourceBBox);
      coverageProperties.setCrs2D(sourceCRS);
   
    //raster area
      Rectangle sourceRasterArea = new Rectangle(0,0,1000,1000);
    coverageProperties.setRasterArea(sourceRasterArea);
 
    // creating the g2d
      final GridToEnvelopeMapper geMapper = new GridToEnvelopeMapper(
          new GridEnvelope2D(sourceRasterArea),
          sourceBBox);
      AffineTransform sourceGridToWorldTransform = geMapper.createAffineTransform();
    coverageProperties.setGridToWorld2D((MathTransform2D) sourceGridToWorldTransform);
      coverageProperties.setFullResolution(new double[]{
          XAffineTransform.getScaleX0(sourceGridToWorldTransform),
            XAffineTransform.getScaleY0(sourceGridToWorldTransform)
          });
      coverageProperties.setGeographicBBox(sourceBBox);
      coverageProperties.setGeographicCRS2D(DefaultGeographicCRS.WGS84);
      SpatialRequestHelper spatialRequestHelper = new SpatialRequestHelper(coverageProperties);
     
      //
      // now the target request
      //
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.