Return-Path: X-Original-To: apmail-sis-commits-archive@www.apache.org Delivered-To: apmail-sis-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 96C6B173B0 for ; Wed, 2 Sep 2015 13:29:46 +0000 (UTC) Received: (qmail 7549 invoked by uid 500); 2 Sep 2015 13:29:46 -0000 Delivered-To: apmail-sis-commits-archive@sis.apache.org Received: (qmail 7516 invoked by uid 500); 2 Sep 2015 13:29:46 -0000 Mailing-List: contact commits-help@sis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: sis-dev@sis.apache.org Delivered-To: mailing list commits@sis.apache.org Received: (qmail 7507 invoked by uid 500); 2 Sep 2015 13:29:46 -0000 Delivered-To: apmail-incubator-sis-commits@incubator.apache.org Received: (qmail 7503 invoked by uid 99); 2 Sep 2015 13:29:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2015 13:29:46 +0000 Date: Wed, 2 Sep 2015 13:29:46 +0000 (UTC) From: "Martin Desruisseaux (JIRA)" To: sis-commits@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SIS-287) TransverseMercator projection provider missing in service file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SIS-287?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1472732= 9#comment-14727329 ]=20 Martin Desruisseaux commented on SIS-287: ----------------------------------------- The reason why the providers in the {{OperationMethod}} service file are no= t sorted by name is because they are rather sorted by dependency order (e.g= . {{LambertConformal}} reuses some parameters defined in {{Mercator}} - ind= eed, 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.ServiceLo= ader}} will load the classes in the order they are listed in the service fi= le. 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 me= ans that the last providers in the service file will never be loaded if the= y are never requested. For this reason, it is advantageous to sort the prov= ider on _"most likely to be used first"_ or _"most heavyweight last"_ crite= rion. > TransverseMercator projection provider missing in service file > -------------------------------------------------------------- > > Key: SIS-287 > URL: https://issues.apache.org/jira/browse/SIS-287 > 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 a= n exception: > {code} > CoordinateReferenceSystem crs =3D CRS.fromWKT("PROJCS[\"RT90 2.5 gon V\",= GEOGCS[\"RT90\",DATUM[\"Rikets_koordinatsystem_1990\",SPHEROID[\"Bessel 184= 1\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[414.10552= 46174,41.3265500042,603.0582474221,-0.8551163377,2.1413174055,-7.0227298286= ,0],AUTHORITY[\"EPSG\",\"6124\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"= ,\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"= ]],AUTHORITY[\"EPSG\",\"4124\"]],PROJECTION[\"Transverse_Mercator\"],PARAME= TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",15.80827777777= 778],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",1500000],PAR= AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]= ,AUTHORITY[\"EPSG\",\"3021\"]]"); > {code} > {noformat} > Exception in thread "main" org.opengis.util.NoSuchIdentifierException: No= operation method found for name or identifier =E2=80=9CTransverse_Mercator= =E2=80=9D. > =09at org.apache.sis.referencing.operation.transform.DefaultMathTransform= Factory.getOperationMethod(DefaultMathTransformFactory.java:381) > =09at org.apache.sis.referencing.operation.DefaultCoordinateOperationFact= ory.getOperationMethod(DefaultCoordinateOperationFactory.java:179) > =09at org.apache.sis.internal.referencing.ServicesForMetadata.getOperatio= nMethod(ServicesForMetadata.java:672) > =09at org.apache.sis.io.wkt.GeodeticObjectParser.parseMethod(GeodeticObje= ctParser.java:1225) > =09at org.apache.sis.io.wkt.GeodeticObjectParser.parseDerivingConversion(= GeodeticObjectParser.java:1273) > =09at org.apache.sis.io.wkt.GeodeticObjectParser.parseProjectedCRS(Geodet= icObjectParser.java:1963) > =09at org.apache.sis.io.wkt.GeodeticObjectParser.parseCoordinateReference= System(GeodeticObjectParser.java:360) > =09at org.apache.sis.io.wkt.GeodeticObjectParser.parseObject(GeodeticObje= ctParser.java:323) > =09at org.apache.sis.io.wkt.AbstractParser.parseObject(AbstractParser.jav= a:240) > =09at org.apache.sis.io.wkt.GeodeticObjectParser.parseObject(GeodeticObje= ctParser.java:281) > =09at org.apache.sis.io.wkt.AbstractParser.createFromWKT(AbstractParser.j= ava:209) > =09at org.apache.sis.referencing.factory.GeodeticObjectFactory.createFrom= WKT(GeodeticObjectFactory.java:1436) > =09at org.apache.sis.referencing.CRS.fromWKT(CRS.java:236) > {noformat} > It seems there are a few projection providers missing from the service fi= le. 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 (v6.3.4#6332)