[OSM-dev] Writing an OSM map application

Andreas Volz lists at brachttal.net
Thu Mar 29 12:59:47 BST 2007


Am Thu, 29 Mar 2007 13:53:45 +0200 schrieb Andreas Volz:

> Am Fri, 23 Mar 2007 19:52:29 +0000 schrieb Keith Sharp:
> 
> > On Fri, 2007-03-23 at 20:26 +0100, Andreas Volz wrote:
> > > Hello,
> > > 
> > > I like to write an application that uses the map data from OSM. I
> > > looked how other applications solved this. They import the
> > > world.osm into a SQL database an read all map information from
> > > there. So please try to answer these OSM beginner questions:
> > > 
> > > - Is there a proposed SQL database format for OSM based maps? This
> > > would be usefull to share end user generated map data between
> > > various systems.
> > 
> > I use PostGIS on top of PostgreQL.  The table format is defined by
> > the import tool, see below.
> > 
> > > - Is there an application which converts the world.osm into a SQL
> > > database?
> > 
> > If you use PostGIS then you want osm2pgsql:
> > 
> > 	http://svn.openstreetmap.org/utils/osm2pgsql/
> 
> I've still problems with osm2pgsql. I installed postgres and postgis
> on Gentoo. I started the postgres service. Then I created a database
> "osm" ,a psql user and executed this:
> 
> > psql -d osm < germany-070321.sql

Hmpf, I should read before post:

--------------------------------
Now load the PostGIS object and function
definitions into your database by loading the lwpostgis.sql definitions
file.

# psql -d [yourdatabase] -f lwpostgis.sql

The PostGIS server extensions are now loaded and ready to use.
#

For a complete set of EPSG coordinate system definition identifiers,
you can also load the spatial_ref_sys.sql definitions file and populate
the SPATIAL_REF_SYS table.

# psql -d [yourdatabase] -f spatial_ref_sys.sql
--------------------

Now it works nice.

regards
Andreas




More information about the dev mailing list