[OSM-talk] SQL, Where are Thüringen , Bayern and Sachsen?

Torsten Mohr tmohr at s.netic.de
Sun May 10 17:13:30 BST 2009


Hello Jon,

thanks a lot for your hints.

I just tried updating the entry for Thüringen, but it did not help,
Thüringen was not drawn.

I actually tried it the way you described, in one try i had an own Layer
für Thüringen with an own Style without <Filter>.  In the Layer i changed
the SQL query to look for a special osm_id.

I also just tried in SQL:
update planet_osm_polygon set name='thueringen' where osm_id=-76689;

It seems the name was not the problem, it did not improve the issue.

One more thing i just found out:
select way from planet_osm_polygon where name='Hessen';
"way" in "Hessen" gives much more data than "way" in "Thüringen".

I don't think that entry even represents the boundary of "Thüringen".


It looks to me my question was wrong, it seems to me it should be
"Why are Thüringen, Bayern and Sachsen missing"?

Is there a way to find out which entry represents the boundarys of
the missing federal states?


Thanks for any hints,
Torsten.


Am Sonntag, 10. Mai 2009 14:19:35 schrieb Jon Burgess:
> On Sun, 2009-05-10 at 06:49 +0200, Torsten Mohr 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).
>
> > Is it possible to access parts from PostGIS by their osm_id from
> > osm.xml?
>
> Filtering on osm_id should work, but it would be better to put this into
> a WHERE osm_id=... clause in the datasource query.
>
> 	Jon





More information about the talk mailing list