Menu

function area(geometry) does not exist

Help
2013-09-11
2013-09-12
  • Martin Giese

    Martin Giese - 2013-09-11

    I'm trying to run osm2postgresql_05rc4.sh against version 9.3.0.0 (16) and its built-in PostGIS 2.1 and hstore.

    It aborts when trying to create the simple_polys table with the error

    ERROR: function area(geometry) does not exist
    LINE 6: area(ST_MakePolygon(linestring)) as area
    ^
    HINT: No function matches the given name and argument types. You might need to add explicit type casts.

    Later on, there are complaints about npoints(geometry), isclosed(geometry), issimple(geometry), etc.

    Can anybody help?

    (BTW: I'm running the script under Mac OS. I installed the gnu fileutils version of du to get the required options)

     
  • Mayeul

    Mayeul - 2013-09-11

    Hi!
    Thanks for reporting. I developped and use it on older versions of postgre and postgis. area() is now deprecated, as well as a few other functions. See:
    http://postgis.net/docs/ST_Area.html
    If you look up for the other errors at http://postgis.net/docs/reference.html
    you'll find the new function names. Should often be ST_Oldname
    don't hesitate to put your trials here; if it work I'll integrate it? thks again!
    Hope it helps,
    Mayeul

     
  • Martin Giese

    Martin Giese - 2013-09-12

    Thanks for the quick answer! I'm a complete newbie at PostGIS...

    So yes, adding ST_ to all the missing functions did the trick!

    Now I get lots of these:

    ERROR: operator does not exist: unknown => unknown
    LINE 1: ...fee' WHERE class IS NULL AND tagshstore @> ('fee' => 'yes') ...

    I don't think ST_=> will help this time!

    Martin

     
  • Martin Giese

    Martin Giese - 2013-09-12

    Ah! Figured it out myself:

    replace all ('foo' => 'bar') by hstore('foo','bar')

    Now I'm left with one error:

    ERROR: integer out of range

    That comes from this line:

    UPDATE nodes_with_tags SET idint4 = id;

    Should something be changed to 64bit here? Maybe?

    Martin

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.