root / branches / libProjection_v2_0_prep / libraries / libJCRS / src / org / geotools / referencing / operation / projection / IdrRobinson.java @ 27137
History | View | Annotate | Download (3.41 KB)
1 | 27137 | cmartinez | package org.geotools.referencing.operation.projection; |
---|---|---|---|
2 | |||
3 | import java.awt.geom.Point2D; |
||
4 | import java.util.Collection; |
||
5 | |||
6 | import javax.units.NonSI; |
||
7 | |||
8 | import org.opengis.parameter.ParameterDescriptorGroup; |
||
9 | import org.opengis.parameter.ParameterNotFoundException; |
||
10 | import org.opengis.parameter.ParameterValueGroup; |
||
11 | |||
12 | import org.geotools.metadata.iso.citation.CitationImpl; |
||
13 | import org.geotools.referencing.NamedIdentifier; |
||
14 | import org.geotools.resources.XMath; |
||
15 | import org.geotools.resources.cts.ResourceKeys; |
||
16 | import org.geotools.resources.cts.Resources; |
||
17 | import org.opengis.parameter.ParameterDescriptor; |
||
18 | import org.opengis.referencing.operation.Projection; |
||
19 | import org.opengis.referencing.operation.MathTransform; |
||
20 | |||
21 | |||
22 | |||
23 | public class IdrRobinson extends MapProjection { |
||
24 | |||
25 | |||
26 | protected IdrRobinson(ParameterValueGroup parameters) throws ParameterNotFoundException { |
||
27 | super(parameters);
|
||
28 | final Collection expected = getParameterDescriptors().descriptors(); |
||
29 | } |
||
30 | |||
31 | |||
32 | public ParameterDescriptorGroup getParameterDescriptors() {
|
||
33 | return Provider.PARAMETERS; |
||
34 | } |
||
35 | |||
36 | public ParameterValueGroup getParameterValues() {
|
||
37 | final ParameterValueGroup values = super.getParameterValues(); |
||
38 | return values;
|
||
39 | } |
||
40 | |||
41 | |||
42 | protected Point2D inverseTransformNormalized(double x, double y, |
||
43 | Point2D ptDst) throws ProjectionException { |
||
44 | // TODO Auto-generated method stub
|
||
45 | return null; |
||
46 | } |
||
47 | |||
48 | protected Point2D transformNormalized(double x, double y, Point2D ptDst) |
||
49 | throws ProjectionException {
|
||
50 | // TODO Auto-generated method stub
|
||
51 | return null; |
||
52 | } |
||
53 | |||
54 | public static class Provider extends AbstractProvider { |
||
55 | |||
56 | static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(new NamedIdentifier[] { |
||
57 | new NamedIdentifier(CitationImpl.OGC, "Robinson"), |
||
58 | new NamedIdentifier(CitationImpl.EPSG, "Robinson"), |
||
59 | new NamedIdentifier(new CitationImpl("IDR"), "IDR")//, |
||
60 | //new NamedIdentifier(CitationImpl.EPSG, "9823")//,
|
||
61 | // new NamedIdentifier(CitationImpl.GEOTOOLS, Vocabulary.formatInternational(
|
||
62 | // VocabularyKeys.EQUIDISTANT_CYLINDRICAL_PROJECTION))
|
||
63 | }, new ParameterDescriptor[] { |
||
64 | SEMI_MAJOR, SEMI_MINOR, |
||
65 | CENTRAL_MERIDIAN, |
||
66 | FALSE_EASTING, FALSE_NORTHING |
||
67 | }); |
||
68 | |||
69 | /*String[] parameterName={"central_meridian"};
|
||
70 | projectionParameterList.add(count,parameterName);
|
||
71 | addProjectionParameter(count,"standard_parallel_1");
|
||
72 | addProjectionParameter(count,"false_easting");
|
||
73 | addProjectionParameter(count,"false_northing");*/
|
||
74 | |||
75 | /**
|
||
76 | * Constructs a new provider.
|
||
77 | */
|
||
78 | public Provider() { |
||
79 | super(PARAMETERS);
|
||
80 | } |
||
81 | |||
82 | /**
|
||
83 | * Returns the operation type for this map projection.
|
||
84 | */
|
||
85 | protected Class getOperationType() { |
||
86 | return Projection.class;
|
||
87 | } |
||
88 | |||
89 | /**
|
||
90 | * Creates a transform from the specified group of parameter values.
|
||
91 | *
|
||
92 | * @param parameters The group of parameter values.
|
||
93 | * @return The created math transform.
|
||
94 | * @throws ParameterNotFoundException if a required parameter was not found.
|
||
95 | */
|
||
96 | public MathTransform createMathTransform(final ParameterValueGroup parameters) |
||
97 | throws ParameterNotFoundException
|
||
98 | { |
||
99 | return new IdrRobinson(parameters); |
||
100 | } |
||
101 | } |
||
102 | |||
103 | } |