本文簡要介紹 python 語言中 arcgis.realtime.velocity.feeds.HttpSimulator
的用法。
用法:
class arcgis.realtime.velocity.feeds.HttpSimulator(label, description, url, field_separator=',', features_per_execution=1, interval_for_sending_events=1000, repeat_simulation=True, time_field_index=0, convert_to_current_time=True, data_format=None, track_id_field=None, geometry=None, time=None)
可選參數:
- data_format:
[
DelimitedFormat
]。包含此 feed 的數據格式配置的實例。僅配置允許的格式。如果在初始化期間未正確設置,則會自動檢測格式並根據傳入數據的樣本進行設置。該示例將從 init 中迄今為止提供的配置中獲取。 - track_id_field: String 。應設置為軌道 ID 的傳入數據的字段名稱。
- geometry:
[
XYZGeometry
,SingleFieldGeometry
]。幾何配置的實例,將用於從傳入數據創建幾何對象。 - time:
[
TimeInstant
,TimeInterval
]。時間配置實例,將用於根據傳入數據創建時間信息。
返回:
具有 Http 模擬器提要配置的數據類。
模擬文本文件中的事件。該數據類可用於定義提要配置並創建提要。
Parameter
Description
label
String 。此 Feed 實例的唯一標簽。
description
String 。飼料說明。
url
String 。可從外部訪問的模擬文件的完整 URL。
field_separator
String 。用於分隔模擬文件中的字段值的字符或分隔符。默認值為: ,.
features_per_execution
國際。一次模擬的記錄(特征)數量。默認值為:1。
interval_for_sending_events
國際。每次執行發送特征數量之間的時間間隔。默認值為:1000。
repeat_simulation
布爾值。到達文件末尾時是否自動從頭開始。默認值為:True。
time_field_index
國際。數據集中日期字段的數字索引,索引從0開始。默認為:0。
convert_to_current_time
布爾值。模擬數據時是否將數據集中的時間值轉換為當前時間。默認值為:True。
例子:
# Usage Example from arcgis.realtime.velocity.feeds import HttpSimulator from arcgis.realtime.velocity.input.format import DelimitedFormat from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant http_simulator = HttpSimulator( label="feed_name", description="feed_description", url="http_simulator_url", data_format=None ) # use velocity object to get the FeedsManager instance feeds = velocity.feeds # use the FeedsManager object to create a feed from this feed configuration http_simulator_feed = feeds.create(http_simulator) http_simulator_feed.start() feeds.items
- data_format:
[
相關用法
- Python ArcGIS HttpReceiver用法及代碼示例
- Python ArcGIS HttpPoller用法及代碼示例
- Python ArcGIS power用法及代碼示例
- Python ArcGIS APIKeyManager.get用法及代碼示例
- Python ArcGIS KnowledgeGraph.named_object_type_delete用法及代碼示例
- Python ArcGIS ContentManager.unshare_items用法及代碼示例
- Python ArcGIS ImageryLayer.thumbnail用法及代碼示例
- Python ArcGIS FormFieldElement用法及代碼示例
- Python ArcGIS Geometry.true_centroid用法及代碼示例
- Python ArcGIS Site.delete用法及代碼示例
- Python ArcGIS GeoAccessor.bbox用法及代碼示例
- Python arcgis.apps.hub.Initiative.update用法及代碼示例
- Python ArcGIS generate_service_areas用法及代碼示例
- Python ArcGIS build_overview用法及代碼示例
- Python ArcGIS RunInterval用法及代碼示例
- Python ArcGIS describe_dataset用法及代碼示例
- Python ArcGIS acos用法及代碼示例
- Python ArcGIS Item.publish用法及代碼示例
- Python ArcGIS MapImageLayer.find用法及代碼示例
- Python ArcGIS Group.get_members用法及代碼示例
- Python ArcGIS Geometry.last_point用法及代碼示例
- Python ArcGIS Worker用法及代碼示例
- Python ArcGIS ContentManager.delete_folder用法及代碼示例
- Python ArcGIS train_classifier用法及代碼示例
- Python ArcGIS APIKeyManager.create用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 arcgis.realtime.velocity.feeds.HttpSimulator。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。