GEORSS feed xml tags Proposed Geo RSS 2 Enhancements

What I am look to achieve with a GEORSS feed is to include the following

  1. Polygon line colour
  2. Polygon line width
  3. Polygon line transparency
  4. Polygon fill colour
  5. Polygon fill transparency
  6. Polygon line style

Does anyone know what the xml tags are for the above, or any ideas on how to achieve this?

The following code snippet is from the SDK example.

Code Snippet

<item>

<title>Coldwater Lake</title>

<description>Formed by the 1980 eruption of Mount St. Helens.</description>

<georss:polygon>46.31409 -122.22616 46.31113 -122.22968 46.31083 -122.23320 46.29802 -122.25877 46.29245 -122.26641 46.29286 -122.26392 46.28746 -122.26744 46.28741 -122.26006 46.29049 -122.25955 46.29120 -122.25620 46.28924 -122.255430 46.30271 -122.23251 46.31284 -122.22315 46.31409 -122.22616</georss:polygon>

</item>

Any help would be most greatly received.

Many thanks

Duncan Garratt

[3753 byte] By [DuncanGarratt] at [2008-1-7]
# 1

All good questions -- to what extent the georss specification is supported has always been a little cloudy in the SDK documentation. My guess with the current GeoRSS support in VE is that you'd have to recursively go back over the shapes once they've been added to the map and then set your list of public properties from there. From what I understand of the GeoRSS spec to begin with is that it encapsulates the spatial aspects of an <item>, and doesn't attempt to describe rendering (fills, line widths etc). In fact, if you (hypothetically Wink ) went through the core VE javascript and examined just how they are parsing inbound GeoRSS.xml files you'll see what I mean about the loose implementation...I actually prefer the v4 parser.

JaredH at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 2

Reference RSS Feeds

The parser seems to work well providing simple GEORSS is used. The problem with the link tag seems to be down to using GML, and not simple GEORSS. What I am still trying to find out is how to set the following in RSS

1. Polygon line colour

2. Polygon line width

3. Polygon line transparency

4. Polygon fill colour

5. Polygon fill transparency

6. Polygon line style

Having looked on the web, and gone bald in the process there appears to be little, or no documentation to achieve this. Microsoft please document this area properly in your SDK, and save us developers hours of R&D!

In the process of going bald over this I have made an interesting discovery.

When a collection is called, simple GEORSS is not returned, but a mark-up language that is undocumented called CML. Presumably the C stands for Collection e.g. Collection Mark-up Language.

What is most significant is that a style tag/element is included <Style></Style> where the following can be set.

  1. Polygon line colour
  2. Polygon line width
  3. Polygon fill colour
  4. Polygon line style

What is omitted is

  1. Polygon line transparency
  2. Polygon fill transparency

What is most interesting is that the parser to handle CML is already included in the VE API, but is restricted to a Collection ID. What would be great is for the VE API to call a URL as well as a Collection ID, so that a file, or stream containing CML could be parsed.

This would be extremely significant, as it would allow collections to be dynamically created server side from a database server side application, such as MS SQL and C# server application, and displayed using an AJAX call. Not only could different layers be displayed, and toggled on, and off in a web page, but dynamic collection areas could be created, that are called from event handlers such as enddrag or endzoom.

This can be achieved already using GEORSS but is confined to markers, unless you want to be stuck with the standard poly objects default styles.

I do believe that CML has great potential in Virtual Earth, and MS SQL spatial, and I would urge the VE development team, and the MS SQL development team to collaborate in supporting CML, and make it available to developers, and not just confine its use to Microsoft applications.

In making this discovery I used httpwatch to view what was being returned by the AJAX post. Their website is http://www.httpwatch.com/. This is a great bit of software to monitor what is being returned from an AJAX post, or get.

I hope this helps to explain some of the mysteries of RSS feeds and MS Collections.

Duncan Garratt

www.gis-logic.co.uk

DuncanGarratt at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 3

Code Snippet

Having just delved into the VE API source regarding RSS feeds, looking for node names that are being used by VE RSS parser, the RSS 2 standard is supported, for markers/icons where the georss:point node is used For poly objects such as polylines, and polygons (georss:line georss:polygon ) there is no support for style i.e.

1. Polygon line colour

2. Polygon line width

3. Polygon line transparency

4. Polygon fill colour

5. Polygon fill transparency

6. Polygon line style

After much thought about this problem and the lack of style support for poly objects in the standard I have decided to write my own Geo RSS 2 Plus AJAX XML parser and extend the Geo RSS 2 standard, to provide full support for poly objects, and their styling. The proposed node names are as follows.

In addition to the nodes supporting georss:point

georss:line Value = Object Points in Lat/Lon

georss:line-color Value = RGB color e.g. 100,100,100

georss:line-width Value = integer

georss:line-transparency Value = 0.0 to 1

georss:perimeter Value = float

georss:perimeter-units Value = KM/ Miles/Nautical Miles e.g. KM,ML,NM

georss:line-style Value = Dot/Dash etc

georss:show-marker // True or False Values = 1,-1

georss:polygon Value = Object Points in Lat/Lon

georss:line-color Value = RGB color e.g. 100,100,100

georss:line-width Value = integer

georss:line-transparency Value = 0.0 to 1

georss:fill-color Value = RGB color e.g. 100,100,100

georss:fill-transparency Value = 0.0 to 1

georss:line-style Value = Dot/Dash etc

georss:area Value = float

georss:area-units Values = Acres/Hectares/KM/ Miles/Nautical Miles e.g.A,H KM,ML,NM

georss:perimeter Value = float

georss:perimeter-units Value = KM/ Miles/Nautical Miles e.g. KM,ML,NM

georss:show-marker // True or False Values = 1,-1

georss:circle Value = Single Object Point in Lat/Lon

georss:radius Value = float

georss:radius-units Value = KM/ Miles/Nautical Miles e.g. KM,ML,NM

georss:line-color Value = RGB color e.g. 100,100,100

georss:line-width Value = integer

georss:line-transparency Value = 0.0 to 1

georss:fill-color Value = RGB color e.g. 100,100,100

georss:fill-transparency Value = 0.0 to 1

georss:line-style Value = Dot/Dash etc

georss:area Value = float

georss:area-units Values = Acres/Hectares/KM/ Miles/Nautical Miles e.g.A,H KM,M,NM

georss:perimeter Value = float

georss:perimeter-units Value = KM/ Miles/Nautical Miles e.g. KM,ML,NM

georss:show-marker // True or False Values = 1,-1

georss:rss-file Value = URL //Call another RSS feed from within a RSS feed i.e. Multiple RSS feed Collections

georss:ms-collection Value = CollectionID //Call a MS Collection

I plan to write two versions of the Geo RSS 2 Plus AJAX XML parser, supporting Virtual Earth, and Google Maps, so that the same RSS feed can be used in both mapping systems, with the exceptions of Geo:ms-collection which would only be supported in Virtual Earth.

On completion I will publish the code in the hope that Geo RSS 2 Plus will become widely used. Sorry to the standards committee but needs must. This will be released under open source.

At the same time I plan to have a commercial application available that will convert ESRI shape files and mapinfo files to Geo RSS 2 Plus, allowing easy import of these files into Virtual Earth, and Google Maps.

Any comments or additions greatly received.

Duncan Garratt

www.gis-logic.co.uk

.

DuncanGarratt at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 4

Would people wish to have custom tile layers included in Geo RSS 2 Plus?

Duncan Garratt

www.gis-logic.co.uk

DuncanGarratt at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 5

Sounds interesting Duncan,

Is their a blog or webpage we should keep an eye on?

Once you have it going if you want to submit an article on how to use it I'm sure ViaVirtualEarth.com would be interested.

John.

SoulSolutions at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 6

In answer to my original question regarding style support or lack of it in georss poly objects I believe the reason to be the following.

Software vendors somehow influenced the standards committee, where within these applications a project file is used to store the styling attributes. A good example would be ESRI and their project file.

With the use of project files the styling attributes are not needed, hence only the coordinates are included within <item> node, and the same applies to GML where styling attributes are also omitted.

In Virtual Earth, and Google Maps where there is no project file, the styling attributes need to be included, so that the parser knows how to style the poly object. In my planed Geo RSS 2 Plus implementation these styling attributes can be added within <item> node, or outside the items node, which would act as a default style, where the styling nodes have been omitted within the <item> node.

Duncan Garratt

DuncanGarratt at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 7

I have written some proposed XML concerning plotting of markers using Geo RSS 2 Plus

Code Snippet

<item>

<legend>

0 or -1 Value = true or false 0 = truefor use in building legend items.

</legend>

<id>

integer value = e.g. 123456

</id>

<title>

A marker title

</title>

<description>

<![CDATA[A description OR HTML]]>

</description>

<link>

<![CDATA[A link or links]]>

//Link separator is char | i.e. multiple links in a roll over window

</link>

<email-link>

<![CDATA[An email link or email links]]>

//Email Link separator is char | i.e. multiple email links in a roll over window

</email-link>

<media>

A media file or stream URL

</media>

<media-autoplay>

0 or 1 Value = true or false 0 = true

</media-autoplay>

<image>

<![CDATA[An image or multiple images]]>

//image Link separator is char | i.e. multiple images in a roll over window

</image>

<georss:point>

46.183, –123.816

</georss:point>

<icon>

URL for a marker Icon

</icon>

<display-order>

1234

</display-order>

</item>

Link separator char |

For the parser to determine each link

Display Orders

1 = Description

2 = Link

3 = Email Link

4 = Media

5 = Image

e.g. = 1235 or 14 or 421 etc

Between each display object the parser will add <br><br> i.e. Description, Image etc

Legend

If true function BuildLegendItem() is called for each item, after that item has been parsed.

Please note if true the marker is not plotted

Developers can change the contents of this function so that your own style of legends can be built.

Please Note the use of CDATA

In an XML document or external parsed entity, a CDATA section is a section of element content that is marked for the parser to interpret as only character data, not markup. A CDATA section is merely an alternative syntax for expressing character data; there is no semantic difference between character data that manifests as a CDATA section and character data that manifests as in the usual syntax in which "<" and "&" would be represented by "&lt;" and "&amp;", respectively.

Example: A custom marker and description.

Please note the entire HTML would be included within the description, so the formatting of the content would be down to the developer.

<item>

<legend>

-1//Value = false

</legend>

<id>

integer value = e.g. 123456

</id>

<title>

A marker title

</title>

<description>

<![CDATA[A description OR HTML]]>

</description>

<icon>

URL for a marker Icon

</icon>

<georss:point>

46.183 –123.816

</georss:point>

</item>

Any comments or additions greatly received.

Duncan Garratt

www.gis-logic.co.uk

DuncanGarratt at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 8

Proposed XML for Geo RSS 2 Plus for building a legend

Code Snippet

<item>

<legend>

0 //Value = true

</legend>

<title>

A Legend Title

</title>

<description>

<![CDATA[A Legend OR HTML]]>

</description>

<icon>

URL to A Legend Icon

</icon>

<georss:rss-file>

URL to another feed (File Or Stream)

</georss:rss-file>

</item>

Legend

If true function BuildLegendItem() is called for each item, after that item has been parsed.

Please note if true the marker is not plotted

Developers can change the contents of this function so that your own style of legends can be built.

The link is built up using the title, and georss:rss-file url, or the icon, and georss:rss-file or both.

If legend is set to true then the url for the Geo RSS 2 Plus feed is not added to the URL parser list for parsing. If set to false then georss:rss-file url will be added to the parser list.

Example of adding Geo RSS 2 Plus feed

<item>

<legend>

-1 //Value = false

</legend>

<georss:rss-file>

URL to another feed (File Or Stream)

</georss:rss-file>

</item>

Proposed XML for Geo RSS 2 Plus for adding a Local Live Collection

<item>

<legend>

-1

</legend>

<georss:ms-collection>

<![CDATA[A Local Live Collection ID]]>

</georss:ms-collection>

</item>

Example XML to plot a poly line without a marker

<item>

<legend> -1</legend>

<georss:line>46.31409 -122.22616 46.31113 -122.22968 46.31083 -122.23320</georss:line>

<georss:line-color>100,100,100</georss:line-color>

<georss:line-width>1</georss:line-width>

<georss:line-transparency>0.50</georss:line-transparency>

<georss:perimeter>10.578</georss:perimeter>

<georss:perimeter-units>KM</georss:perimeter-units>

<georss:line-style>Dash<georss:line-style>

<georss:show-marker>-1</georss:show-marker>

</item>

Example XML to plot a polygon line without a marker

<item>

<legend> -1</legend>

<georss:polygon>46.31409 -122.22616 46.31113 -122.22968 46.31083 -122.23320

</georss: polygon>

<georss:line-color>100,100,100</georss:line-color>

<georss:line-width>1</georss:line-width>

<georss:line-transparency>0.50</georss:line-transparency>

<georss:fill-color>150,150,150</georss:fill-color>

<georss:fill-transparency>0.25</georss:fill-transparency>

<georss:area>150.5896</georss:area>

<georss:area-units>A</georss:area-units>

<georss:perimeter>10.578</georss:perimeter>

<georss:perimeter-units>KM</georss:perimeter-units>

<georss:line-style>Dash<georss:line-style>

<georss:show-marker>-1</georss:show-marker>

</item>

Example XML to plot a poly circle without a marker

<item>

<legend> -1</legend>

<georss:circle>46.31409 -122.22616</georss:circle>

<georss:radius>5</georss:radius>

<georss:radius-units>KM</georss:radius-units>

<georss:line-color>100,100,100</georss:line-color>

<georss:line-width>1</georss:line-width>

<georss:line-transparency>0.50</georss:line-transparency>

<georss:fill-color>150,150,150</georss:fill-color>

<georss:fill-transparency>0.25</georss:fill-transparency>

<georss:area>150.5896</georss:area>

<georss:area-units>A</georss:area-units>

<georss:perimeter>10.578</georss:perimeter>

<georss:perimeter-units>KM</georss:perimeter-units>

<georss:line-style>Solid<georss:line-style>

<georss:show-marker>-1</georss:show-marker>

</item>

Example XML to plot a poly circle with a custom marker at the centre of the circle

<item>

<legend> -1</legend>

<georss:circle>46.31409 -122.22616</georss:circle>

<georss:radius>5</georss:radius>

<georss:radius-units>KM</georss:radius-units>

<georss:line-color>100,100,100</georss:line-color>

<georss:line-width>1</georss:line-width>

<georss:line-transparency>0.50</georss:line-transparency>

<georss:fill-color>150,150,150</georss:fill-color>

<georss:fill-transparency>0.25</georss:fill-transparency>

<georss:area>150.5896</georss:area>

<georss:area-units>A</georss:area-units>

<georss:perimeter>10.578</georss:perimeter>

<georss:perimeter-units>KM</georss:perimeter-units>

<georss:line-style>Solid<georss:line-style>

<georss:show-marker>0</georss:show-marker>

<id>100</id>

<title>A marker title</title>

<description><![CDATA[A description OR HTML]]></description>

<link><![CDATA[A link]]></link>

<image><![CDATA[An image URL]]></image>

<georss:point>46.31409 -122.22616</georss:point>

<icon>An Icon URL</icon>

<display-order>521</display-order>

</item>

Any comments or additions greatly received.

Duncan Garratt

www.gis-logic.co.uk

DuncanGarratt at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 9

Example XML file/stream

Code Snippet

<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<channel>
<title>A Title</title>
<description>A Description</description>
<Layer>Layer Name To Insert these items in</Layer>
<item>
<legend> -1</legend>
<georss:line>46.31409 -122.22616 46.31113 -122.22968 46.31083 -122.23320</georss:line>
<georss:line-color>100,100,100</georss:line-color>
<georss:line-width>1</georss:line-width>
<georss:line-transparency>0.50</georss:line-transparency>
<georss:perimeter>10.578</georss:perimeter>
<georss:perimeter-units>KM</georss:perimeter-units>
<georss:line-style>Dash<georss:line-style>
<georss:show-marker>-1</georss:show-marker>

</item>
<item>
<legend> -1</legend>
<georss:polygon>46.31409 -122.22616 46.31113 -122.22968 46.31083 -122.23320
</georss:polygon>
<georss:line-color>100,100,100</georss:line-color>
<georss:line-width>1</georss:line-width>
<georss:line-transparency>0.50</georss:line-transparency>
<georss:fill-color>150,150,150</georss:fill-color>
<georss:fill-transparency>0.25</georss:fill-transparency>
<georss:area>150.5896</georss:area>
<georss:area-units>A</georss:area-units>
<georss:perimeter>10.578</georss:perimeter>
<georss:perimeter-units>KM</georss:perimeter-units>
<georss:line-style>Dash<georss:line-style>
<georss:show-marker>-1</georss:show-marker>
</item>
<item>
<legend> -1</legend>
<georss:circle>46.31409 -122.22616</georss:circle>
<georss:radius>5</georss:radius>
<georss:radius-units>KM</georss:radius-units>
<georss:line-color>100,100,100</georss:line-color>
<georss:line-width>1</georss:line-width>
<georss:line-transparency>0.50</georss:line-transparency>
<georss:fill-color>150,150,150</georss:fill-color>
<georss:fill-transparency>0.25</georss:fill-transparency>
<georss:area>150.5896</georss:area>
<georss:area-units>A</georss:area-units>
<georss:perimeter>10.578</georss:perimeter>
<georss:perimeter-units>KM</georss:perimeter-units>
<georss:line-style>Solid<georss:line-style>
<georss:show-marker>0</georss:show-marker>
<id>100</id>
<title>A marker title</title>
<description><![CDATA[A description OR HTML]]></description>
<link><![CDATA[A link]]></link>
<image><![CDATA[An image URL]]></image>
<georss:point>46.31409 -122.22616</georss:point>
<icon>An Icon URL</icon>
<display-order>521</display-order>
</item>
<item>
<id>101</id>
<title>A marker title</title>
<description><![CDATA[A description OR HTML]]></description>
<link><![CDATA[A link]]></link>
<image><![CDATA[An image URL]]></image>
<georss:point>46.31409 -122.22616</georss:point>
<icon>An Icon URL</icon>
<display-order>521</display-order>
</item>
<item>
<legend>0</legend>
<title>A Legend Title</title>
<description><![CDATA[A legend description OR HTML]]></description>
<icon>URL to A Legend Icon</icon>
<georss:rss-file>URL to another feed (File Or Stream)</georss:rss-file>
</item>
<item>
<legend>-1</legend>
<georss:rss-file>URL to another feed (File Or Stream)</georss:rss-file>
</item>
<item>
<legend>-1</legend>
<georss:ms-collection><![CDATA[A Local Live Collection ID]]></georss:ms-collection>
</item>
</channel>
</rss>

Any comments or additions greatly received.

Duncan Garratt

www.gis-logic.co.uk

DuncanGarratt at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 10

Any update on your Geo RSS 2 + AJAX XML parser? I would be nice to use something relative standard.

Andrew Coats

awcoats at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 11

I'd like to echo the need for style assignment by attribute in the VE control. My project is importing many geometries from a spatial dbms, and the only way I could figure out how to assign style by feature attibutes was to loop through the layer after the initial import via GeoRss. It works... but as soon as my shape count gets above a few dozen, the performance starts to hurt.

So, I took the VE script apart and modified the ImportShapeLayerData() method to set the style when it runs, and this seems to fit my needs so far.

My only comment for Duncan is a bit nit-picky, but I'll throw it out there anyway: I just question the wisdom of extending the GeoRss namespace (georss:[blahblah]) for all this presentation information. Personally, I'd like to see a new spec (using all the tags you made above) for importing geometry into the VE, but leave the GeoRss importer alone. I think GeoRss is a bit limiting, anyway ( I couldn't get a polyLine to properly import using GeoRss, and had to create individual items for each segment).

So how about it? Perhaps a new VEDataType? One that includes more robust geometry and presentation support.

Having said that, I'm pretty impressed with VE so far.

scottgarner at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 12

Yes I agree

My first thoughts was to extend georss but having though about it further the sensible thing would be to write a KML parser for Virtual Earth, so that the same xml can be plotted on both Virtual Earth and Google Maps.

Looping through the shapes and changing their styling at best can only be a hack.It’s on my list to write, but if anyone has already written one please post it.

Duncan Garratt

DuncanGarratt at 2007-10-2 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...

Windows Live Developer Forums

Site Classified