Revision 187 org.gvsig.toolbox/trunk/org.gvsig.toolbox/org.gvsig.toolbox.algorithm/src/main/java/es/unex/sextante/vectorTools/transform/TransformAlgorithm.java
TransformAlgorithm.java | ||
---|---|---|
5 | 5 |
import com.vividsolutions.jts.geom.Geometry; |
6 | 6 |
import com.vividsolutions.jts.geom.util.AffineTransformation; |
7 | 7 |
|
8 |
import org.gvsig.tools.exception.BaseException; |
|
9 |
|
|
8 | 10 |
import es.unex.sextante.additionalInfo.AdditionalInfoNumericalValue; |
9 | 11 |
import es.unex.sextante.additionalInfo.AdditionalInfoVectorLayer; |
10 | 12 |
import es.unex.sextante.core.GeoAlgorithm; |
... | ... | |
61 | 63 |
layerIn.addFilter(new BoundingBoxFilter(m_AnalysisExtent)); |
62 | 64 |
} |
63 | 65 |
|
66 |
int subtype; |
|
67 |
try { |
|
68 |
subtype = layerIn.getSubType(); |
|
69 |
} catch (BaseException e) { |
|
70 |
subtype = org.gvsig.fmap.geom.Geometry.SUBTYPES.UNKNOWN; |
|
71 |
} |
|
64 | 72 |
m_Output = getNewVectorLayer(RESULT, Sextante.getText("Capa_transformada"), layerIn.getShapeType(), |
65 |
layerIn.getFieldTypes(), layerIn.getFieldNames()); |
|
73 |
layerIn.getFieldTypes(), layerIn.getFieldNames(), subtype);
|
|
66 | 74 |
|
67 | 75 |
final AffineTransformation at = new AffineTransformation(); |
68 | 76 |
at.compose(AffineTransformation.translationInstance(-dAnchorX, -dAnchorY)); |
Also available in: Unified diff