<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>David,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Not sure how complex what you have is to graph.  I do wish there was a package in R that could read ST_AsBinary format directly from PL/R and stuff it into a spatial dataframe. Maybe someone else knows of that.  The closest we found was an SQLite driver one for spatial lite which looked like it could be retrofit to make a standalong binary digester. Can’t recall where that is.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If it’s of any help to you we do have an example of using ST_DumpPoints  (introduced in PostGIS 1.5) and using that to populate R spatial data frames.  The code can be downloaded from<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.postgis.us/chapter_10">http://www.postgis.us/chapter_10</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>And of course if you buy the book <a href="http://www.postgis.us/page_buy_book">http://www.postgis.us/page_buy_book</a>  (directly from Manning you get the beta book now (you get all chapters complete but undergoing revision and polishing) ) and the final book (eBook or hard-copy), which we hope we will be DONE DONE around January (or mid-late December if we are lucky).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.postgis.us">http://www.postgis.us</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Leo and Regina<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> postgis-users-bounces@postgis.refractions.net [mailto:postgis-users-bounces@postgis.refractions.net] <b>On Behalf Of </b>pcreso@pcreso.com<br><b>Sent:</b> Wednesday, November 17, 2010 1:24 PM<br><b>To:</b> PostGIS Users Discussion<br><b>Subject:</b> Re: [postgis-users] Postgis & R language<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0in 0in 0in 0in'><p class=MsoNormal>Hi David,<br><br>You can use PL/R to access R functionality from a Postgres SQL command line, or you can use rgdal to read Postgis data into R.<br><br>So it depends on whether you want to work in the DB & add R capabilities, or work in R & access Postgis data.<br><br>See: <br><br><a href="http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut01">http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut01</a><br><a href="http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut02">http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut02</a><br><br>for a useful introduction to PL/R; and for rgdal, see:<br><br><a href="http://rgdal.sourceforge.net/">http://rgdal.sourceforge.net/</a><br><a href="http://cran.r-project.org/web/packages/rgdal/rgdal.pdf">http://cran.r-project.org/web/packages/rgdal/rgdal.pdf</a><br><a href="http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut03">http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut03</a><br><br>HTH,<br><br>  Brent Wood<br><br><br>--- On <b>Thu, 11/18/10, David Potts <i><<a href="mailto:dave.potts@pinan.co.uk">dave.potts@pinan.co.uk</a>></i></b> wrote:<o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><br>From: David Potts <<a href="mailto:dave.potts@pinan.co.uk">dave.potts@pinan.co.uk</a>><br>Subject: [postgis-users] Postgis & R language<br>To: "PostGIS Users Discussion" <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>Date: Thursday, November 18, 2010, 12:46 AM<o:p></o:p></p><div><p class=MsoNormal><br>Hi List<br><br>Has anybody ever tried to read the value of geometry column from a table<br>into a R-language application  using the plr handler, is this a support<br>option?<br><br>Thanks in advance.<br>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br>Any views expressed in this message are those of the individual sender,<br>except where the sender specifically states them to be the views of the<br>Pinan Software<br><br><br>_______________________________________________<br>postgis-users mailing list<br><a href="/mc/compose?to=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><o:p></o:p></p></div></td></tr></table><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p></div></body></html>