[OSM-dev] Writing an OSM map application

Jon Burgess jburgess777 at googlemail.com
Sat Mar 24 22:35:58 GMT 2007


On Sat, 2007-03-24 at 22:28 +0100, Andreas Volz wrote:
> Am Sat, 24 Mar 2007 16:00:59 +0000 schrieb Jon Burgess:
> 
> > On Sat, 2007-03-24 at 16:21 +0100, Andreas Volz wrote:
> > > Am Fri, 23 Mar 2007 19:52:29 +0000 schrieb Keith Sharp:
> > > 
> > > > I use PostGIS on top of PostgreQL.  The table format is defined
> > > > by the import tool, see below.
> > > 
> > > I installed PostGIS on my machine.
> > > 
> > > > > - 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/
> > > > 
> > > > or as an RPM from:
> > > > 
> > > > 	http://www.passback.org.uk/maps/rpms/
> > > 
> > > Is there also an Gentoo ebuild available? 
> > > 
> > 
> > Not that i'm aware of. If someone volunteers to generate a suitable
> > package and makes it available then please email the osm-dev list.
> > 
> > > I tried to build it with the Makefile and got as result:
> > > 
> > > g++ -g -O2 -Wall -DGEOS_INLINE    -c -o build_geometry.o
> > > build_geometry.cpp build_geometry.cpp:26:39: error:
> > 
> > ...
> > 
> > > > eix geos
> > > * sci-libs/geos 
> > >      Available versions:  2.2.1 2.2.3 ~3.0.0_rc3
> > >      Installed:           2.2.3
> > >      Homepage:            http://geos.refractions.net
> > >      Description:         Geometry Engine - Open Source
> > > 
> > > Do I need a more recent geos version? I think it doesn't hurt to
> > > document the needed library versions. :-)
> > > 
> > 
> > geos-2.2 should work. I've committed a change to SVN which should
> > allow the code to compile automatically with both geos-2.2 and geos-3
> > without needing a Makefile flag. 
> > 
> > I've also added some notes into the readme.txt about building the code
> > and the libraries required.
> 
> Thanks, now it works! I'll create a Gentoo ebuild if I've time for it.
> 
> Is it possible to use only the germany.osm instead of world.osm if I
> need germany only?

Sure, you can load whatever .osm file that you feel like. The resulting
mapnik output will obviously just contain the data from your .osm file. 

The only restriction is the the osm file should be 'correctly' order in
the sequence: nodes, segments, ways. The planet.osm and josm output
files are fine. The planetosm-excerpt-tags.pl script writes its output
in the order: ways, segments, nodes and this confuses the old osm2pgsql
code (I think the experimental version should produce the correct output
in this case).

	Jon






More information about the dev mailing list