go-spatial / tegola-postgis

A version of of tegola that that leverages PostGIS ST_AsMVT
MIT License
6 stars 2 forks source link

Should we merge mvt_provider and proviers config options. #4

Open gdey opened 4 years ago

gdey commented 4 years ago

Should be remove mvt_provider, and have the provider register it's self as an mvt type of provider.

i.e.

[[mvtproviders]]
name = "test_postgis"       # provider name is referenced from map layers (required)
type = "postgis_mvt"            # the type of data provider must be "postgis" for this data provider (required)
host = "localhost"          # PostGIS database host (required)
port = 5432                 # PostGIS database port (required)
database = "tegola"         # PostGIS database name (required)
user = "tegola"             # PostGIS database user (required)
password = ""               # PostGIS database password (required)

There are some things to note about this approach.

  1. The provider needs to that it's an MVT provider (this could be done by look to see if it supports the mvt_provider interface)

  2. Documentation can be confusing as mvt providers can not conflate with other providers.

ARolek commented 4 years ago

I think it would be ideal if we could just use the type property and not need to introduce a new top-level provider concept. It would also get rid of the mvt_ prefix that needs to be added to map layers.

Regarding conflation, we can't conflate at this time, but we have talked about ways to make conflating possible so it's not entirely a blocker long term.