[OSM-dev] PostGIS dump
jburgess777 at googlemail.com
Sun Mar 25 22:42:35 BST 2007
On Sun, 2007-03-25 at 21:02 +0000, Martin Spott wrote:
> Jon Burgess wrote:
> > On Sun, 2007-03-25 at 20:29 +0000, Martin Spott wrote:
> > > Jon Burgess wrote:
> > >
> > > > I've put a change into the experimental version which should ensure that
> > > > the polygon table contains only polygons.
> > >
> > > Stable Experimental
> > > planet_osm_line 341883 343729
> > > planet_osm_point 102685 102685
> > > planet_osm_polygon 167291 12038
> > >
> > >
> > Do you run the setup_z_order.sql script on the 'stable' version?
> No, just UTFsanitize and 'osm2pgsql',
The setup_z_order.sql script does...
$ delete from planet_osm_polygon where "natural" = 'coastline';
The experimental version does this as part of the import. Discarding the
coastline leaves the following entries in the planet_osm_ploygon table:
gis=> select count (*) from planet_osm_polygon where "natural" is NULL or "natural"<>'coastline';
Which is still a difference of 1842 over the experimental version. The
experimental version fixes the issue which causes LINESTRING to end up
in the polygon table, taking this into account...
gis=> select count(geometrytype(way)),geometrytype(way) from planet_osm_polygon where "natural" is NULL or "natural"<>'coastline' group by geometrytype(way);
count | geometrytype
1843 | LINESTRING
12037 | POLYGON
This is still off by 1, but certainly explains the large differences in
the polygon count. Similarly most of the difference in the line count is
due to these LINESTRING moving from the polygon tablle (1846 is the
differences between the two versions in your results, which almost
matches 1843 here).
I don't know about the remaining difference of 1 polygon and 3 lines.
Probably some other minor edge case.
More information about the dev