/*
 *    GeoTools - The Open Source Java GIS Toolkit
 *    http://geotools.org
 * 
 *    (C) 2002-2008, Open Source Geospatial Foundation (OSGeo)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */
package org.geotools.feature.type;

import java.util.List;

import org.opengis.feature.type.AttributeType;
import org.opengis.feature.type.GeometryType;
import org.opengis.feature.type.Name;
import org.opengis.filter.Filter;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.util.InternationalString;

/**
 * AttributeType for hold geometry implementations, maintains CRS information.
 *
 *
 * @source $URL$
 */
public class GeometryTypeImpl extends AttributeTypeImpl implements GeometryType {

	protected CoordinateReferenceSystem CRS;

	public GeometryTypeImpl(
		Name name, Class binding, CoordinateReferenceSystem crs, 
		boolean identified, boolean isAbstract, List<Filter> restrictions, 
		AttributeType superType, InternationalString description
	) {
		super(name, binding, identified, isAbstract, restrictions, superType, description);
		CRS = crs;
	}

	public CoordinateReferenceSystem getCoordinateReferenceSystem() {
		return CRS;
	}

}

@@ -1618,10 +1618,587 @@
 RS;%0A%09%7D%0A%0A
+    @Override%0A    public boolean equals(Object other) %7B%0A        if (!(other instanceof GeometryType)) %7B%0A            return false;%0A        %7D%0A        if (!super.equals(other)) %7B%0A            return false;%0A        %7D%0A        GeometryType o = (GeometryType) other;%0A        if (CRS == null) %7B%0A            return o.getCoordinateReferenceSystem() == null;%0A        %7D%0A        if (o.getCoordinateReferenceSystem() == null) %7B%0A            return false;%0A        %7D%0A        return org.geotools.referencing.CRS.equalsIgnoreMetadata(CRS,%0A                o.getCoordinateReferenceSystem());%0A    %7D%0A%0A
 %7D%0A

implement GeometryTypeImpl.equals(Object), it didn't check for CRS equality