On Tue, 2009-03-10 at 16:25 +0530, Kenneth Gonsalves wrote:
> On Tuesday 10 March 2009 14:20:41 you wrote:
> > On Tue, 2009-03-10 at 06:26 +0530, Kenneth Gonsalves wrote:
> > > On Tuesday 10 March 2009 00:19:03 you wrote:
> > > > The most likely problem is that you have not used an up to date copy of
> > > > default.style when running the osm2pgsql import. If so, you may be
> > > > missing some of the columns in the DB tables and Mapnik will silently
> > > > fail to render any layer which references the missing data.
> > >
> > >  I did not see any mention anywhere of default.style when running the
> > > import - could you elaborate please.
> >
> > osm2pgsql has the following option:
> >    -S|--style           Location of the style file. Defaults to
> > ./default.style
> >
> > The default.style file has a list of the keys which it will import into
> > the postgresql database like:
> >
> > node,way   admin_level  text         linear
> > node,way   aerialway    text         linear
> > node,way   aeroway      text         polygon
> > node,way   amenity      text         nocache,polygon
> >
> > There is a better description of this file in the comments [1].
> >
> > As new fields are added into the osm.xml, each new column must be added
> > into the default.style too. To use the latest osm.xml you also need to
> > use the latest default.style when importing the data.
> 
> I do not have access to the server to try this out, but the problem appears 
> more complex. I have the same set up on fedora10 (local machine) and lenny 
> (remote server). The rendering on the local machine is perfect. On the remote 
> machine it is defective - not only missing symbols, but even the roads are 
> the 
> wrong colour. The osm.xml files are the same and the india.osm file imported 
> into the db is the same - and the same syntax was used with osm2pgsql to 
> import it. I am attaching two screenshots to show the difference. I *must* be 
> missing something in the lenny install

I think I know the cause. I just saw the very similar looking tiles 
when doing some local rendering after picking up the latest osm.xml
file.

You are probably missing the column named "construction" in your
database. See whether executing the following commands in your DB fixes
it:

$ psql gis
...
gis=> alter table planet_osm_point add column "construction" text;
ALTER TABLE
Time: 284.689 ms
gis=> alter table planet_osm_line add column "construction" text;
ALTER TABLE
Time: 76.898 ms
gis=> alter table planet_osm_roads add column "construction" text;
ALTER TABLE
Time: 9.854 ms
gis=> alter table planet_osm_polygon add column "construction" text;
ALTER TABLE
Time: 34.955 ms


If you update the osm2pgsql SVN to the latest version you should see the
default.style now has a construction column (since r13945). Whenever you
pick up a new osm.xml style it is important to note if there are any
changes in the osm2pgsql default.style file. If there are, then you
probably need to re-import your rendering DB. Alternatively a tweak like
the commands above will add the new column, which should fix the
rendering, but the data in the new column will just be empty until you
run the import again.

        Jon



_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk

Reply via email to