Revision 22037 branches/Mobile_Compatible_Hito_1/libFMap_mobile_shp_driver/src-file/org/gvsig/data/datastores/vectorial/file/shp_util/NewSHPFeature.java
NewSHPFeature.java | ||
---|---|---|
1 | 1 |
package org.gvsig.data.datastores.vectorial.file.shp_util; |
2 | 2 |
|
3 |
import java.awt.geom.Rectangle2D; |
|
3 | 4 |
import java.util.List; |
4 | 5 |
import java.util.Locale; |
5 | 6 |
|
... | ... | |
16 | 17 |
import org.gvsig.fmap.geom.Geometry; |
17 | 18 |
import org.gvsig.fmap.geom.primitive.Envelope; |
18 | 19 |
|
20 |
/** |
|
21 |
* A subclass of AbstractFeature that allows instantiation with data stores other than SHPStore. |
|
22 |
* |
|
23 |
* @see org.gvsig.data.datastores.vectorial.file.shp.ShpFeature |
|
24 |
* |
|
25 |
* @author jldominguez |
|
26 |
* |
|
27 |
*/ |
|
19 | 28 |
public class NewSHPFeature extends AbstractFeature { |
20 | 29 |
|
21 | 30 |
private static Logger logger = Logger.getLogger(NewSHPFeature.class); |
... | ... | |
24 | 33 |
|
25 | 34 |
private int featureIndex = 0; |
26 | 35 |
private IGeometricDataStore store; |
36 |
|
|
37 |
private Envelope extent = null; |
|
27 | 38 |
|
39 |
/** |
|
40 |
* |
|
41 |
* @param ftype feature type |
|
42 |
* @param feat_ind feature index |
|
43 |
* @param _store the data store to be used |
|
44 |
* @throws ReadException |
|
45 |
*/ |
|
28 | 46 |
public NewSHPFeature( |
29 | 47 |
FeatureType ftype, |
30 | 48 |
int feat_ind, |
... | ... | |
41 | 59 |
|
42 | 60 |
public Envelope getExtent() { |
43 | 61 |
// TODO Auto-generated method stub |
44 |
return null;
|
|
62 |
return extent;
|
|
45 | 63 |
} |
46 | 64 |
|
47 | 65 |
public List getAllSRS() { |
... | ... | |
100 | 118 |
|
101 | 119 |
set(i, value); |
102 | 120 |
} catch (Exception ex) { |
103 |
|
|
104 |
logger.error("While loading feature: " + ex.getMessage()); }
|
|
121 |
logger.error("While loading feature: " + ex.getMessage()); |
|
122 |
} |
|
105 | 123 |
} |
106 | 124 |
|
125 |
Rectangle2D bb = geometry.getBounds2D(); |
|
126 |
extent = Utils.rectToEnvelope(bb); |
|
127 |
|
|
107 | 128 |
stopLoading(); |
108 | 129 |
} |
109 | 130 |
|
... | ... | |
125 | 146 |
} |
126 | 147 |
} |
127 | 148 |
|
149 |
Rectangle2D bb = geometry.getBounds2D(); |
|
150 |
extent = Utils.rectToEnvelope(bb); |
|
151 |
|
|
128 | 152 |
stopLoading(); |
129 | 153 |
|
130 | 154 |
} |
Also available in: Unified diff