Thanks for the feedback, Patrick. The heart of the problem seems to be the
error message:
org.opengis.referencing.NoSuchIdentifierException: No transform for
classification "Equidistant_Conic".
I still get this when trying to create the crs from the wkt. I tried
something similar with CRS.parseWkt() and had the same result.
-Cliff
On Wed, Mar 19, 2008 at 5:00 AM, Patrick Schlaepfer <[EMAIL PROTECTED]>
wrote:
> You could write your own WKT. Here is my class:
>
> import org.geotools.referencing.FactoryFinder;
> import org.opengis.referencing.FactoryException;
> import org.opengis.referencing.crs.CRSFactory;
> import org.opengis.referencing.crs.CoordinateReferenceSystem;
>
> import ch.meteoswiss.methoden.editor.logging.EditorLogger;
>
> public class CRSFromWKT {
>
> private static CoordinateReferenceSystem prjCRS=null;
>
> public static void initProjectedCRSfromWKT(){
>
> EditorLogger.logger.debug("Start: Project the map.");
>
> CRSFactory crsFactory = FactoryFinder.getCRSFactory(null);
>
> String another1903 = "PROJCS[\"CH1903+ / LV95\","
> + "GEOGCS[\"CH1903+\",DATUM[\"CH1903\","
> + "SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,"
> + "AUTHORITY[\"EPSG\",\"7004\"]], "
> + "TOWGS84[674.374,15.056,405.346,0,0,0,0],"
> + "AUTHORITY[\"EPSG\",\"6150\"]],"
> + "PRIMEM[\"Greenwich\",0, "
> + "AUTHORITY[\"EPSG\",\"8901\"]],"
> + "UNIT[\"degree\",0.01745329251994328,"
> + "AUTHORITY[\"EPSG\",\"9122\"]], "
> + "AUTHORITY[\"EPSG\",\"4150\"]],"
> + "PROJECTION[\"Hotine_Oblique_Mercator\"], "
> + "PARAMETER[\"latitude_of_center\",46.95240555555556], "
> + "PARAMETER[\"longitude_of_center\",7.439583333333333], "
> + "PARAMETER[\"azimuth\",90], "
> + "PARAMETER[\"rectified_grid_angle\",90], "
> + "PARAMETER[\"scale_factor\",1],"
> + "PARAMETER[\"false_easting\",2600000], "
> + "PARAMETER[\"false_northing\",1200000], "
> + "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]], "
> + "AUTHORITY[\"EPSG\",\"2056\"]]";
>
> prjCRS=null;
> try{
> prjCRS = crsFactory.createFromWKT(another1903);
> } catch (FactoryException fe){
> EditorLogger.logger.fatal("On prjCRS creation a
> FactoryException
> :"+fe.getMessage());
> }
>
> EditorLogger.logger.debug(" End: Projected the map");
>
>
> }
>
> public static CoordinateReferenceSystem getMyCRS() {
> return prjCRS;
> }
>
>
> }
>
> So you have to exchange String another1903 with your definition.
> Have a look at:
> http://trac.osgeo.org/gdal/ticket/456
>
> Maybe it helps.
>
> > Cliff Darling a écrit :
> >> org.opengis.referencing.NoSuchIdentifierException: No transform for
> >> classification "Equidistant_Conic".
> >
> > This map projection is not implemented in GeoTools. In a WKT, the name
> > inside
> > PROJECTION["something"] is the name of an OperationMethod instance, i.e.
> > the
> > formulas to use (Mercator cylindrical, Lambert conical, etc.). They map
> to
> > java
> > code, not something that could be expressed in WKT. "Equidistant_Conic"
> is
> > not
> > implemented. I don't know how close it is to existing projection
> ("Lambert
> > conical", etc.). Maybe it is just a particular case. We would need
> someone
> > for
> > looking at that.
> >
> > Martin
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Geotools-gt2-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> >
>
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users