x

Geography - XSLT - KML Question

I am storing geography types in a table and need to extract KML snippets.

The best way I can determine to do this is the get the data out using asGML(). This gets me really close - but the format of the coordinates are different.

In GML the coordinates look like this (lat/lng space delimited) 37.883559999437914 -122.24446999957762 37.883635999905707 -122.24458899986539

What I need is a way to get the elements out like the following (lng/lat comma delimited) -122.24446999957762, 37.883559999437914, -122.24458899986539, 37.883635999905707

Any help would be greatly appreciated. I'm stuck.
more ▼

asked May 03, 2012 at 10:17 AM in Default

rpmatthew gravatar image

rpmatthew
0 1 1 2

Forgot to mention I need an XSLT solution - late night - stuck brain.
May 03, 2012 at 11:15 AM rpmatthew
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

Maybe you could look at [this project on CodePlex by Bob Beauchemin][1]

[1]: http://sqlservertokml.codeplex.com/
more ▼

answered May 03, 2012 at 10:57 AM

Kev Riley gravatar image

Kev Riley ♦♦
53.8k 47 49 76

Thanks Kev - I looked at that - and while I think it is a good project - it doesn't seem to fit the context that the application needs. Looking for a pure xslt method.

This particular part is keeping me pretty much stuck - I just don't know xsl that well.
May 03, 2012 at 11:04 AM rpmatthew
Ahh XSLT - outside my knowledge too. Sorry!
May 03, 2012 at 11:07 AM Kev Riley ♦♦
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x150
x7
x2

asked: May 03, 2012 at 10:17 AM

Seen: 1188 times

Last Updated: May 03, 2012 at 11:15 AM