sis-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Desruisseaux <martin.desruisse...@geomatys.com>
Subject Re: Usage of geotk and Apache SIS
Date Wed, 27 Feb 2019 13:54:05 GMT
Le 27/02/2019 à 13:42, Christoph Steinforth a écrit :

> Currently we are using a local EPSG database as created by geotk-epsg.
>
Then you may not need Geotk at all. There is still some projections in
Geotk not yet ported to Apache SIS, namely:

  * Cassini-Soldner
  * Krovak
  * Lambert Azimuthal Equal Area
  * New Zealand map grid
  * Polyconic

If above-cited projection are not used, then Geotk may not be needed at all.


> In order to use this we initialize
>
> Hints.putSystemDefault(Hints.CRS_AUTHORITY_FACTORY,
> ThreadedAuthorityFactory.class)

This is not needed anymore with Apache SIS. However one difference
between SIS and Geotk is that Geotk silently created a ".geotoolkit"
directory in the home directory, in order to store the EPSG database.
But Apache SIS does differently: it will not create any directory
without explicit instruction from the user or developer. SIS can be
instructed where to create the EPSG database in different ways:

  * By setting the SIS_DATA environment variable (not to be confused
    with Java property). This directory will be used not only for EPSG
    database, but for any file that SIS needs to store for its working
    (e.g. datum shift grids, etc.).
  * By setting the derby.system.home Java property. This directory is
    used by all Derby database, not only the EPSG database created by SIS.
  * By configuring JNDI. This is relevant if using a container like
    Tomcat (let me know if this is your case).


> The ThreadedAuthorityFactory seems not to part of Apachse SIS, so is
> there some kind alternative to this, or is completely different
> approach needed here?
>
It is named ConcurrentAuthorityFactory in SIS but provides the same
services. However it should not be necessary to care about that class,
except if wanting to develop custom factories. There is no need for
Hints.putSystemDefault(something).


> The decode()-method seems to be replaced by forCode() in SIS, is this
> right?
>
Yes. There is nothing special to do; no need to invoke Setup or Hints
methods. Just invoke CRS.forCode(…) directly. If one of SIS_DATA
environment variable, derby.system.home property or JNDI entry is set
and if sis-epsg is on the classpath, it should work out of the box.

Alternatively you can put sis-embedded-data on the classpath instead of
sis-epsg. Then no configuration at all is needed, but accesses to the
database are slower.

    Martin



Mime
View raw message