<p><a href="https://github.com/openstreetmap/osm2pgsql/blob/master/output-pgsql.cpp#L59-L70">a comment in output-pgsql.cpp</a> discusses WKB, but for table_t::write_node a WKT is constructed by hand with boost::format so the comment might just be wrong. Something similar is done for ways.</p>
<p>I do recall issues with locale stuff not being thread-safe in Geos coming up previously, but can't find a reference. If this the issue, then it might be reproducible on linux by changing the locale to non-C before starting osm2pgsql.</p>
<p>There's a difference between WKB as text, EWKB as text, WKB, and EWKB, and I'm not sure which we'd want to send with either COPY or INSERT</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/openstreetmap/osm2pgsql/pull/498#issuecomment-155718559">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AD2-7q9EGJVOWpGfQN0qt90DDUi9JvVqks5pEwbNgaJpZM4GeIs1.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/openstreetmap/osm2pgsql/pull/498#issuecomment-155718559"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>