|
From: Weber, C. <We...@fg...> - 2008-09-23 04:44:41
|
hi,
i try to create my own CoordinateReferenceSystem
with the method createProjectedCRS of ReferencingFactoryContainer
and a ProjectedCRS instance is created properly.
but in our application we use the authority code to access an crs.
and so - additionally - i would like to set my own authority code for my
projected crs. something like "dummy:001".
how do i get this ?
my code snippet (with geotools-2.2.4.5):
ReferencingFactoryContainer factories = new
ReferencingFactoryContainer(null);
MathTransformFactory mtFactory = factories.getMathTransformFactory();
GeographicCRS geoCRS =
org.geotools.referencing.crs.DefaultGeographicCRS.WGS84;
CartesianCS cartCS =
org.geotools.referencing.cs.DefaultCartesianCS.GENERIC_2D;
ParameterValueGroup parameters;
parameters = mtFactory.getDefaultParameters(proj);
// missing setting of the projection parameters
Map<String, String> properties = Collections.singletonMap("name",
"Transverse_Mercator");
ProjectedCRS projCRS = factories.createProjectedCRS(properties, geoCRS,
null, parameters, cartCS);
i have tried to set the "authority" and "code" keys in the properties
map.
something like:
Map<String, String> properties = new HashMap<String, String>();
properties.put("authority", "dummy");
properties.put("code", "001");
and pass it to createProjectedCRS.
but this does not work out. geotools seems to ignore these keys.
how can i set the authority code in a custom coordinate reference system
?
thanks for your answer
claus
|