I am not sure if this is a bug or expected behavior.... using epsg-hsql here:
> AbstractCRS epsgCrs = (AbstractCRS) CRS.decode("EPSG:4326"); > String wkt = epsgCrs.toWKT(); > > AbstractCRS wktCrs = (AbstractCRS) CRS.parseWKT(wkt); > > assertTrue( "equals ignore metadata", epsgCrs.equals( wktCrs, false )); > assertFalse( "equals comapre metadata", epsgCrs.equals( wktCrs, true )); What was interesting for me was going in to see how different the two objects are ... epsgCrs.getCoordinateReferenceSystem() has the following: > EllipsoidalCS["Ellipsoidal 2D CS. Axes: latitude, longitude. > Orientations: north, east. UoM: deg", > AXIS["Geodetic latitude", NORTH], > AXIS["Geodetic longitude", EAST], > AUTHORITY["EPSG","6422"]] wktCrs.getCoordinateReferenceSystem() has the following: > EllipsoidalCS["WGS 84", > AXIS["Geodetic latitude", NORTH], > AXIS["Geodetic longitude", EAST], > AUTHORITY["EPSG","4326"]] Other than this the two look very similar... it is absolutely killing me to have to cast to AbstractCRS in order to perform this check; we can do this in all the GeometryFactory methods but I cannot do it in client code - we need to figure out a way to make this functionality available through the interfaces. Cheers, Jody ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel