Reni here is the code that creates the target feature type ...

    public ReprojectingFeatureCollection(
            SimpleFeatureCollection delegate,
            CoordinateReferenceSystem source,
CoordinateReferenceSystem target) {
        ..
        SimpleFeatureType schema = delegate.getSchema();
        this.schema = reType(schema, target);
        ...
    }

So schema will always have the correct coordinate reference system at
the end of the day ... ReprojectingFeatureCollection is written
correctly.

So the question for me is what code is making use of the assumption
that Geometry.getUserData() is a coordiante reference system...

SQLServerDialect.decodeGeometryEnvelope(ResultSet, int, Connection)

GMLComplexTypes: <--- this is probably where you are having trouble
Reni? I actually looks like this code assumes use data is a String (ie
srsName)
- encode(Element, GeometryCollection, PrintHandler)
- encode(Element, LineString, PrintHandler)
- encode(Element, MultiLineString, PrintHandler)
- encode(Element, MultiPoint, PrintHandler)
- encode(Element, MultiPolygon, PrintHandler)
- encode(Element, Object, PrintHandler, Map)
- encode(Element, Object, PrintHandler, Map)
- encode(Element, Point, PrintHandler)
- encode(Element, Polygon, PrintHandler)

GML2EncodingUtils: // seems to check for an instanceof
CoordianteReferenceSystem or a Map? This in conflict with
GMLComplexTypes above that expects a String.
- getCRS(Geometry) // so this traces back to
GMLAbstractGeometryCollectionBaseTypeBinding and
AbstractGeometryTypeBinding being written against a value rather then
an attribute

JDBCFeatureReader:
- next(); // this is putting the CoordinateReferenceSystem into the geometry

Etc...

So as you can see we are using Geometry userData where we should be
using GeometryAttribute.getDescriptor().getCoordianteReferenceSystem().

Indeed user data is used for:
- String
- CoordianteReferenceSystem
- java.util.Map
- Integer
- other (provided by client code)

So we need a decision on what to do - which is why we are on the devel
list and not commenting on your bug report. Next step is to describe
some options to clean this up and ask the devel list what to do if we
cannot sort out something clean and consistent.

Jody

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to