开发者

Is there a simple way to create a geo RSS like Google GeoRSS?

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><开发者_Go百科![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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜