Spatio-temporal objects are created after an index table is created. You can then call the writer to insert data to HBase Ganos.

Insert a single SimpleFeature

HBase Ganos uses the SimpleFeatureWriter in the GeoTools API to insert a single SimpleFeature. The SimpleFeatureWriter supports inserting transactions. You can use the getFeatureWriterAppend method of DataStore to get a FeatureWriter.

SimpleFeatureType sft = .... ;
SimpleFeatureWriter writer=(SimpleFeatureWriter)ds.getFeatureWriterAppend(sft.getTypeName(), Transaction.AUTO_COMMIT);

Insert multiple SimpleFeatures

HBase Ganos allows you to insert multiple SimpleFeatures at a time by using the SimpleFeatureStore class in the GeoTools API.

List<SimpleFeature> features=...
SimpleFeatureStore featureStore = (SimpleFeatureStore) ds.getFeatureSource(sft.getTypeName());
List<FeatureId> featureIds = featureStore.addFeatures(new ListFeatureCollection(sft,features));

For more information, see the sample code in the Quick start topic.