Op 7/12/2010 10:26, Andrea Aime schreef:
> On Tue, Dec 7, 2010 at 9:24 AM, Pieter De Graef
> <[email protected]>  wrote:
>> Hi,
>>
>> for the Geomajas project we are using GeoTools for server-side CRS
>> transformations, and sometimes run into problems can trying to transform
>> coordinates close to the poles.
>>
>> I realize that this is a huge problem in general, but I was wondering if
>> there is some way to catch such errors, and have GeoTools calculate some
>> best-effort coordinates. What I'm basically looking for is a general way
>> of handling coordinate transformations, so that our back-end never
>> totally fails, but always is able to return some kind of answer.
>>
>> I was hoping you guys would know some best-practices or so to help us out.
> The best practice, afaik, is to throw the exception: if you're so far away
> from the center of the projection that the projection math start failing
> you're already way beyond any legitimate usage of that projection.
>
> Maybe looking at the specific example I could provide better comments.
> Would be also interesting to hear what you'd expect to see instead of
> an exception when the math starts failing: I guess you don't really want
> any random number, however if the projection math fails what else
> should we do? Open to suggestions here.
Don't really know if I can suggest an option here. Our problem is that 
at this moment, an entire Tile fails to build when a single coordinate 
of a single feature reaches too far (and the natural earth data set 
seems to contain such points). I was just hoping for some advice before 
actually attacking this problem of ours.

So the best option would be to catch the exception and leave such 
geometries out than?

> Cheers
> Andrea
>
> -----------------------------------------------------
> Ing. Andrea Aime
> Senior Software Engineer
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
>
> phone: +39 0584962313
> fax:     +39 0584962313
>
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
>
> -----------------------------------------------------
>

-- 
Pieter De Graef

Community Manager
GeoSparc nv.
http://www.geosparc.com/

Chairman of the Geomajas project
http://www.geomajas.org/



------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to