sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <>
Subject [jira] [Commented] (SIS-287) TransverseMercator projection provider missing in service file
Date Wed, 02 Sep 2015 13:29:46 GMT


Martin Desruisseaux commented on SIS-287:

The reason why the providers in the {{OperationMethod}} service file are not sorted by name
is because they are rather sorted by dependency order (e.g. {{LambertConformal}} reuses some
parameters defined in {{Mercator}} - indeed, Mercator can been seen as a simplification of
Lambert Conformal in the special case where the cone extremity is located at infinity). If
there is no dependency, we try to sort by increasing complexity (simpler operations first),
or most frequently-used operation first.

The idea is that when the user requests an operation, {{java.util.ServiceLoader}} will load
the classes in the order they are listed in the service file. But the iteration stops as soon
as a matching is found (it will restart from the point where we stopped if, later, we need
to go further). This means that the last providers in the service file will never be loaded
if they are never requested. For this reason, it is advantageous to sort the provider on _"most
likely to be used first"_ or _"most heavyweight last"_ criterion.

> TransverseMercator projection provider missing in service file
> --------------------------------------------------------------
>                 Key: SIS-287
>                 URL:
>             Project: Spatial Information Systems
>          Issue Type: Bug
>          Components: Referencing
>    Affects Versions: 0.6
>            Reporter: Fredrik Kjellberg
>            Assignee: Martin Desruisseaux
>            Priority: Minor
>         Attachments: TransverseMercator.diff
> I'm trying to parse the following WKT using the code from trunk and get an exception:
> {code}
> CoordinateReferenceSystem crs = CRS.fromWKT("PROJCS[\"RT90 2.5 gon V\",GEOGCS[\"RT90\",DATUM[\"Rikets_koordinatsystem_1990\",SPHEROID[\"Bessel
> {code}
> {noformat}
> Exception in thread "main" org.opengis.util.NoSuchIdentifierException: No operation method
found for name or identifier “Transverse_Mercator”.
> 	at org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory.getOperationMethod(
> 	at org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory.getOperationMethod(
> 	at org.apache.sis.internal.referencing.ServicesForMetadata.getOperationMethod(
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at org.apache.sis.referencing.factory.GeodeticObjectFactory.createFromWKT(
> 	at org.apache.sis.referencing.CRS.fromWKT(
> {noformat}
> It seems there are a few projection providers missing from the service file. It works
if I apply the attached patch.
> Maybe the providers in the OperationMethod service file should be sorted by name to make
the file easier to read?

This message was sent by Atlassian JIRA

View raw message