[postgis-users] ST_Simplify and projections

Sandro Santilli strk at keybit.net
Thu Jan 10 07:22:59 PST 2013


On Thu, Jan 10, 2013 at 12:35:45PM +0100, Paolo Crosato wrote:
> Il 09/01/2013 19:02, Sandro Santilli ha scritto:
> >On Wed, Jan 09, 2013 at 06:30:03PM +0100, Paolo Crosato wrote:
> >
> >>test the function against
> >>the whole european set in order to have any answer, and it's still
> >>building the topology :)
> >I hope you're doing it in some incremental way, or the first problem
> >is going to rollback the whole work.
> >(I feel your pain)
> >
> 
> Well I tried to load the whole thing at once, and it's still loading
> after more then 24hrs eh eh!
> The dataset I'm working with has around 90k features (multipolygon)
> and 37 million vertexes.
> I can partion it let's say by country and load one country by one,
> but would calling toTopoGeom
> in the same topology in this way work incrementally?

Yes, that's the whole point of the function (and underlying primitives)

> It seems so.  My idea is to partition the eu table in one table for
> each country, then load it one by one to the same topology, like
> this:
> 
> SELECT CreateTopology('eu_geom_topo', find_srid('public', 'eu_geom',
> 'geom'));
> foreach $country
>     SELECT AddTopoGeometryColumn('eu_geom_topo', 'public',
> '$country_geom', 'topogeom', 'MULTIPOLYGON');
>     UPDATE $country_geom SET topogeom = toTopoGeom(geom,
> 'eu_geom_topo', 1);
> 
> Would this work? Edges of adjacent polygons are identical, the whole
> set of polygonal geometries is built from a topology by the vendor.

Interesting layout. Yes, it should work.
My usual approach is to use a WHERE clause to partition
the work, just to keep things simpler, but your way is
also fine.

--strk;


More information about the postgis-users mailing list