You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何从GRTgaz法国输气网SVG瓦片地图提取WMS/WMTS底层数据?

Extracting GRTgaz Gas Network Map Data (WMS/WMTS) from SVG Tiles

Got it, let's walk through practical ways to get at the underlying WMS/WMTS data behind GRTgaz's SVG-tiled map—since those SVG tiles are just a rendered layer, there's often a standard geospatial service hiding underneath. Here's what you can try:

  • Inspect Network Requests with Browser DevTools
    Fire up your browser's DevTools (hit F12), switch to the Network tab, then refresh the map page. Filter requests by XHR or Fetch and look for any calls that hint at OGC standard services:

    • Keep an eye out for URLs containing /wms, /wmts, or parameters like service=WMS, request=GetMap, or tilematrixset (a WMTS-specific term). Sometimes the SVG tiles are just a front-end wrapper, and the raw WMS/WMTS requests are happening in the background.
    • Check the request headers and response bodies—you might find the full WMS/WMTS endpoint tucked away there.
  • Parse SVG Tile Geometry and Coordinates
    The SVG snippet you shared includes a transform matrix and data-geometry-type attribute, which are clues to coordinate mapping:

    • Extract the path data (d attribute) from SVG elements (like pipes, stations) if they're vector-based. Use tools like Python's svgpathtools to parse these paths.
    • Use the transform matrix to convert SVG pixel coordinates to the map's underlying spatial reference system (likely something like EPSG:2154 for France). Libraries like pyproj can handle the projection conversion to get real-world geographic coordinates.
  • Check for Official Open Data or API Access
    GRTgaz, as a major gas infrastructure operator, might offer official open data channels you haven't found yet:

    • Look for a "Données ouvertes" (Open Data) section on their website—they may publish the gas network data as GeoJSON, Shapefile, or even expose a public WMS/WMTS service directly.
    • Reach out to their technical support or data team. Many public-facing utilities are willing to provide access to standard geospatial services for legitimate use cases.
  • Reverse-Engineer SVG Tile Naming/Generation Logic
    If all else fails, analyze how the SVG tiles are structured:

    • Note the tile URL pattern (e.g., https://example.com/tiles/{zoom}/{x}/{y}.svg). This often mirrors WMTS tile indexing. You can try modifying the URL to point to a potential WMTS endpoint (swap .svg for .png or check for a /wmts path prefix).
    • Use tools like t-rex or gdal_translate to convert SVG tiles back to raster formats, then stitch them into a single dataset—but this is a last resort since it won't give you the raw vector data from a WMS/WMTS.

Important: Always review GRTgaz's terms of service before extracting or using their data. Infrastructure data may have copyright restrictions or require explicit permission for commercial use.

内容的提问来源于stack exchange,提问作者pickenpack

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 06:27:22