sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <>
Subject [jira] [Resolved] (SIS-327) Defer loading of datum shift grid files
Date Wed, 26 Apr 2017 13:39:04 GMT


Martin Desruisseaux resolved SIS-327.
    Resolution: Fixed

> Defer loading of datum shift grid files
> ---------------------------------------
>                 Key: SIS-327
>                 URL:
>             Project: Spatial Information Systems
>          Issue Type: Improvement
>          Components: Referencing
>    Affects Versions: 0.7
>            Reporter: Martin Desruisseaux
>            Assignee: Martin Desruisseaux
>            Priority: Minor
>             Fix For: 0.8
> When a {{CoordinateOperation}} is created, its {{MathTransform}} is created immediately.
This is usually not so costly, except in the case of datum shift based on a grid files where
the grid files is loaded immediately. This is a waste of resources when the caller needs create
many such operations, compare their {{domainOfValidity}} and retain only one operation at
the end.
> The proposal is to load the datum shift grid files only the first time that {{getMathTransform()}}
is invoked. In addition to reduce the amount of resources to load, another effect of this
would be to reduce the amount of warnings emitted because of grid files not present.
> *How to reproduce:* the snippet below produces a lot of warnings if the grid files are
not present. After this issue is fixed, we should have at most 1 warning.
> {code:java}
> CoordinateReferenceSystem sourceCRS = CRS.forCode("EPSG:4267");
> CoordinateReferenceSystem targetCRS = CRS.forCode("EPSG:4326");
> CoordinateOperation op = CRS.findOperation(sourceCRS, targetCRS, null);
> {code}
> *Note:* we could defer the creation of all {{MathTransform}} objects, but this is advantageous
only for the cases where many operations exist between the same pair of CRS. This is the case
of datum shift mostly.

This message was sent by Atlassian JIRA

View raw message