當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。