有没有一种简单的方法来创建像 Google GeoRSS 这样的地理 RSS?

发布于 2024-09-09 11:20:58 字数 3289 浏览 1 评论 0原文

这是“我的地图”中的 Google GeoRSS:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<channel>
  <link>http://maps.google.com</link>
  <title>beijing 1</title>
  <description><![CDATA[dsad]]></description>
  <item>
    <guid isPermaLink="false">00048b5b66b7169311de4</guid>
    <pubDate>Wed, 14 Jul 2010 16:23:08 +0000</pubDate>

    <title>ww</title>
    <description><![CDATA[<div dir="ltr">dwqd</div>]]></description>
    <author>zjm1126</author>
    <georss:point>
      39.965015 116.362381
    </georss:point>
    <georss:elev>0.000000</georss:elev>
  </item>

  <item>
    <guid isPermaLink="false">00048b5b6a51f18e53ea5</guid>
    <pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>
    <title>线条 1</title>
    <description><![CDATA[]]></description>
    <author>zjm1126</author>
    <gml:LineString>

      <gml:posList>
        39.992191 116.417938
        39.968254 116.466698
        39.939568 116.451591
        39.959045 116.411079
      </gml:posList>
    </gml:LineString>
  </item>
  <item>
    <guid isPermaLink="false">00048b5b6a520c46d52bd</guid>
    <pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>

    <title>线条 2</title>
    <description><![CDATA[<br>]]></description>
    <author>zjm1126</author>
    <gml:LineString>
      <gml:posList>
        39.990536 116.437225
        39.963963 116.477051
        39.958702 116.437912
        39.959045 116.411079
      </gml:posList>
    </gml:LineString>

  </item>
  <item>
    <guid isPermaLink="false">00048b5b6a521daa5391e</guid>
    <pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>
    <title>qqdw</title>
    <description><![CDATA[dsa]]></description>
    <author>zjm1126</author>

    <gml:LineString>
      <gml:posList>
        39.987720 116.519913
        39.947990 116.556641
        39.959045 116.523003
      </gml:posList>
    </gml:LineString>
  </item>
  <item>
    <guid isPermaLink="false">00048b5b6a52357ab39f0</guid>
    <pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>

    <title>dwqd</title>
    <description><![CDATA[]]></description>
    <author>zjm1126</author>
    <gml:Polygon>
      <gml:exterior>
        <gml:LinearRing>
          <gml:posList>
            40.034264 116.451241
            40.015781 116.437225
            40.011654 116.409363
            40.033478 116.430305
            40.034264 116.451241
          </gml:posList>

        </gml:LinearRing>
      </gml:exterior>
    </gml:Polygon>
  </item>
</channel>
</rss>

两个问题:

  1. 是否有一个库可以执行此操作?

  2. Google 使用 RSS,但我认为 Atom 更好。如何创建 GeoAtom?

This is Google GeoRSS which in "my maps":

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<channel>
  <link>http://maps.google.com</link>
  <title>beijing 1</title>
  <description><![CDATA[dsad]]></description>
  <item>
    <guid isPermaLink="false">00048b5b66b7169311de4</guid>
    <pubDate>Wed, 14 Jul 2010 16:23:08 +0000</pubDate>

    <title>ww</title>
    <description><![CDATA[<div dir="ltr">dwqd</div>]]></description>
    <author>zjm1126</author>
    <georss:point>
      39.965015 116.362381
    </georss:point>
    <georss:elev>0.000000</georss:elev>
  </item>

  <item>
    <guid isPermaLink="false">00048b5b6a51f18e53ea5</guid>
    <pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>
    <title>线条 1</title>
    <description><![CDATA[]]></description>
    <author>zjm1126</author>
    <gml:LineString>

      <gml:posList>
        39.992191 116.417938
        39.968254 116.466698
        39.939568 116.451591
        39.959045 116.411079
      </gml:posList>
    </gml:LineString>
  </item>
  <item>
    <guid isPermaLink="false">00048b5b6a520c46d52bd</guid>
    <pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>

    <title>线条 2</title>
    <description><![CDATA[<br>]]></description>
    <author>zjm1126</author>
    <gml:LineString>
      <gml:posList>
        39.990536 116.437225
        39.963963 116.477051
        39.958702 116.437912
        39.959045 116.411079
      </gml:posList>
    </gml:LineString>

  </item>
  <item>
    <guid isPermaLink="false">00048b5b6a521daa5391e</guid>
    <pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>
    <title>qqdw</title>
    <description><![CDATA[dsa]]></description>
    <author>zjm1126</author>

    <gml:LineString>
      <gml:posList>
        39.987720 116.519913
        39.947990 116.556641
        39.959045 116.523003
      </gml:posList>
    </gml:LineString>
  </item>
  <item>
    <guid isPermaLink="false">00048b5b6a52357ab39f0</guid>
    <pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>

    <title>dwqd</title>
    <description><![CDATA[]]></description>
    <author>zjm1126</author>
    <gml:Polygon>
      <gml:exterior>
        <gml:LinearRing>
          <gml:posList>
            40.034264 116.451241
            40.015781 116.437225
            40.011654 116.409363
            40.033478 116.430305
            40.034264 116.451241
          </gml:posList>

        </gml:LinearRing>
      </gml:exterior>
    </gml:Polygon>
  </item>
</channel>
</rss>

Two questions:

  1. Is there a lib to do this?

  2. Google use RSS, but I think Atom is better. How can I create a GeoAtom?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

海拔太高太耀眼 2024-09-16 11:20:58

GeoRSS 可以与 RSS 或 Atom 一起使用(请参阅 GeoRSS 维基百科页面中的示例) 。

一般来说,有许多库可以使用 RSS/Atom 提要,具体取决于您选择的语言。

处理 GeoRSS 的两个库是 OGR/GDAL,如果您使用的是 Django, GeoDjango (支持 地理提要

GeoRSS can be used with RSS or Atom (see the example from the GeoRSS wikipedia page).

There are many libraries that work with RSS/Atom feeds in general, depending on your language of choice.

Two libraries that handle GeoRSS are OGR/GDAL and, if you're using Django, GeoDjango (which supports geographic feeds.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文