当前位置: 首页>>代码示例>>Java>>正文


Java GMLFactory类代码示例

本文整理汇总了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();        
}
 
开发者ID:sensiasoft,项目名称:sensorhub,代码行数:40,代码来源:MetarSensor.java

示例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);
}
 
开发者ID:sensiasoft,项目名称:sensorhub,代码行数:13,代码来源:FakeWeatherSensor.java

示例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);
}
 
开发者ID:sensiasoft,项目名称:lib-sensorml,代码行数:12,代码来源:SMLStaxBindings.java

示例4: GMLStaxBindings

import net.opengis.gml.v32.impl.GMLFactory; //导入依赖的package包/类
public GMLStaxBindings(boolean useJTS)
{
    this(new GMLFactory(useJTS));
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:5,代码来源:GMLStaxBindings.java

示例5: getFactory

import net.opengis.gml.v32.impl.GMLFactory; //导入依赖的package包/类
public GMLFactory getFactory()
{
    return (GMLFactory)factory;
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:5,代码来源:GMLStaxBindings.java

示例6: getGmlFactory

import net.opengis.gml.v32.impl.GMLFactory; //导入依赖的package包/类
public GMLFactory getGmlFactory()
{
    return gmlFactory;
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:5,代码来源:GMLUtils.java

示例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());
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:11,代码来源:GMLUtils.java


注:本文中的net.opengis.gml.v32.impl.GMLFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。