Revision 36418

View differences:

branches/dal_time_support/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/layers/vectorial/FLyrVect.java
142 142

  
143 143
    private boolean isLabeled;
144 144
    protected ILabelingStrategy strategy;
145
//	private ReprojectDefaultGeometry reprojectTransform;
145 146

  
146 147
    public FLyrVect() {
147 148
        super();
......
158 159
        }
159 160
        return featureStore;
160 161
    }
162
    
163
//    public void setCoordTrans(ICoordTrans ct) {
164
//    	super.setCoordTrans(ct);
165
//    	if (ct != null){
166
//    		if (this.reprojectTransform == null){
167
//    			this.reprojectTransform = new ReprojectDefaultGeometry(ct);
168
//    		} else {
169
//    			this.reprojectTransform.setCoordTrans(ct);
170
//    		}
171
//    		try {
172
//    			this.getFeatureStore().getTransforms().add(this.reprojectTransform);
173
//    		} catch (DataException e) {
174
//    			throw new RuntimeException(e);
175
//    		}
176
//    	}
177
//    }
161 178

  
162 179
    /**
163 180
     * If we use a persistent spatial index associated with this layer, and the
......
312 329

  
313 330
        // Esto es para cuando se crea una capa nueva con el fullExtent de ancho
314 331
        // y alto 0.
315
        if (rAux == null || rAux.getMaximum(0) - rAux.getMinimum(0) == 0
332
        if (rAux == null || rAux.isEmpty() || rAux.getMaximum(0) - rAux.getMinimum(0) == 0
316 333
            && rAux.getMaximum(1) - rAux.getMinimum(1) == 0) {
317 334
            try {
318 335
                rAux =
319
                    geomManager.createEnvelope(0, 0, 100, 100, SUBTYPES.GEOM2D);
336
                    geomManager.createEnvelope(0, 0, 90, 90, SUBTYPES.GEOM2D);
320 337
            } catch (CreateEnvelopeException e) {
321 338
                logger.error("Error creating the envelope", e);
322 339
                e.printStackTrace();
branches/dal_time_support/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/layers/vectorial/ReprojectDefaultGeometry.java
64 64
	private FeatureType orgDefFeatureType;
65 65
	private List orgFeatureTypes;
66 66

  
67
	public ReprojectDefaultGeometry() {
67
	public ReprojectDefaultGeometry(){
68 68
		
69 69
	}
70 70
	
71
//	public ReprojectDefaultGeometry(IProjection targetSRS){
72
//		super("ReprojectDefaultGeometry", "ReprojectDefaultGeometry");
73
//		this.targetSRS = targetSRS;
74
//		this.ct = null;
75
//	}
76
//	
77
//	public ReprojectDefaultGeometry(ICoordTrans ct){
78
//		super("ReprojectDefaultGeometry", "ReprojectDefaultGeometry");
79
//		this.ct = ct;
80
//	}
81
		
71 82
	public IProjection getTargetSRS() {
72 83
		return targetSRS;
73 84
	}
......
75 86
	public void setTargetSRS(IProjection targetSRS) {
76 87
		this.targetSRS = targetSRS;
77 88
	}
89
	
90
//	public void setCoordTrans(ICoordTrans ct){
91
//		this.ct = ct;
92
//		if ( getFeatureStore() != null ){
93
//			setFeatureStore(getFeatureStore());
94
//		}
95
//	}
78 96

  
79 97
	/* (non-Javadoc)
80 98
	 * @see org.gvsig.fmap.dal.feature.FeatureStoreTransform#applyTransform(org.gvsig.fmap.dal.feature.Feature, org.gvsig.fmap.dal.feature.EditableFeature)
......
107 125
			EditableFeatureAttributeDescriptor attr = (EditableFeatureAttributeDescriptor) defFType
108 126
					.getAttributeDescriptor(defFType
109 127
							.getDefaultGeometryAttributeName());
110
			sourceSRS = attr.getSRS();
111
			ct = sourceSRS.getCT(targetSRS);
128
//			if (ct!=null){
129
//				targetSRS = ct.getPDest();
130
//				sourceSRS = ct.getPOrig();
131
//			} else {
132
				sourceSRS = attr.getSRS();
133
				ct = sourceSRS.getCT(targetSRS);
134
//			}
112 135
			attr.setSRS(this.targetSRS);
113 136
			FeatureType defaultType = defFType.getNotEditableCopy();
114 137
			List types = new ArrayList();
branches/dal_time_support/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/layers/vectorial/impl/DefaultGraphicLayer.java
127 127

  
128 128
		try{
129 129
			if (!store.isEditing()){
130
				store.edit();
130
				store.edit(FeatureStore.MODE_APPEND);
131 131
			}
132 132
			EditableFeature feature = store.createNewFeature().getEditable();
133 133
			feature.setString(GraphicLayer.FEATURE_ATTR_GROUPID, groupId);

Also available in: Unified diff