Hi, I have a question about the ArcGrid reader.
I am trying to test it on subregion reading.

So I create a GeneralParameterValue to pass to the reader like this:

        GeneralParameterValue[] readParams = new GeneralParameterValue[1];
        Parameter<GridGeometry2D> readGG = new Parameter<GridGeometry2D>(
                AbstractGridFormat.READ_GRIDGEOMETRY2D);
        GridEnvelope2D gridEnvelope = new GridEnvelope2D(0, 0, width, height);

        DirectPosition2D minDp = new DirectPosition2D(west, south);
        DirectPosition2D maxDp = new DirectPosition2D(east, north);
        Envelope env = new Envelope2D(minDp, maxDp);
        readGG.setValue(new GridGeometry2D(gridEnvelope, env));
        readParams[0] = readGG;

and pass it to the reader:

        ArcGridReader arcGridReader = new ArcGridReader(mapFile);
        GridCoverage2D coverage = arcGridReader.read(readParams );

The result I gain is the same as with readParams == null.

I tried to debug into the reader and i found parts that set the
subsampling and resolution stuff, but none that set the sourceregion.
If that was true, then I see why it would not read subregions, but
yeah, I probably am wrong since the reader is well tested.

Open to suggestions,
Cheers,
Andrea

------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to