Hi, I have finally prepared a pull request to add a "findOperations" method to CoordinateOperationFactory:
https://github.com/geotools/geotools/pull/1821 The goal of the method is to be able to find all the available operations from a source to a target CRS (by contrast with the existing "createOperation" method, which only returns the default operation). This is particularly useful for CRSs having different datums, for which many operations are sometimes defined, producing very different results. Now, regarding implementation, I had to modify a number of methods in DefaultCoordinateOperationFactory, which are central for selecting of transformations. This change also concerns the createOperation method (the one used by the CRS.findMathTransform method). I'd like to provide a simpler patch, but these methods are recursively called and the "default" selection happens very deep in this recursion. Overall, I am quite confident about the correctness of the code, but anyway I'd appreciate some suggestions regarding some ESPG codes to test the most unusual transformation paths (such as compound CRS to Geographic3D and compound to compound CRSs). I'd then add tests cases for them. Best regards, César Martínez On 4 March 2018 at 09:59, Andrea Aime <[email protected]> wrote: > Hi Cesar, > the referencing module second name is indeed "painful". Nothing new there > I'm afraid :-) > > Cheers > Andrea > > > On Fri, Mar 2, 2018 at 5:32 PM, César Martínez Izquierdo > <[email protected]> wrote: >> >> Thanks Andrea for the pointers, >> >> I am working on it, although it is becoming more painful that I expected. >> Anyway, I will create a pull request when it is ready, then we can >> discuss if it is suitable to be included in trunk. >> >> Best regards, >> >> César >> >> On 23 February 2018 at 18:01, Andrea Aime <[email protected]> >> wrote: >> > Hi Cesar, >> > sure, it seems like a nice addition. >> > >> > Just in case you have not found these already, here are the contribution >> > guides: >> > http://docs.geotools.org/latest/developer/procedures/contribute.html >> > https://github.com/geotools/geotools/blob/master/CONTRIBUTING.md >> > >> > If you have any questions, ask away :-) >> > >> > Cheers >> > Andrea >> > >> > >> > On Fri, Feb 23, 2018 at 3:24 PM, César Martínez Izquierdo >> > <[email protected]> wrote: >> >> >> >> Hi, >> >> >> >> We are evaluating using Geotools as the basis for our CRS management >> >> libraries on gvSIG project (a desktop, Java-based GIS application). >> >> >> >> We have performed some tests to ensure we can implement all our >> >> current use-cases using Geotools. Most of them can be easily >> >> implemented, but I don't find an evident way to list available >> >> operations to convert/transform between two CRSs (when more than one >> >> operation is available on the EPSG database). >> >> >> >> I am aware it is possible to use CRS.findOperation(source, target) to >> >> get "the preferred operation", but in this way we can't offer the >> >> users the possibility to choose the transformation themselves. >> >> >> >> Ideally, I would expect a method like: >> >> Set<CoordinateOperation> ops = CRS.findOperations(source, target); >> >> >> >> which would mean adding a new method in CoordinateOperationFactory: >> >> >> >> Set<CoordinateOperation> listOperations(sourceCRS, targetCRS) >> >> >> >> I believe it would be quite simple to add this method in >> >> CoordinateOperationFactory. As far as I've seen, it would need some >> >> changes in DefaultCoordinateOperationFactory, >> >> BufferedCoordinateOperationFactory and AuthorityBackedFactory, but >> >> they are mostly method additions and some code refactoring. >> >> >> >> We are wondering if you would accept this contribution, as it is >> >> currently the main blocker for going forward. >> >> >> >> Best regards, >> >> >> >> César Martínez Izquierdo >> >> >> >> >> >> >> >> >> >> -- >> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> >> César Martínez Izquierdo >> >> GIS developer >> >> - - - - - - - - - - - - - - - - - - - - >> >> SCOLAB: http://www.scolab.es >> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Check out the vibrant tech community on one of the world's most >> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> _______________________________________________ >> >> GeoTools-Devel mailing list >> >> [email protected] >> >> https://lists.sourceforge.net/lists/listinfo/geotools-devel >> > >> > >> > >> > >> > -- >> > >> > Regards, >> > >> > Andrea Aime >> > >> > == >> > GeoServer Professional Services from the experts! Visit >> > http://goo.gl/it488V >> > for more information. >> > == >> > >> > Ing. Andrea Aime >> > @geowolf >> > Technical Lead >> > >> > GeoSolutions S.A.S. >> > Via di Montramito 3/A >> > 55054 Massarosa (LU) >> > phone: +39 0584 962313 >> > fax: +39 0584 1660272 >> > mob: +39 339 8844549 >> > >> > http://www.geo-solutions.it >> > http://twitter.com/geosolutions_it >> > >> > AVVERTENZE AI SENSI DEL D.Lgs. 196/2003 >> > >> > Le informazioni contenute in questo messaggio di posta elettronica e/o >> > nel/i >> > file/s allegato/i sono da considerarsi strettamente riservate. Il loro >> > utilizzo è consentito esclusivamente al destinatario del messaggio, per >> > le >> > finalità indicate nel messaggio stesso. Qualora riceviate questo >> > messaggio >> > senza esserne il destinatario, Vi preghiamo cortesemente di darcene >> > notizia >> > via e-mail e di procedere alla distruzione del messaggio stesso, >> > cancellandolo dal Vostro sistema. Conservare il messaggio stesso, >> > divulgarlo >> > anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo >> > per >> > finalità diverse, costituisce comportamento contrario ai principi >> > dettati >> > dal D.Lgs. 196/2003. >> > >> > The information in this message and/or attachments, is intended solely >> > for >> > the attention and use of the named addressee(s) and may be confidential >> > or >> > proprietary in nature or covered by the provisions of privacy act >> > (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection >> > Code).Any use not in accord with its purpose, any disclosure, >> > reproduction, >> > copying, distribution, or either dissemination, either whole or partial, >> > is >> > strictly forbidden except previous formal approval of the named >> > addressee(s). If you are not the intended recipient, please contact >> > immediately the sender by telephone, fax or e-mail and delete the >> > information in this message that has been received in error. The sender >> > does >> > not give any warranty or accept liability as the content, accuracy or >> > completeness of sent messages and accepts no responsibility for changes >> > made after they were sent or for other risks which arise as a result of >> > e-mail transmission, viruses, etc. >> > >> > >> >> >> >> -- >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> César Martínez Izquierdo >> GIS developer >> - - - - - - - - - - - - - - - - - - - - >> SCOLAB: http://www.scolab.es >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > > > > -- > > Regards, > > Andrea Aime > > == > GeoServer Professional Services from the experts! Visit http://goo.gl/it488V > for more information. > == > > Ing. Andrea Aime > @geowolf > Technical Lead > > GeoSolutions S.A.S. > Via di Montramito 3/A > 55054 Massarosa (LU) > phone: +39 0584 962313 > fax: +39 0584 1660272 > mob: +39 339 8844549 > > http://www.geo-solutions.it > http://twitter.com/geosolutions_it > > AVVERTENZE AI SENSI DEL D.Lgs. 196/2003 > > Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i > file/s allegato/i sono da considerarsi strettamente riservate. Il loro > utilizzo è consentito esclusivamente al destinatario del messaggio, per le > finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio > senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia > via e-mail e di procedere alla distruzione del messaggio stesso, > cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo > anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per > finalità diverse, costituisce comportamento contrario ai principi dettati > dal D.Lgs. 196/2003. > > The information in this message and/or attachments, is intended solely for > the attention and use of the named addressee(s) and may be confidential or > proprietary in nature or covered by the provisions of privacy act > (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection > Code).Any use not in accord with its purpose, any disclosure, reproduction, > copying, distribution, or either dissemination, either whole or partial, is > strictly forbidden except previous formal approval of the named > addressee(s). If you are not the intended recipient, please contact > immediately the sender by telephone, fax or e-mail and delete the > information in this message that has been received in error. The sender does > not give any warranty or accept liability as the content, accuracy or > completeness of sent messages and accepts no responsibility for changes > made after they were sent or for other risks which arise as a result of > e-mail transmission, viruses, etc. > > -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - César Martínez Izquierdo GIS developer - - - - - - - - - - - - - - - - - - - - SCOLAB: http://www.scolab.es - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ GeoTools-Devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
