tegola icon indicating copy to clipboard operation
tegola copied to clipboard

Clipped polygon

Open pnorman opened this issue 6 years ago • 6 comments

image

These are water polygons, and the island just north of the middle is clipped. The location is 7/48.945/-123.437 and the data is ne_ocean from Natural Earth.

I'm having trouble debugging it since I'm not sure how to get what tile it is, where the tile bounds are, etc.

pnorman avatar Feb 24 '18 01:02 pnorman

@pnorman you can add ?debug=true to the URL (i.e. http://localhost:8080/?debug=true#7/48.945/-123.437) to encode tile outlines and a z/x/y into a point in the cent of the tile. Then you can inspect the tile.

I assume this is on v0.5.0. A lot of rendering issues were fixed in v0.6.0. Can you build off that branch and see if the same issue is happening? Build instructions

ARolek avatar Feb 24 '18 03:02 ARolek

I assume this is on v0.5.0. A lot of rendering issues were fixed in v0.6.0. Can you build off that branch and see if the same issue is happening? Build instructions

I tried under 0.6.0 but it might have had a cached tile, so retesting.

pnorman avatar Feb 24 '18 17:02 pnorman

It still happens with fd14038, and it's right on the edge between 5/5/10 and 5/5/11.

My immediate guess is an interaction between different simplification on different tiles, these being water polygons, not land polygons, and handling of the edges of tiles.

pnorman avatar Feb 24 '18 17:02 pnorman

Just for reference, these are the holes in the polygon

image

pnorman avatar Feb 26 '18 00:02 pnorman

@pnorman just to confirm you're using the Natural Earth Ocean data v4.0.0?

ARolek avatar Feb 26 '18 00:02 ARolek

I am specifically using http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/physical/ne_50m_ocean.zip

I first do CREATE SCHEMA IF NOT EXISTS loading; in PostgreSQL, then call ogr2ogr -f PostgreSQL -lco GEOMETRY_NAME=way -lco SPATIAL_INDEX=FALSE -lco EXTRACT_SCHEMA_FROM_LAYER_NAME=YES -nln loading.ne_ocean --config SHAPE_ENCODING WINDOWS-1252 -explodecollections -t_srs EPSG:3857 -clipsrc -179.999999999 -85.05112877980659 179.999999999 85.05112877980659 PG:dbname=gis data/ne_ocean/ne_50m_ocean.shp

PostGIS post-processing is

ALTER TABLE "loading"."ne_ocean" SET ( autovacuum_enabled = FALSE );
ALTER TABLE "loading"."ne_ocean" DROP COLUMN ogc_fid;
DELETE FROM "loading"."ne_ocean" WHERE way IS NULL;
ALTER TABLE "loading"."ne_ocean" ALTER COLUMN way SET NOT NULL;
CREATE INDEX "ne_ocean_geohash"
  ON "loading"."ne_ocean"
  (ST_GeoHash(ST_Transform(ST_Envelope(way),4326),10) COLLATE "C");
CLUSTER "loading"."ne_ocean" USING "ne_ocean_geohash";
DROP INDEX "loading"."ne_ocean_geohash";
CREATE INDEX ON "loading"."ne_ocean" USING GIST (way) WITH (fillfactor=100);
ANALYZE "loading"."ne_ocean"
ALTER TABLE "loading"."ne_ocean" SET ( autovacuum_enabled = FALSE );

pnorman avatar Feb 26 '18 01:02 pnorman