- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我需要一些帮助从这个 GML 编码的 WMS 响应 XML 文件中获取天气详细信息温度等。这是我从天气服务中获得的,该服务通过 Web 目录服务 (CSW)、Web map 服务 (WMS) 和 Web 要素服务 (WFS) 提供开放数据。与 JSON/XML 不同,我不知道这个文件中发生了什么。请为 Swift 3 提出一些解决方案。
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection
timeStamp="2017-07-31T15:48:01Z"
numberMatched="1"
numberReturned="1"
xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:om="http://www.opengis.net/om/2.0"
xmlns:omso="http://inspire.ec.europa.eu/schemas/omso/3.0"
xmlns:ompr="http://inspire.ec.europa.eu/schemas/ompr/3.0"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:swe="http://www.opengis.net/swe/2.0"
xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0"
xmlns:sam="http://www.opengis.net/sampling/2.0"
xmlns:sams="http://www.opengis.net/samplingSpatial/2.0"
xmlns:target="http://xml.fmi.fi/namespace/om/atmosphericfeatures/1.0"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd
http://www.opengis.net/gmlcov/1.0 http://schemas.opengis.net/gmlcov/1.0/gmlcovAll.xsd
http://www.opengis.net/sampling/2.0 http://schemas.opengis.net/sampling/2.0/samplingFeature.xsd
http://www.opengis.net/samplingSpatial/2.0 http://schemas.opengis.net/samplingSpatial/2.0/spatialSamplingFeature.xsd
http://www.opengis.net/swe/2.0 http://schemas.opengis.net/sweCommon/2.0/swe.xsd
http://inspire.ec.europa.eu/schemas/omso/3.0 http://inspire.ec.europa.eu/schemas/omso/3.0/SpecialisedObservations.xsd
http://inspire.ec.europa.eu/schemas/ompr/3.0 http://inspire.ec.europa.eu/schemas/ompr/3.0/Processes.xsd
http://xml.fmi.fi/namespace/om/atmosphericfeatures/1.0 http://xml.fmi.fi/schema/om/atmosphericfeatures/1.0/atmosphericfeatures.xsd">
<wfs:member>
<omso:GridSeriesObservation gml:id="WFS-l9pen.SrlipXUb8ZfAc8nS2h_8.JTowuYWbbpdOs2_llx4efR060aeWzDtdOufXlmw48rp1w36d3R0629dnTTw36d3THv7ZeWHPlhaWLLn07qmnbltQ_wp37hjvCY2PlzrUi0Kcd06aMmrhnZd2Spp25bUP8KhE4V2nBm07sk7Lh5ZefSth2ackhmZ8u_Tk51mNmbRy2ZujXl899_LJf39svLvy09MOLZliaWzL2y7KnnhlqZmzfjw7MtambTfjSV3XpmcNbbh8RNPPph3Y8tK1dCA1tunnz07s9TL46VjTsM5lbd.TLsrM0aeWzDtZXDDyw7a1I.XfwkZdOfR0rWqZdvDLyw9OvLLWhQ5ZefPryy1oSOu3Tk09PNbVfTuyRNPLLj6ad.6tavp3ZKfDLlyTadZ1fTuyVZtOs6vp3ZK02nWtNw.NO3rtr6d2StCvp3ZI_Xn0rQiZe9Dfp3dK3qm_ph2Q9m_rkh7.2XlW5Xy4emjLyp.duLfsZ1tTN_eHs39ckPf2y8q4JuXJp67Yezf1yQ9_bLyrckac.iHs39ckPf2y8q3qHLLj08NPTD0079zHRXNQ5Zcenhp6Yemnfug7d_Xd0r2pYcmnD00790fZvxYdkHHj67euzD00791d1LDk04emnfumV4OPH129dmHpp37qwwqWHJpw9NO_dOy9KfXlmw48syvBx4.u3rsw9NO_dWGFSw5NOHpp37p2XpT68s2HHlp14OPH129dmHpp37q.KWHJpw9NO_dE05s3Xnlg48fXb12YemnfubnPpv5ZcnHrl5eb.nJXmFm26XTrNv5ZceHn0dOtGnlsw7XTrn15ZsOPK6dcN.nd0dOtvXZ008N.nd0x7.2Xlhz5Wh007ctPpl4T8hNDpp25bW_dlrGq1IYA-">
<om:phenomenonTime>
<gml:TimePeriod gml:id="time-interval-1-1">
<gml:beginPosition>2017-07-31T16:00:00Z</gml:beginPosition>
<gml:endPosition>2017-08-02T03:00:00Z</gml:endPosition>
</gml:TimePeriod>
</om:phenomenonTime>
<om:resultTime>
<gml:TimeInstant gml:id="time-1-1">
<gml:timePosition>2017-07-31T12:00:00Z</gml:timePosition>
</gml:TimeInstant>
</om:resultTime>
<om:procedure xlink:href="http://xml.fmi.fi/inspire/process/hirlam"/>
<om:parameter>
<om:NamedValue>
<om:name xlink:href="http://xml.fmi.fi/inspire/process/hirlam"/>
<om:value>
<gml:TimeInstant gml:id="analysis-time-1-1">
<gml:timePosition>2017-07-31T12:00:00Z</gml:timePosition>
</gml:TimeInstant>
</om:value>
</om:NamedValue>
</om:parameter>
<om:observedProperty xlink:href="http://data.fmi.fi/fmi-apikey/e35dc8fd-a855-4db5-a327-418120f64a86/meta?observableProperty=forecast&param=GeopHeight,Temperature,Pressure,Humidity,WindDirection,WindSpeedMS,WindUMS,WindVMS,MaximumWind,WindGust,DewPoint,TotalCloudCover,WeatherSymbol3,LowCloudCover,MediumCloudCover,HighCloudCover,Precipitation1h,PrecipitationAmount,RadiationGlobalAccumulation,RadiationLWAccumulation,RadiationNetSurfaceLWAccumulation,RadiationNetSurfaceSWAccumulation,RadiationDiffuseAccumulation&language=eng"/>
<om:featureOfInterest>
<sams:SF_SpatialSamplingFeature gml:id="enn-s-1-1-">
<sam:sampledFeature>
<target:LocationCollection gml:id="sampled-target-1-1">
<target:member>
<target:Location gml:id="forloc-geoid-634963-pos">
<gml:identifier codeSpace="http://xml.fmi.fi/namespace/stationcode/geoid">634963</gml:identifier>
<gml:name codeSpace="http://xml.fmi.fi/namespace/locationcode/name">Tampere</gml:name>
<gml:name codeSpace="http://xml.fmi.fi/namespace/locationcode/geoid">634963</gml:name>
<target:representativePoint xlink:href="#point-634963"/>
<target:country codeSpace="http://xml.fmi.fi/namespace/location/country">Finland</target:country>
<target:timezone>Europe/Helsinki</target:timezone>
<target:region codeSpace="http://xml.fmi.fi/namespace/location/region">Finland</target:region>
</target:Location></target:member>
</target:LocationCollection>
</sam:sampledFeature>
<sams:shape>
<gml:MultiPoint gml:id="sf-1-1-">
<gml:pointMembers>
<gml:Point gml:id="point-634963" srsName="http://www.opengis.net/def/crs/EPSG/0/4258" srsDimension="2">
<gml:name>Tampere</gml:name>
<gml:pos>61.49911 23.78712 </gml:pos>
</gml:Point>
</gml:pointMembers>
</gml:MultiPoint>
</sams:shape>
</sams:SF_SpatialSamplingFeature>
</om:featureOfInterest>
<om:result>
<gmlcov:MultiPointCoverage gml:id="mpcv-1-1">
<gml:domainSet>
<gmlcov:SimpleMultiPoint gml:id="mp-1-1" srsName="http://xml.fmi.fi/gml/crs/compoundCRS.php?crs=4258&time=unixtime" srsDimension="3">
<gmlcov:positions>
61.49911 23.78712 1501516800
61.49911 23.78712 1501520400
61.49911 23.78712 1501524000
61.49911 23.78712 1501527600
61.49911 23.78712 1501531200
</gmlcov:positions>
</gmlcov:SimpleMultiPoint>
</gml:domainSet>
<gml:rangeSet>
<gml:DataBlock>
<gml:rangeParameters/>
<gml:doubleOrNilReasonTupleList>
113.01 18.26 1007.03 92.74 259.0 3.79
113.01 17.79 1007.48 90.02 250.0 3.04
113.01 17.13 1007.82 93.62 229.0 2.19
113.01 16.42 1008.18 95.53 216.0 2.26
113.01 15.9 1008.89 97.09 211.0 2.74
</gml:doubleOrNilReasonTupleList>
</gml:DataBlock>
</gml:rangeSet>
<gml:coverageFunction>
<gml:CoverageMappingRule>
<gml:ruleDefinition>Linear</gml:ruleDefinition>
</gml:CoverageMappingRule>
</gml:coverageFunction>
<gmlcov:rangeType>
<swe:DataRecord>
<swe:field name="GeopHeight" xlink:href="http://"/>
<swe:field name="Temperature" xlink:href="http://"/>
<swe:field name="Pressure" xlink:href="http://"/>
<swe:field name="Humidity" xlink:href="http://"/>
<swe:field name="WindDirection" xlink:href="http://"/>
<swe:field name="WindSpeedMS" xlink:href="http://"/>
</swe:DataRecord>
</gmlcov:rangeType>
</gmlcov:MultiPointCoverage>
</om:result>
</omso:GridSeriesObservation>
</wfs:member>
</wfs:FeatureCollection>
最佳答案
我无法快速帮助您,但我可以告诉您如何阅读此文件:
您基本上需要的是这三个要素:
<gmlcov:positions>
61.49911 23.78712 1501516800
61.49911 23.78712 1501520400
61.49911 23.78712 1501524000
61.49911 23.78712 1501527600
61.49911 23.78712 1501531200
</gmlcov:positions>
<gml:doubleOrNilReasonTupleList>
113.01 18.26 1007.03 92.74 259.0 3.79
113.01 17.79 1007.48 90.02 250.0 3.04
113.01 17.13 1007.82 93.62 229.0 2.19
113.01 16.42 1008.18 95.53 216.0 2.26
113.01 15.9 1008.89 97.09 211.0 2.74
</gml:doubleOrNilReasonTupleList>
<swe:DataRecord>
<swe:field name="GeopHeight" xlink:href="http://"/>
<swe:field name="Temperature" xlink:href="http://"/>
<swe:field name="Pressure" xlink:href="http://"/>
<swe:field name="Humidity" xlink:href="http://"/>
<swe:field name="WindDirection" xlink:href="http://"/>
<swe:field name="WindSpeedMS" xlink:href="http://"/>
</swe:DataRecord>
第一个告诉你测量的位置和时间:
61.49911 23.78712 1501516800
Latitude: 61.49911
Longitude: 23.7812
Unixtime: 1501516800 --> which translates to: Mon Jul 31 16:00:00 2017 UTC
第二个是实测数据,第三个给你测量的意义。
这就是您第一次测量得到的结果:
GeopHeight | Temperature | Pressure | Humidity | WindDirection | WindSpeedMs
113.01 | 18.26 | 1007.03 | 92.74 | 259.0 | 3.79
希望对您有所帮助。
关于xml - 解析 GML 编码的 WFS 响应 XML 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45527031/
我一直在使用 AJAX 从我正在创建的网络服务中解析 JSON 数组时遇到问题。我的前端是一个简单的 ajax 和 jquery 组合,用于显示从我正在创建的网络服务返回的结果。 尽管知道我的数据库查
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
我在尝试运行 Android 应用程序时遇到问题并收到以下错误 java.lang.NoClassDefFoundError: com.parse.Parse 当我尝试运行该应用时。 最佳答案 在这
有什么办法可以防止etree在解析HTML内容时解析HTML实体吗? html = etree.HTML('&') html.find('.//body').text 这给了我 '&' 但我想
我有一个有点疯狂的例子,但对于那些 JavaScript 函数作用域专家来说,它看起来是一个很好的练习: (function (global) { // our module number one
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 8 年前。 Improve th
我需要编写一个脚本来获取链接并解析链接页面的 HTML 以提取标题和其他一些数据,例如可能是简短的描述,就像您链接到 Facebook 上的内容一样。 当用户向站点添加链接时将调用它,因此在客户端启动
在 VS Code 中本地开发时,包解析为 C:/Users//AppData/Local/Microsoft/TypeScript/3.5/node_modules/@types//index而不是
我在将 json 从 php 解析为 javascript 时遇到问题 这是我的示例代码: //function MethodAjax = function (wsFile, param) {
我在将 json 从 php 解析为 javascript 时遇到问题 这是我的示例代码: //function MethodAjax = function (wsFile, param) {
我被赋予了将一种语言“翻译”成另一种语言的工作。对于使用正则表达式的简单逐行方法来说,源代码过于灵活(复杂)。我在哪里可以了解更多关于词法分析和解析器的信息? 最佳答案 如果你想对这个主题产生“情绪化
您好,我在解析此文本时遇到问题 { { { {[system1];1;1;0.612509325}; {[system2];1;
我正在为 adobe after effects 在 extendscript 中编写一些代码,最终变成了 javascript。 我有一个数组,我想只搜索单词“assemble”并返回整个 jc3_
我有这段代码: $(document).ready(function() { // }); 问题:FB_RequireFeatures block 外部的代码先于其内部的代码执行。因此 who
背景: netcore项目中有些服务是在通过中间件来通信的,比如orleans组件。它里面服务和客户端会指定网关和端口,我们只需要开放客户端给外界,服务端关闭端口。相当于去掉host,这样省掉了些
1.首先贴上我试验成功的代码 复制代码 代码如下: protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
什么是 XML? XML 指可扩展标记语言(eXtensible Markup Language),标准通用标记语言的子集,是一种用于标记电子文件使其具有结构性的标记语言。 你可以通过本站学习 X
【PHP代码】 复制代码 代码如下: $stmt = mssql_init('P__Global_Test', $conn) or die("initialize sto
在SQL查询分析器执行以下代码就可以了。 复制代码代码如下: declare @t varchar(255),@c varchar(255) declare table_cursor curs
前言 最近练习了一些前端算法题,现在做个总结,以下题目都是个人写法,并不是标准答案,如有错误欢迎指出,有对某道题有新的想法的友友也可以在评论区发表想法,互相学习🤭 题目 题目一: 二维数组中的
我是一名优秀的程序员,十分优秀!