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)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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)
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
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
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