<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
Hello,<br>
<br>
I'd like to be able to programmatically detect certain ProjectedCRS
types, such as LambertConformal and Mercator. Here is the code I
was hoping to use:<br>
<br>
CoordinateReferenceSystem crs = ...;<br>
CoordinateReferenceSystem horizCrs = CRS.getHorizontalCRS( crs );<br>
//magic occurs<br>
if( myOperationMethod instanceof AlbersEqualArea ){<br>
//do something extraordinarily amazing<br>
}<br>
<br>
I have yet to find a clear way to do something like this. When I
receive ProjectedCRSs I have yet to find any classes from the
org.geotoolkit.referencing.operation.projection package anywhere,
just general-purpose instances. In digging around it seems as if
there are multiple paths that could be taken to try to identify the
operationMethod/mathTransform/etc. <br>
<ol>
<li>Use identifiers (EPSG:9807, for example). Not sure where in
the Geotk hierarchy of instances would be best to do so<br>
</li>
<li>Instantiate an instance of a projected type
(AlbersEqualArea.class) and use one of the weak .equals() calls<br>
</li>
<li>Get an instance of a projected type (AlbersEqualArea.class)
from the horizontal CRS somehow<br>
</li>
</ol>
Any thoughts?<br>
<br>
Thanks,<br>
Aaron<br>
</body>
</html>