[OSM-talk] SQL
Jon Burgess
jburgess777 at googlemail.com
Sun May 10 19:19:54 BST 2009
On Sun, 2009-05-10 at 13:19 +0100, Jon Burgess wrote:
> > I also tried to access "Thüringen" by its osm_id, but also no
> success.
> >
> > In "PSQL gis":
> >
> > gis=> select osm_id, name from planet_osm_polygon where name like
> > 'Thüringen'
> > limit 1000;
> > osm_id | name
> > --------+-----------
> > -76689 | Thüringen
> > (1 Zeile)
> >
> >
> > Can anybody tell me how to draw the three missing states?
> >
> > Is there an explanation why they are "missing"?
> >
>
> Since the entry is in the polygon table, the only obvious problem I
> can
> think of is the direction of the polygon, clockwise vs
> counter-clockwise. Mapnik & Postgis really want all polygons to be
> clockwise but the osm2pgsql code does not guarantee this. Try doing:
>
> $ psql gis
> gis=> update planet_osm_polygon set way=ST_Reverse(way) where
> osm_id=-76689;
>
> On older versions of postgis, ST_Reverse(way) might need to
> reverse(way).
>
This afternoon I committed a fix which should make osm2pgsql generate
all polygons with the rings in the correct direction. Try updating to
the latest SVN[1] code and importing the OSM data again.
Jon
1: The server hosting SVN and the talk mailing list is unavailable at
the moment.
More information about the talk
mailing list