Thanks for the tips Thorsten. It was setting up the EPSG database that was taking so long, not creating the transforms. Since I always use the same two CRS, I just coded them both in WKT, and now the app starts in 7 seconds instead of nearly a minute.

Matt


Thorsten Reitz wrote:
Hi Matt,

if you are using the HSQL EPSG database, this has most likely to do with the set-up of the EPSG database, which happens once per application start. Using a different database, like a preinstalled MySQL, where the EPSG content it provided, will usually reduce this startup time. Alternatively, if you know in advance which transforms you are going to need, you can store transforms directly (serializing them) and later recreate the MathTransform objects from that. AFAIR, you can also create a transform directly from WKTs, so soring these for the CRS you need might be an option.

Best regards,

Thorsten

Matt Foster schrieb:
Hello,

I have an application using GT 2.5.1 that has to create Geographic <-> Projected transforms at startup. I'm creating these with CRS.findMathTransform to get the first (Projected -> Geographic), and then using the inverse() to get the Geographic -> Projected. I was trying to figure out yesterday why the app was taking so long to start (nearly a minute), and found that it is taking 45 seconds to create the transforms.

Is there anyway this can be done faster?

Matt

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


--
Do not go where the path may lead; go instead where there is no path and leave 
a trail.
-- Ralph Waldo Emerson

begin:vcard
fn:Matt Foster - N0EYE
n:Foster;Matt
org:;NWS Forecast Office - Norman OK
email;internet:[email protected]
title:Information Technology Officer
tel;work:(405) 325-3406
x-mozilla-html:TRUE
version:2.1
end:vcard

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to