// loop through each point in this Ring and transform it to the new CRS, then
// use the new points to build a new Ring and return that.
PrimitiveFactory primitiveFactory = new PrimitiveFactoryImpl(newCRS, getPositionFactory());
GeometryFactory geometryFactory = new GeometryFactoryImpl(newCRS, getPositionFactory());
DirectPositionImpl dp1 = null;
List<DirectPosition> currentpositions = this.asDirectPositions();
Iterator<DirectPosition> iter = currentpositions.iterator();
List<Position> newpositions = new ArrayList<Position>();
while (iter.hasNext()) {
DirectPosition thispos = (DirectPosition) iter.next();
dp1 = new DirectPositionImpl(newCRS);
dp1 = (DirectPositionImpl) transform.transform( thispos, dp1);
newpositions.add(dp1);
}
// use the new positions list to build a new Ring and return it