postgresql - importing osm file into a postgres/postgis database -


im using tool osm2pgsql import osm file postgres database using phppgadmin administrative tool. have downloaded small town osm in xml format , im having trouble importing using terminal on mac. im bit of noob @ appreciated. ive looked @ several articles none provide clarity need in order fulfill needs.

thanks

im getting error small not sure..

using projection srs 900913 (spherical mercator) setting table: planet_osm_point notice:  table "planet_osm_point" not exist, skipping notice:  table "planet_osm_point_tmp" not exist, skipping select addgeometrycolumn('planet_osm_point', 'way', 900913, 'point', 2 );  failed: error:  function addgeometrycolumn(unknown, unknown, integer, unknown,     integer) not exist line 1: select addgeometrycolumn('planet_osm_point', 'way', 900913, ...            ^ hint:  no function matches given name , argument types. might need add explicit type casts. 

you need install postgis extensions postgres database. assuming have postgis installed on machine need like:

psql <database> < /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql 

the exact path postgis.sql depend on distribution using , how has packaged postgis. may want/need install spatial reference systems table command this:

psql <database> < /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -