<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Le 25/05/11 11:47, Riou Olivier a &eacute;crit&nbsp;:<span
      class="182392909-25052011"></span><br>
    <blockquote
cite="mid:30369_1306316836_4DDCD024_30369_18104_1_02E290128C798A46A5DC7FA4B3068F42C473D8@sbmsg02.tus.fr.thales"
      type="cite"><span class="182392909-25052011"><font color="#0000ff"
          face="Arial" size="2">The CRS I try to instantiate are WGS84
          (epsg code 4326), WGS72 (epsg code 4322), ED1950 (epsg code
          4230), OSGB36 (epsg code 4277), OSSN80 (epsg code 4279) and
          all UTM (epsg codes starting at 32600 and 32700)
          (epsg.properties in attachment).</font></span></blockquote>
    They look like "ordinary" CRS, and the <tt>epsg.properties</tt>
    file is not very big. I would expect the memory consumption to be
    reasonable in such case...<br>
    &nbsp;
    <blockquote
cite="mid:30369_1306316836_4DDCD024_30369_18104_1_02E290128C798A46A5DC7FA4B3068F42C473D8@sbmsg02.tus.fr.thales"
      type="cite">
      <div><span class="182392909-25052011"><font color="#0000ff"
            face="Arial" size="2">I also have a mistake in my code
            because I was expecting that geotoolkit was loading only my
            epsg.properties file but since I use the CRS.decode(...)
            function, it also initialize the embedded database. When I
            remove the call to this method and load a CRS through the
            PropertyEpsgFactory it does not initialize the embedded
            database and use less memory.</font></span></div>
    </blockquote>
    Note that if you are using Maven, you can also avoid <tt>geotk-epsg</tt>
    dependency, in which case the database will not be created (but if
    it already exists, it will still be used). You can also remove Derby
    (a.k.a. JavaDB) dependencies if you don't use it, in which case you
    are sure that the embedded EPSG database will not be used.<br>
    <br>
    If you are already using a database anyway, it may be worth to store
    the EPSG schema on that database. You can use the <tt>EpsgInstaller</tt>
    class for that purpose. Once the EPSG database has been installed,
    you can create a <tt>DataSource</tt> to that database and specify
    it to Geotk as below:<br>
    <br>
    <pre>Hints.putSystemDefault(Hints.EPSG_DATA_SOURCE, datasource);</pre>
    <br>
    Alternatively you can also edit a <tt>epsg.properties</tt> file as
    documented here:<br>
<a class="moz-txt-link-freetext" href="http://www.geotoolkit.org/apidocs/org/geotoolkit/referencing/factory/epsg/ThreadedEpsgFactory.html#CONFIGURATION_FILE">http://www.geotoolkit.org/apidocs/org/geotoolkit/referencing/factory/epsg/ThreadedEpsgFactory.html#CONFIGURATION_FILE</a><br>
    <br>
    &nbsp;&nbsp;&nbsp; Martin<br>
    <br>
  </body>
</html>