<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=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@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="PT" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">OK, one more from the Julia wrappers. Playing with buffers now, and it works but I want to get the points and that fails<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal">julia> wkt = "POINT (1198054.34 648493.09)";<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">julia> dbf = Gdal.buffer(Gdal.fromWKT(wkt), 500)<o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Geometry: POLYGON ((1198554.34 648493.09,1198553.65476738 64 ... .09))<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">julia> toWKT(dbf)[1:90]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">"POLYGON ((1198554.34 648493.09,1198553.65476738 648466.922021879,1198551.60094768 648440.8"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The ‘toWKT()’ function calls OGR_G_ExportToWkt()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">But now if I try to extract the points with OGR_G_GetX() it errors<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">julia> Gdal.OGR_G_GetX(dbf.ptr, 0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ERROR 6: Incompatible geometry for operation #
</span><span lang="EN-US" style="font-family:Wingdings">ç</span><span lang="EN-US">============= ????<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">0.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">julia> Gdal.OGR_G_GetPointCount(dbf.ptr) #
</span><span lang="EN-US" style="font-family:Wingdings">ç</span><span lang="EN-US">============= Why so?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Although the toWKT() works, tat’s an ascii representation but I want I want to access them in binary (not in WKB) to send to GMT.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Joaquim<o:p></o:p></span></p>
</div>
</body>
</html>