You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sis.apache.org by Martin Desruisseaux <ma...@geomatys.com> on 2022/03/01 00:00:36 UTC
Re: Support for GeoTIFF ProjCoordTransGeoKey values from 1 to 27
Hello Thierry
Le 28/02/2022 à 22:20, Thierry Danard a écrit :
> When I call new MyCRSBuilder(....).getCoordinateOperationFactory().getOperationMethod("GeoTIFF:4");
>
> I get
>
> Exception in thread "main" org.opengis.util.NoSuchIdentifierException:
> No operation method found for name or identifier “GeoTIFF:4”.
"GeoTIFF:4" stands for CT_ObliqueMercator_Laborde, which is not yet
implemented [1]. If replacing by "GeoTIFF:3" (which stands for
CT_ObliqueMercator), then it works.
> I am unsure how the GeoTIFF:xxx operations get plugged in/recognized
> by the code.
>
There is no initializer to call or configuration file, it should be
automatic. All authority codes (GeoTIFF, EPSG, NetCDF, etc.) are
declared in this directory:
core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/
Each file in this directory declares the identifier for a single
operation. For example:
* Mercator1SP.java declares EPSG:9804, GeoTIFF:7 and MapInfo:10.
* Mercator2SP.java declares EPSG:9805, MapInfo:26 and S-57:8.
The declarations appear in the Java code doing the initialization of the
PARAMETERS field in each class. Unfortunately we do not have a this time
a single place listing all GeoTIFF codes (for example) in a tabular
format. Something not too far (should be improved) is [2], which is
generated automatically from the declaration in above-cited Java codes.
> I don't mind the hard-coded logic so much. I'd rather contribute a
> standalone version of the CRSBuilder that essentially takes a map of
> <Short, Object> or <Integer, Object> in its constructor. This would
> make it easier to unit test, and directly reusable in my own use case.
> My use case doesn't need the TIFF file parsing part of the Apache SIS
> storage module, just the interpretation of the GeoTIFF meta data itself.
>
A possible approach could be that, after you got a version that
satisfies your needs, do a "diff" between that version and the current
CRSBuilder so we can see what could be the changes to apply?
Martin
[1] https://issues.apache.org/jira/browse/SIS-222
[2] https://sis.apache.org/tables/CoordinateOperationMethods.html