I have a project in Tilemill (based on OSM-Bright) that covers Europe and also displays Contour-Lines. My problem is that the performance of Tilemill is pretty bad when displaying the contour lines and that the export (even only from a very small sample area) fails all the time with out-of-memory problems.
My contours are in a postgres DB imported by gdal_contour
and the table looks like this (default gdal_contour result, but I added the is_100m column and indexed it):
CREATE TABLE "public"."cont" (
"ogc_fid" INTEGER DEFAULT nextval('cont_ogc_fid_seq'::regclass) NOT NULL UNIQUE,
"wkb_geometry" "public"."geometry",
"id" NUMERIC( 8, 0 ),
"height" NUMERIC( 12, 3 ),
"is_100m" INTEGER DEFAULT '0',
PRIMARY KEY ( "ogc_fid" )
);
CREATE INDEX "cont_geom_idx" ON "public"."cont" USING gist( "wkb_geometry" );
CREATE INDEX "is_100m_idx" ON "public"."cont" USING btree( "is_100m" ASC NULLS LAST );
The is_100m
column is used for displaying 100m lines. So in Tilemill I display them differently (a bit thicker and with labels).
Is there any problem with my indexes?
The machine I am running on has the following specs:
OS: Debian Jessie/Sid in a VM (Host Kernel: 2.6.32-5 (Debian oldstable)) RAM: Host 100GB, the VM tilemill is running on: 59GB CPU: 2x Intel(R) Xeon(R) CPU X5650 (2.67GHz) -> 12 Cores. tilemill: v0.10.1-305-gb69b633 (github) nodejs: 0.10.29~dfsg-1 (Debian) postres: 9.3.4