org.geotools.data.wfs.WFSDataStoreFactory.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中org.geotools.data.wfs.WFSDataStoreFactory.<init>()方法的一些代码示例,展示了WFSDataStoreFactory.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WFSDataStoreFactory.<init>()方法的具体详情如下:
包路径:org.geotools.data.wfs.WFSDataStoreFactory
类名称:WFSDataStoreFactory
方法名:<init>

WFSDataStoreFactory.<init>介绍

暂无

代码示例

代码示例来源:origin: geoserver/geoserver

/**
 * Constructs a {@link WFSDataStore} from an OWS URL.
 *
 * @param remoteOwsUrl
 * @return
 * @throws ServiceException if there was a problem accessing the remote service
 */
protected static DataStore connectRemoteWFS(URL remoteOwsUrl) {
  try {
    WFSDataStoreFactory storeFactory = new WFSDataStoreFactory();
    Map params = new HashMap(storeFactory.getImplementationHints());
    params.put(
        WFSDataStoreFactory.URL.key,
        remoteOwsUrl + "&request=GetCapabilities&service=WFS");
    params.put(WFSDataStoreFactory.TRY_GZIP.key, Boolean.TRUE);
    DataStore dataStore = storeFactory.createDataStore(params);
    return dataStore;
  } catch (Exception e) {
    throw new ServiceException("Could not connect to remote OWS", e, "RemoteOWSFailure");
  }
}

代码示例来源:origin: opentripplanner/OpenTripPlanner

/**
 * Setup the WFS data source and add the DynamicStreetNotesSource to the graph
 */
@Override
public void setup(Graph graph) throws IOException, FactoryException {
  LOG.info("Setup WFS polling updater");
  HashMap<String, Object> connectionParameters = new HashMap<>();
  connectionParameters.put(WFSDataStoreFactory.URL.key, url);
  WFSDataStore data = (new WFSDataStoreFactory()).createDataStore(connectionParameters);
  query = new Query(featureType); // Read only single feature type from the source
  query.setCoordinateSystem(CRS.decode("EPSG:4326", true)); // Get coordinates in WGS-84
  featureSource = data.getFeatureSource(featureType);
  graph.streetNotesService.addNotesSource(notesSource);
}

代码示例来源:origin: geoserver/geoserver

WFSDataStoreFactory factory = new WFSDataStoreFactory();
Map<String, Serializable> params =
    new HashMap(factory.getImplementationHints());

代码示例来源:origin: org.geoserver/gs-wms

private static DataStore connectRemoteWFS(URL remoteOwsUrl) throws ServiceException {
  try {
    WFSDataStoreFactory factory = new WFSDataStoreFactory();
    Map params = new HashMap(factory.getImplementationHints());
    params.put(
        WFSDataStoreFactory.URL.key,
        remoteOwsUrl + "&request=GetCapabilities&service=WFS");
    params.put(WFSDataStoreFactory.TRY_GZIP.key, Boolean.TRUE);
    return factory.createDataStore(params);
  } catch (Exception e) {
    throw new ServiceException("Could not connect to remote OWS", e, "RemoteOWSFailure");
  }
}

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

store = new WFSDataStoreFactory().createDataStore(params);
refreshTable();
gui_progress.setString(BUNDLE.getString("waiting"));

代码示例来源:origin: org.geoserver/wms

private static DataStore connectRemoteWFS(URL remoteOwsUrl) throws WmsException {
  try {
    WFSDataStoreFactory factory = new WFSDataStoreFactory();
    Map params = new HashMap(factory.getImplementationHints());
    params.put(WFSDataStoreFactory.URL.key, remoteOwsUrl + "request=GetCapabilities&service=WFS");
    params.put(WFSDataStoreFactory.TRY_GZIP.key, Boolean.TRUE);
    return factory.createDataStore(params);
  } catch(Exception e) {
    throw new WmsException("Could not connect to remote OWS", "RemoteOWSFailure",e);
  }
}

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

@Override
      public void run() {
        try {

          params.put(WFSDataStoreFactory.URL.key, new URL(jtf_url.getText()));
          params.put(WFSDataStoreFactory.USERNAME.key, jtf_user.getText());
          params.put(WFSDataStoreFactory.PASSWORD.key, new String(jtf_password.getPassword()));
          params.put(WFSDataStoreFactory.BUFFER_SIZE.key, jsp_buff_size.getValue());
          params.put(WFSDataStoreFactory.ENCODING.key, jtf_encoding.getText());
          params.put(WFSDataStoreFactory.LENIENT.key, chk_lenient.isSelected());
          params.put(WFSDataStoreFactory.MAXFEATURES.key, jsp_max_features.getValue());
          params.put(WFSDataStoreFactory.PROTOCOL.key, chk_protocol.isSelected());
          params.put(WFSDataStoreFactory.TIMEOUT.key, jsp_timeout.getValue());
          params.put(WFSDataStoreFactory.TRY_GZIP.key, chk_gzip.isSelected());

//                    store = DataStoreFinder.getDataStore(params);
          store = new WFSDataStoreFactory().createDataStore(params);
          refreshTable();
          gui_progress.setString(BUNDLE.getString("waiting"));
        } catch (Exception ex) {
          store = null;
          gui_progress.setString(BUNDLE.getString("error"));
        }
      }
    };

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

RandomStyleFactory rsf = new RandomStyleFactory();
WFSDataStoreFactory factory = new WFSDataStoreFactory();
try {
  store = factory.createDataStore(params);

相关文章