Hello Siddhesh

Le 02/08/2017 à 19:25, Siddhesh Rane a écrit :

> The CRS editor is now functioning and connected to the CRS list. You
> can right click on a chosen CRS and click edit to see the pane in action.
>
Thanks, it is a good start. What about making it a dialog box instead
than part of the CRS pane? A later version could have two tabs: one
which is the current one, and one for the Well Known Text. I'm not
suggest to do that now; just planing for future evolution.


> For the prime meridian you have asked for a combo box. But upon
> analyzing the class there doesn't seem to be an enumerable type. What
> are the other options that can be used to populate the combo box and
> how to get them?
>
You can do as below (this is not the most efficient way, but we can
start like that):

    CRSAuthorityFactory factory = CRS.getAuthorityFactory("EPSG");
    if (factory instanceof DatumAuthorityFactory) {
        DatumAuthorityFactory df = (DatumAuthorityFactory);
        Set<String> codes = df.getAuthorityCodes(PrimeMeridian.class);
        for (String code : codes) {
            PrimeMeridian pm = df.createPrimeMeridian(code);
        }
    }

As a side note, I see many exceptions like below when running the
application. Could you fix?

    Exception in thread "JavaFX Application Thread" 
java.lang.ClassCastException: java.lang.String cannot be cast to 
java.lang.Double
        at 
com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
        (...snip...)
        at 
sis.client.metadata.GeographicExtentBox.<init>(GeographicExtentBox.java:54)
        at sis.client.crs.CRSEditor.setValues(CRSEditor.java:130)


Another note: the package name should be changed in order to start with
"org.apache.sis". It could be for instance "org.apache.sis.desktop" (I
suggest to avoid "client" since it may have other meaning unrelated to
desktop application).

    Martin


Reply via email to