Revision 43394
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.shape/src/main/java/org/gvsig/exportto/swing/prov/shape/ExporttoShapeService.java | ||
---|---|---|
515 | 515 |
edit_feat.setDefaultGeometry(gitem); |
516 | 516 |
// ================================================ |
517 | 517 |
// Reprojection stuff |
518 |
if (coord_trans != null) { |
|
518 |
if (coord_trans != null && gitem != null ) {
|
|
519 | 519 |
reproj_geom = edit_feat.getDefaultGeometry(); |
520 | 520 |
reproj_geom = reproj_geom.cloneGeometry(); |
521 | 521 |
reproj_geom.reProject(coord_trans); |
... | ... | |
571 | 571 |
* @return |
572 | 572 |
*/ |
573 | 573 |
private Geometry force2D(Geometry ge, int gt) throws CreateGeometryException { |
574 |
|
|
574 |
if( ge == null ) { |
|
575 |
return null; |
|
576 |
} |
|
575 | 577 |
if (ge.getGeometryType().getSubType() == Geometry.SUBTYPES.GEOM2D) { |
576 | 578 |
return ge; |
577 | 579 |
} else { |
... | ... | |
598 | 600 |
* @return |
599 | 601 |
*/ |
600 | 602 |
private Geometry force3D(Geometry ge, int gt) throws CreateGeometryException { |
603 |
if( ge == null ) { |
|
604 |
return null; |
|
605 |
} |
|
601 | 606 |
// Los try catch que hay abajo, son para asegurarse de que la geometr?a original |
602 | 607 |
// tiene las 3 dimensiones necesarias. A veces nos llegan geometr?as que aunque son de subtipo GEOM3D |
603 | 608 |
// los puntos del generalPath que contienen no son 3D y no tienen la coordenada Z |
Also available in: Unified diff