[geotk] IGNF registry
Martin Desruisseaux
martin.desruisseaux at geomatys.fr
Mon May 7 12:00:45 EDT 2012
Hello Eric
Le 07/05/12 17:18, Eric HORLAIT a écrit :
> Quite new to this library, I would like to use IGNF:LAMB93 as well as
> IGNF:LAMBE as authority codes. Maybe this issue has been previously
> addressed…
We don't have yet a formal authority factory for IGNF. We made a special
case for "IGNF:MILLER" (listed on the bottom of the
http://www.geotoolkit.org/modules/referencing/supported-codes.html
page), but we have not yet generalized to other codes.
However you can create your own authority factory with the code of your
choice. You can create a "IGNF.properties" file with the following content:
LAMB93=PROJCS["Lambert 93",GEOGCS["Réseau géodésique français 1993",DATUM["Réseau géodésique français 1993",SPHEROID["IAG GRS 1980",6378137,298.257222101,AUTHORITY["IGNF","ELG037"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["IGNF","REG024"]],PRIMEM["Greenwich",0,AUTHORITY["IGNF","LGO01"]],UNIT["degree",0.0174532925199433],AXIS["Longitude",EAST],AXIS["Latitude",NORTH],AUTHORITY["IGNF","RGF93G"]],PROJECTION["Lambert_Conformal_Conic_2SP",AUTHORITY["IGNF","PRC0140"]],PARAMETER["semi_major",6378137.0],PARAMETER["semi_minor",6356752.3141],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",3.0],PARAMETER["standard_parallel_1",44.0],PARAMETER["standard_parallel_2",49.0],PARAMETER["false_easting",700000.0],PARAMETER["false_northing",6600000.0],UNIT["metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["IGNF","LAMB93"]]
LAMBE=PROJCS["Lambert II étendu",GEOGCS["Nouvelle Triangulation Française Paris grades",DATUM["NTF",SPHEROID["Clarke 1880 IGN",6378249.2,293.466021,AUTHORITY["IGNF","ELG010"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["IGNF","REG002"]],PRIMEM["Paris",2.337229167,AUTHORITY["IGNF","LGO02"]],UNIT["grad",0.01570796326794897],AXIS["Longitude",EAST],AXIS["Latitude",NORTH],AUTHORITY["IGNF","NTFP"]],PROJECTION["Lambert_Conformal_Conic_1SP",AUTHORITY["IGNF","PRC0120"]],PARAMETER["semi_major",6378249.2],PARAMETER["semi_minor",6356515.0],PARAMETER["latitude_of_origin",46.8],PARAMETER["central_meridian",0.0],PARAMETER["scale_factor",0.99987742],PARAMETER["false_easting",600000.0],PARAMETER["false_northing",2200000.0],UNIT["metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["IGNF","LAMBE"]]
Then create a class like below, assuming that the above property file is
saved in the same directory than "MyFactory.class":
public class MyFactory extends CachingAuthorityFactory implements CRSAuthorityFactory {
public MyFactory() {
this(null);
}
public MyFactory(final Hints hints) {
super(new PropertyAuthorityFactory(hints, MyFactory.class.getResource("IGNF.properties"), Citations.IGNF););
}
}
Finally, register you factory by providing the following file in your
JAR file:
META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory
This file should contains only one line, as below (replace "mypackage"
and "MyFactory" by whatever is appropriate for your project):
mypackage.MyFactory
Please let us know if you have any issue
Martin
More information about the Geotoolkit
mailing list