<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Thanks -- that fixes that error, and I'm getting further into the
    process. I'm now getting this:<br>
    <br>
    Reading in file: us-south.osm.pbf<br>
    Entity: line 1: parser error : Document is empty<br>
    <br>
    I'm wondering if it's because PBF support isn't running correctly --
    downloading a osm.bz file to check if that helps.<br>
    <br>
    If I run the command with the -r pbf flag:<br>
    <br>
    osm2pgsql us-south.osm.pbf -r pbf -d border_processing_test -H /tmp/<br>
    <br>
    I get:<br>
    <br>
    Using projection SRS 900913 (Spherical Mercator)<br>
    Input parser `pbf' not recognised. Should be one of [libxml2,
    primitive].<br>
    <br>
    Thanks again,<br>
    <br>
    <div class="moz-signature">Michael Corey<br>
      News Applications Developer<br>
      Center for Investigative Reporting<br>
      510.809.3178<br>
      <br>
      <em>2012 Recipient of the MacArthur Award for Creative and
        Effective Institutions</em></div>
    <br>
    On 6/14/12 11:22 AM, Michael Daines wrote:
    <blockquote
      cite="mid:3309C57F-85B6-4C82-B2DF-E441E0D5D603@mdaines.com"
      type="cite">
      <blockquote type="cite">
        <pre wrap="">I have confirmed that /usr/local/bin/osm2pgsql and /usr/local/bin/psql are the versions being used by my system (with which psql, which osm2pgsql).
When I try to run osm2pgsql I get a strange connection error:

osm2pgsql us-south.osm.pbf -r pbf
osm2pgsql SVN version 0.80.0 (32bit id space)

Error: Connection to database failed: could not connect to server: Permission denied
    Is the server running locally and accepting
    connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

Any suggestions? I can connect locally to my databases fine with Navicat and via psql. Is it possible that osm2pgsql is trying to access the wrong psql?
</pre>
      </blockquote>
      <pre wrap="">
When using homebrew, it appears that you need to include the following option:

   --host=/tmp

>From this guide:

  <a class="moz-txt-link-freetext" href="http://bdon.org/2012/03/23/osm2pgsql-homebrew-and-postgis-on-lion/">http://bdon.org/2012/03/23/osm2pgsql-homebrew-and-postgis-on-lion/</a>


-- Michael

</pre>
    </blockquote>
  </body>
</html>