<div dir="ltr">Ahh, thanks! It helps to frame the question correctly. I see now that what I am trying to do is create the hex-encoded form of WKB.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 14, 2015 at 10:24 AM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le mercredi 14 octobre 2015 19:18:20, Roger André a écrit :<br>
> <grin> Yes Even, exportToWkb() was something I tried, but I thought there<br>
> might be an easy way to get the ASCII form of the WKB, rather than the<br>
> straight binary that I got when I wrote out to a text file.<br>
<br>
</span>Ah I missed that part.<br>
<br>
The following should help:<br>
<br>
<a href="http://www.gdal.org/cpl__string_8h.html" rel="noreferrer" target="_blank">http://www.gdal.org/cpl__string_8h.html</a>:<br>
<br>
char * CPLBinaryToHex (int nBytes, const GByte *pabyData)<br>
CPL_WARN_UNUSED_RESULT<br>
Binary to hexadecimal translation. More...<br>
<br>
GByte * CPLHexToBinary (const char *pszHex, int *pnBytes)<br>
CPL_WARN_UNUSED_RESULT<br>
<br>
Even more compact with base64 encoding:<br>
<br>
char * CPLBase64Encode (int nBytes, const GByte *pabyData)<br>
CPL_WARN_UNUSED_RESULT<br>
<br>
int CPLBase64DecodeInPlace (GByte *pszBase64)<br>
<span class="im HOEnZb"><br>
><br>
> Norman, thanks for the links. I'll go peruse them.<br>
><br>
> On Wed, Oct 14, 2015 at 10:10 AM, Norman Vine <<a href="mailto:nhv@cape.com">nhv@cape.com</a>> wrote:<br>
> > On Oct 14, 2015, at 12:59 PM, Roger André <<a href="mailto:randre@gmail.com">randre@gmail.com</a>> wrote:<br>
> ><br>
> > Hi All,<br>
> ><br>
> > I have a tool which currently exports geometry using the ExportToWkt()<br>
> > function. It works great, but I'd like to try reducing the size of my<br>
> > output files by using a format like the string representation of WKB that<br>
> > shp2pgsql produsces when creating SQL insert files. Is there a export<br>
> > function available in GDAL that I could use for this?<br>
> ><br>
> > I'm looking at <a href="http://www.gdal.org/classOGRGeometry.html" rel="noreferrer" target="_blank">http://www.gdal.org/classOGRGeometry.html</a> currently, but<br>
> > have not yet spotted what I'm looking for.<br>
> ><br>
> > Thanks,<br>
> ><br>
> ><br>
> > see<br>
> > <a href="http://www.gdal.org/ogr__api_8h.html#ad5c94ae76c09774dba8725c24daeefd6" rel="noreferrer" target="_blank">http://www.gdal.org/ogr__api_8h.html#ad5c94ae76c09774dba8725c24daeefd6</a><br>
> > or<br>
> > <a href="http://www.gdal.org/classOGRGeometry.html#a9a3ad2f9b55285be500ca6ac5dc75d" rel="noreferrer" target="_blank">http://www.gdal.org/classOGRGeometry.html#a9a3ad2f9b55285be500ca6ac5dc75d</a><br>
> > 1d<br>
<br>
</span><div class="HOEnZb"><div class="h5">--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</div></div></blockquote></div><br></div>