Search in sources :

Example 1 with SamplingFeaturePropertyType

use of net.opengis.sampling.x10.SamplingFeaturePropertyType in project arctic-sea by 52North.

the class SamplingEncoderv100 method createFeatureCollection.

private XmlObject createFeatureCollection(FeatureCollection sosFeatureCollection) throws EncodingException {
    SamplingFeatureCollectionDocument xbSampFeatCollDoc = SamplingFeatureCollectionDocument.Factory.newInstance(getXmlOptions());
    SamplingFeatureCollectionType xbSampFeatColl = xbSampFeatCollDoc.addNewSamplingFeatureCollection();
    xbSampFeatColl.setId("sfc_" + Long.toString(new DateTime().getMillis()));
    for (AbstractFeature sosAbstractFeature : sosFeatureCollection.getMembers().values()) {
        SamplingFeaturePropertyType xbFeatMember = xbSampFeatColl.addNewMember();
        xbFeatMember.set(createFeature(sosAbstractFeature));
    }
    return xbSampFeatCollDoc;
}
Also used : SamplingFeatureCollectionType(net.opengis.sampling.x10.SamplingFeatureCollectionType) SamplingFeaturePropertyType(net.opengis.sampling.x10.SamplingFeaturePropertyType) SamplingFeatureCollectionDocument(net.opengis.sampling.x10.SamplingFeatureCollectionDocument) AbstractFeature(org.n52.shetland.ogc.gml.AbstractFeature) DateTime(org.joda.time.DateTime)

Aggregations

SamplingFeatureCollectionDocument (net.opengis.sampling.x10.SamplingFeatureCollectionDocument)1 SamplingFeatureCollectionType (net.opengis.sampling.x10.SamplingFeatureCollectionType)1 SamplingFeaturePropertyType (net.opengis.sampling.x10.SamplingFeaturePropertyType)1 DateTime (org.joda.time.DateTime)1 AbstractFeature (org.n52.shetland.ogc.gml.AbstractFeature)1