Revision 5829
Added by ben leinfelder about 13 years ago
SpatialHarvester.java | ||
---|---|---|
34 | 34 |
import edu.ucsb.nceas.metacat.database.DBConnection; |
35 | 35 |
import edu.ucsb.nceas.metacat.util.MetacatUtil; |
36 | 36 |
|
37 |
import org.geotools.feature.Feature;
|
|
37 |
import org.opengis.feature.simple.SimpleFeature;
|
|
38 | 38 |
|
39 | 39 |
/** |
40 | 40 |
* Harvests spatial data from metacat database |
... | ... | |
167 | 167 |
// SpatialDataset.insertOrUpdate takes care of the difference |
168 | 168 |
SpatialDocument sdoc = new SpatialDocument( docid, dbconn ); |
169 | 169 |
|
170 |
Feature polygonFeature = sdoc.getPolygonFeature(); |
|
170 |
SimpleFeature polygonFeature = sdoc.getPolygonFeature();
|
|
171 | 171 |
sds.insertOrUpdate("polygon", polygonFeature, docid ); |
172 | 172 |
|
173 |
Feature pointFeature = sdoc.getPointFeature(); |
|
173 |
SimpleFeature pointFeature = sdoc.getPointFeature();
|
|
174 | 174 |
sds.insertOrUpdate("point", pointFeature, docid ); |
175 | 175 |
long after = System.currentTimeMillis(); |
176 | 176 |
log.info(" ------- Spatial Harvester - spatial cache updated for : " + docid + ".... Time " + (after - before) + "ms"); |
... | ... | |
196 | 196 |
|
197 | 197 |
// Get the polygon representation of SpatialDocument |
198 | 198 |
// and add it to the spatial dataset |
199 |
Feature polygonFeature = sdoc.getPolygonFeature();
|
|
199 |
SimpleFeature polygonFeature = sdoc.getPolygonFeature();
|
|
200 | 200 |
sds.add("polygon", polygonFeature ); |
201 | 201 |
|
202 | 202 |
// Get the point representation of SpatialDocument |
203 | 203 |
// and add it to the spatial dataset |
204 |
Feature pointFeature = sdoc.getPointFeature(); |
|
204 |
SimpleFeature pointFeature = sdoc.getPointFeature();
|
|
205 | 205 |
sds.add("point", pointFeature ); |
206 | 206 |
|
207 | 207 |
log.info(" ****** Spatial harvest of docid " + docids.elementAt(i) ); |
Also available in: Unified diff
geoserver upgrade:
-remove embedded geoserver
-include geotools api and update spatial harvesting
-include simple template for using maps in skin (openlayers now, not mapbuilder)