To save others from your pain, please log a bug and then put in a PR (with a test) so that it can be merged in.
Ian On Tue, 18 Sep 2018 at 13:07, Nick Griffiths <nickg+geoto...@catalyst.net.nz> wrote: > > On 18/09/18 23:55, Nick Griffiths wrote: > >> So perhaps this is an issue with the AsciiGridsImageReader? > > > > I think I might have found something with the asciigridsimagereader. > > It looks like it's to do with the tile marker cache being used to find a > > good spot to start seeking from. > > > > 1) In the case of freshly created grid, the tile marker cache is empty, > > and so we are forced to seek through the entire file to find where to > > start looking, and the reader returns the right set of values. > > > > 2) In the case of an adjacent tile look up, the tile marker cache gives > > us an exact match and correctly lines up the input stream at the right > > position. The reader returns the right set of values. > > > > But in the case of the nearest lower key found in the marker cache, > > things can go awry. I can see that the skipping code in this instance > > seems to put is in at the wrong position. Given that case 1) works, > > which uses the same skipping code, I must assume that the marker cache > > is returning the wrong result here (possibly either the wrong sample > > position or the wrong seek position?) or is being misused in a way that > > results in derived results being poisoned? > > Eureka! > > So it's an off by one error when reusing those cached skip positions. > > https://paste.dollyfish.net.nz/540649 > > This diff seems to fix it for my particular asc file - I don't quite > understand why it works, and whether it's particular to the layout of > this particular file or something else. > > Anyway, I've got to the bottom of most of it, more to come tomorrow. > > > > _______________________________________________ > GeoTools-GT2-Users mailing list > GeoTools-GT2-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > -- Ian Turton
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users