go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.29k stars 197 forks source link

Missing holes from polygons #150

Closed pnorman closed 6 years ago

pnorman commented 7 years ago

With the configuration

[webserver]
port = ":9090"

[[providers]]
name = "vector_demo"    # provider name is referenced from map layers
type = "postgis"        # the type of data provider. currently only supports postgis
host = "/var/run/postgresql"        # postgis database host
port = 5432             # postgis database port
database = "osmcarto_bc"    # postgis database name
user = "pnorman"
password = ""

  [[providers.layers]]
  name = "water-lz"
  geometry_fieldname = "way"
  id_fieldname = "osm_id"
  sql = """
  SELECT
      0 AS osm_id,
      ST_AsBinary(way) AS way,
      'ocean' AS water
    FROM ne_ocean
    WHERE way && !BBOX!
  UNION ALL
  SELECT
      0 AS osm_id,
      ST_AsBinary(way) AS way,
      'lake' AS water
    FROM ne_lake
    WHERE way && !BBOX!
  """

[[maps]]
name = "vector_demo"
[[maps.layers]]
provider_layer = "vector_demo.water-lz"
min_zoom = 0
max_zoom = 5

I get

image

The problem is the missing Americas.

Not being sure if this was a problem with the qgis vector tile plugin, I downloaded the 2/0/1 tile and converted it to geojson with vt2geojson. I got the same problem.

pnorman commented 7 years ago

Note: I've included the output tiles in a comment on https://github.com/geometalab/Vector-Tiles-Reader-QGIS-Plugin/issues/81#issuecomment-332451950

ARolek commented 7 years ago

@pnorman what version of tegola are you using? v0.4.0-alpha? This could be a clipping issue that's being addressed on issue-56 branch. That one is just about ready to be merged into v0.4.0

pnorman commented 7 years ago

@pnorman what version of tegola are you using? v0.4.0-alpha?

Yes

ARolek commented 7 years ago

@pnorman ok. I think this is fixed on the issue-56 (#56) branch which is going through a round of performance optimizations right now. It looks like you're using an OSM dataset. Is this the water polygons? If not, can you send me a link to the dataset so I can run a test?

pnorman commented 7 years ago

No, there's no OSM data at that zoom, just natural earth.

https://github.com/pnorman/vector_tile_engines/tree/master/loading has the scripts to load the data. You can ignore the osm2pgsql stuff

ARolek commented 7 years ago

@pnorman can you try the new release of tegola (v0.4.0-rc1) to see if this issue has been addressed?