<br><br><div class="gmail_quote">On Mon, Sep 13, 2010 at 12:46 PM, Bob Pawley <span dir="ltr"><<a href="mailto:rjpawley@shaw.ca">rjpawley@shaw.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="padding-left: 10px; padding-right: 10px; padding-top: 15px;" name="Compose message area">
<div><font face="Calibri">Rick - thanks for answering.</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">I am in the process of learning a little
XML.</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">I understood that a query such as 'Select
AsSvg(the_geom) from p_id.image' went to Postgis and the return (the geometry)
comes back.</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">I think you are saying that this is also in the xml path
and xml interprets this expression differently than 'Select the_geom from
p_id.image'</font></div></div></blockquote><div><br>Not exactly. You will need to understand the basics of an XML document, and a little SVG before you can use this.<br><br>Here is a link to the SVG spec regarding paths, it will enlighten you on what you need to sort out.<br>
<br><a href="http://www.w3.org/TR/SVG/paths.html#PathElement">http://www.w3.org/TR/SVG/paths.html#PathElement</a><br><br>See the example in red fine type. That is a valid SVG document with the path element:<br><pre class="xml">
<b style="color: rgb(204, 0, 0);"><path d="M 100 100 L 300 100 L 200 300 z" fill="red" stroke="blue" stroke-width="3" /></b><br></pre>'d' is the attribute in the path that tells it how to draw, the value of the d attribute is "M 100 100 L 300 100 L 200 300 " and this is what PostGIS returns from the AsSvg() call.<br>
<br>That element draws a polyline from (M 100,100) to (300,100) to (200,300) and closes it (z) fills it with red, strokes it in blue with a stroke width of 3 pixels. (px is the default)<br><br>You can use the fragment in the example to form your own documents and style them.<br>
<br>Be aware that you can also use CSS to style SVG, should you happen to be familiar with it.<br><br>Have fun.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="padding-left: 10px; padding-right: 10px; padding-top: 15px;" name="Compose message area">
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">Bob</font></div>
<div><font face="Calibri"></font> </div>
<div style="font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<div><br></div>
<div style="background: rgb(245, 245, 245) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">
<div><b>From:</b> <a title="mailto:graham.rick@gmail.com
CTRL + Click to follow link" href="mailto:graham.rick@gmail.com" target="_blank">Rick</a> </div>
<div><b>Sent:</b> Monday, September 13, 2010 9:08 AM</div>
<div><b>To:</b> <a title="mailto:postgis-users@postgis.refractions.net
CTRL + Click to follow link" href="mailto:postgis-users@postgis.refractions.net" target="_blank">PostGIS Users Discussion</a>
</div>
<div><b>Subject:</b> Re: [postgis-users] AsSvg</div></div></div><div><div></div><div class="h5">
<div><br></div><br>Not sure what you are asking, but I'll take a stab in the
dark.<br><br>When you retrieve geometry as SVG what you get back is the contents
of a path attribute node.<br><br>So if an SVG path element is written <path
d="X"/> the result of the query is "X", or the value of the 'd' (data)
attribute, not an XML element, and certainly not a valid SVG document. You
have to construct these yourself.<br><br>
<div class="gmail_quote">On Mon, Sep 13, 2010 at 12:00 PM, Bob Pawley <span dir="ltr"><<a title="mailto:rjpawley@shaw.ca
CTRL + Click to follow link" href="mailto:rjpawley@shaw.ca" target="_blank">rjpawley@shaw.ca</a>></span> wrote:<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<div style="padding-left: 10px; padding-right: 10px; padding-top: 15px;" name="Compose message area">
<div><font face="Calibri">Hi</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">I may be on the wrong list but xml and Delphi guys
that know Postgis seem to be few and far between.</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">I`m using the following to display the
binary data on a memo component as text.</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri"> PSQLQUery1.SQL.Add('Select the_geom from
p_id.image');<br> PSQLQUery1.SQL.Add ('where
p_id.image.p_id_id = ''1534''');<br>
PSQLQUery1.Open;</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">This works fine.</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">When I change it to select AsSvg the xml
consider assvg as another node and the geometry data does not
appear.</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri"> PSQLQUery1.SQL.Add('Select AsSvg(the_geom) from
p_id.image');<br> PSQLQUery1.SQL.Add ('where
p_id.image.p_id_id = ''1534''');<br>
PSQLQUery1.Open;</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">If any one can suggest a
possible reason for this behavior It would be
appreciated. </font></div>
<div><font face="Calibri"></font> </div><font color="#888888">
<div><font face="Calibri">Bob</font></div></font></div><br>_______________________________________________<br>postgis-users
mailing list<br><a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Cheers!<br>Rick<br>Eeny, Meeny, Jelly Beanie, the spirits
are about to speak!<br> -- Bullwinkle
Moose<br><br>
</div></div><p>
</p><hr><div class="im">
<p></p>_______________________________________________<br>postgis-users mailing
list<br><a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Cheers!<br>Rick<br>Eeny, Meeny, Jelly Beanie, the spirits are about to speak!<br> -- Bullwinkle Moose<br><br>