You can avoid Bursa Wolf problems if you use the findMathTransform
like so:
CRS.findMathTransform(outputCRS, mapCRS, false).
But as you noted that is not your issue. I don't have a solid answer
yet but are you sure that your geometries are valid UTM zone 32
because if they are there shouldn't be a problem.
Jesse
On Jul 8, 2007, at 11:05 AM, Andrea Antonello wrote:
I'm really no projection wizard and again and again bang my head
against
that wall.
I'm creating an operation that would like to reproject feature layers
and dump them to shapefile.
I'm going the usual way:
CoordinateReferenceSystem mapCrs = activeMap.getViewportModel()
.getCRS();
CoordinateReferenceSystem outputCrs = CRS.parseWKT(crsString);
MathTransform mathTransform = CRS.findMathTransform(outputCrs,
mapCrs);
aware of the fact that the bursa parameters could be problematic, I
decided to choose 2 projections that do not have towgs84
parameters: UTM
zone 32 on wgs84 and the latlong wgs84.
The error is:
org.geotools.referencing.operation.projection.PointOutsideEnvelopeExce
ption:
Longitude 703600°38.8'E is out of range (±180°).
which tells me that i probably can't hope to project between metric
and
lat-long, since it interprets the metric values as degrees. Is that
true? How should this be done?
Also, since I didn't come to the end of the thing, I also would
like to
ask if the following is ok to just change the geometries of a
featurecollection:
FeatureIterator fReader = featureCollection.features();
while (fReader.hasNext()) {
Feature tmpFeature = fReader.next();
Geometry featureGeometry = tmpFeature.getDefaultGeometry();
Geometry tmpGeometry = JTS.transform(featureGeometry,
mathTransform);
tmpFeature.setDefaultGeometry(tmpGeometry);
}
Ciao,
Andrea
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel