title: postgresql - center - "No function matches the given name and argument types. You might need to add explicit type casts."
body: <p>On Slackware 14.0 x86_64 with postgresql-9.2.4 and postgis-2.0.3.
  Have loaded essex-latest.osm.pbf into a database.</p>
  
  <p>I want to get the centre of the roads in Essex, but am having problems.
  These work OK:</p>
  
  <pre><code>SELECT st_Extent(way), st_area(st_Extent(way)) from planet_osm_roads;    
         st_extent                    |     st_area          
  ------------------------------------------------+------------------
   BOX(-10979.62 6693910.54,144349.79 6822695.15) | 20004037488.3802
  
  
  
  SELECT center(box '((-10979.62, 6693910.54),(144349.79, 6822695.15))');
           center          
  -------------------------
   (66685.085,6758302.845) 
  </code></pre>
  
  <p>(But I have wondered why the function is center and not st_center).</p>
  
  <p>Anyway, so why doesn't this work:</p>
  
  <pre><code>SELECT center(st_Extent(way)) from planet_osm_roads;
  ERROR:  function center(box2d) does not exist
  LINE 1: SELECT center(st_Extent(way)) from planet_osm_roads;
                 ^
  HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
  </code></pre>
  
  <p>Cheers,
  Peter</p>