Revision 23088
branches/v2_0_0_prep/libraries/libFMap_dataFile/src/org/gvsig/fmap/data/feature/file/shp/ShpFeature.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
ShpFeature(FeatureType featureType, SHPStore store,long featureIndex) throws ReadException { |
27 | 27 |
super(featureType,store,featureIndex); |
28 |
// load();
|
|
28 |
load(); |
|
29 | 29 |
// this.store=store; |
30 | 30 |
// this.featureIndex=featureIndex; |
31 | 31 |
|
... | ... | |
37 | 37 |
/* (non-Javadoc) |
38 | 38 |
* @see org.gvsig.fmap.data.feature.file.dbf.DBFFeature#load() |
39 | 39 |
*/ |
40 |
protected void load() throws ReadException { |
|
41 |
// TODO Auto-generated method stub |
|
42 |
super.load(); |
|
40 |
private void load() throws ReadException { |
|
43 | 41 |
this.extent= ((SHPStore)store).getBoundingBox(featureIndex); |
44 | 42 |
} |
45 | 43 |
|
branches/v2_0_0_prep/libraries/libFMap_dataFile/src/org/gvsig/fmap/data/feature/file/shp/SHPStore.java | ||
---|---|---|
104 | 104 |
} |
105 | 105 |
|
106 | 106 |
/** |
107 |
*
|
|
107 |
* |
|
108 | 108 |
* NOT supported in Alter Mode |
109 |
*
|
|
109 |
* |
|
110 | 110 |
* @param index |
111 | 111 |
* @param featureType |
112 | 112 |
* @return |
... | ... | |
193 | 193 |
metadata.set("srs",srs); |
194 | 194 |
} |
195 | 195 |
if (this.alterMode){ |
196 |
Envelope extent=(Envelope)metadata.get("extent");
|
|
196 |
Envelope extent=null;
|
|
197 | 197 |
FeatureCollection featureCollection=(FeatureCollection)getDataCollection(); |
198 | 198 |
if (spatialManager.isFullExtentDirty()){ |
199 | 199 |
if (!featureCollection.isEmpty()){ |
200 | 200 |
Iterator featureIterator=featureCollection.iterator(); |
201 |
extent = ((Feature)featureIterator.next()).getExtent(); |
|
201 |
|
|
202 | 202 |
while(featureIterator.hasNext()){ |
203 |
Feature feature=(Feature)featureIterator.next(); |
|
204 |
Envelope boundExtent=feature.getExtent(); |
|
205 |
if (boundExtent!=null) { |
|
206 |
extent.add(boundExtent); |
|
203 |
if (extent==null){ |
|
204 |
extent = ((Feature)featureIterator.next()).getExtent(); |
|
205 |
}else{ |
|
206 |
Feature feature=(Feature)featureIterator.next(); |
|
207 |
Envelope boundExtent=feature.getExtent(); |
|
208 |
if (boundExtent!=null) { |
|
209 |
extent.add(boundExtent); |
|
210 |
} |
|
207 | 211 |
} |
208 | 212 |
} |
209 | 213 |
} |
214 |
metadata.set("extent",extent); |
|
210 | 215 |
} |
211 |
metadata.set("extent",extent); |
|
216 |
|
|
212 | 217 |
} |
213 | 218 |
return metadata; |
214 | 219 |
} |
branches/v2_0_0_prep/libraries/libFMap_dataFile/src/org/gvsig/fmap/data/feature/file/dbf/DBFFeature.java | ||
---|---|---|
44 | 44 |
|
45 | 45 |
} |
46 | 46 |
|
47 |
protected void load() throws ReadException{
|
|
47 |
private void load() throws ReadException{
|
|
48 | 48 |
Iterator iterator=featureType.iterator(); |
49 | 49 |
this.loading(); |
50 | 50 |
while (iterator.hasNext()) { |
Also available in: Unified diff