本文整理汇总了Java中net.opengis.gml.v32.impl.GMLFactory类的典型用法代码示例。如果您正苦于以下问题:Java GMLFactory类的具体用法?Java GMLFactory怎么用?Java GMLFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GMLFactory类属于net.opengis.gml.v32.impl包,在下文中一共展示了GMLFactory类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: start
import net.opengis.gml.v32.impl.GMLFactory; //导入依赖的package包/类
@Override
public void start() throws SensorHubException
{
SMLHelper smlFac = new SMLHelper();
GMLFactory gmlFac = new GMLFactory(true);
// generate station FOIs and full descriptions
for (String stationID: config.stationIDs)
{
// TODO fetch station info (name, location, etc.)
String uid = STATION_UID_PREFIX + stationID;
String name = "K***";
String description = "METAR weather station #" + stationID;
// generate small SensorML for FOI (in this case the system is the FOI)
PhysicalSystem foi = smlFac.newPhysicalSystem();
foi.setId(stationID);
foi.setUniqueIdentifier(uid);
foi.setName(name);
foi.setDescription(description);
Point stationLoc = gmlFac.newPoint();
double coord = Double.parseDouble(stationID) / 100.0;
stationLoc.setPos(new double[] {coord, coord/2.0, 0.0});
foi.setLocation(stationLoc);
stationFois.put(uid, foi);
foiIDs.add(uid);
// TODO generate full SensorML for sensor description
PhysicalSystem sensorDesc = smlFac.newPhysicalSystem();
sensorDesc.setId("STATION_" + stationID);
sensorDesc.setUniqueIdentifier(uid);
sensorDesc.setName(name);
sensorDesc.setDescription(description);
stationDesc.put(uid, sensorDesc);
}
metarInterface.start();
}
示例2: generateFoi
import net.opengis.gml.v32.impl.GMLFactory; //导入依赖的package包/类
protected void generateFoi()
{
// create FoI
GMLFactory gml = new GMLFactory();
foi = new SamplingPoint();
foi.setUniqueIdentifier(UID_PREFIX + config.serialNumber + ":foi");
foi.setName("Weather Station Location");
Point p = gml.newPoint();
p.setSrsName(SWEHelper.REF_FRAME_4979);
p.setPos(new double[] {config.stationLat, config.stationLon, config.stationAlt});
foi.setShape(p);
}
示例3: SMLStaxBindings
import net.opengis.gml.v32.impl.GMLFactory; //导入依赖的package包/类
public SMLStaxBindings()
{
super(new SMLFactory(), new SWEFactory(), new GMLFactory(), new GMDFactory(), new GCOFactory());
nsContext.registerNamespace("xlink", net.opengis.swe.v20.bind.XMLStreamBindings.XLINK_NS_URI);
nsContext.registerNamespace("sml", net.opengis.sensorml.v20.bind.XMLStreamBindings.NS_URI);
nsContext.registerNamespace("swe", net.opengis.swe.v20.bind.XMLStreamBindings.NS_URI);
nsContext.registerNamespace("gml", net.opengis.gml.v32.bind.XMLStreamBindings.NS_URI);
nsContext.registerNamespace("gco", org.isotc211.v2005.gco.bind.XMLStreamBindings.NS_URI);
nsContext.registerNamespace("gmd", org.isotc211.v2005.gmd.bind.XMLStreamBindings.NS_URI);
}
示例4: GMLStaxBindings
import net.opengis.gml.v32.impl.GMLFactory; //导入依赖的package包/类
public GMLStaxBindings(boolean useJTS)
{
this(new GMLFactory(useJTS));
}
示例5: getFactory
import net.opengis.gml.v32.impl.GMLFactory; //导入依赖的package包/类
public GMLFactory getFactory()
{
return (GMLFactory)factory;
}
示例6: getGmlFactory
import net.opengis.gml.v32.impl.GMLFactory; //导入依赖的package包/类
public GMLFactory getGmlFactory()
{
return gmlFactory;
}
示例7: bboxToEnvelope
import net.opengis.gml.v32.impl.GMLFactory; //导入依赖的package包/类
/**
* Utility method to convert a {@link Bbox} object to a GML {@link Envelope}
* @param bbox Bbox object
* @param gmlFac FActory used to create GML objects
* @return GML envelope
*/
public static Envelope bboxToEnvelope(Bbox bbox, GMLFactory gmlFac)
{
return gmlFac.newEnvelope(bbox.getCrs(), bbox.getMinX(), bbox.getMinY(), bbox.getMaxX(), bbox.getMaxY());
}