Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge TiFeatures and TiMVT #1

Closed
11 of 12 tasks
bitner opened this issue Nov 28, 2022 · 3 comments · Fixed by #74
Closed
11 of 12 tasks

Merge TiFeatures and TiMVT #1

bitner opened this issue Nov 28, 2022 · 3 comments · Fixed by #74
Assignees

Comments

@bitner
Copy link
Contributor

bitner commented Nov 28, 2022

Initial checklist for Merging TiFeatures and TiMVT into TiPG

TiPG is intended to merge the features of TiFeatures and TiMVT into a project in order to reduce duplication between the two projects.

  • Fork TiFeatures into TiPG
  • Rename directories and references in code from tifeatures to tipg
  • Rename environment variables from TIFEATURES to TIPG
  • Make sure TiFeatures Tests Pass
  • Move basic Table layers from TiMVT to TiPG
  • Move TMS endpoints from TiMVT to TiPG
  • Cherry Pick Functions work from Funcs tifeatures#70
  • Add tests for using Functions
  • Update documentation to change references from TiFeatures to TiPG
  • Move documentation from TiMVT and update to reference TiPG
  • Make sure that endpoints for combined OGC Features / OGC Vector Tiles matches most recent OGC spec
  • Make sure that all dependencies (including dev, test) are included and up to date
@bitner
Copy link
Contributor Author

bitner commented Nov 28, 2022

Function introspection in this branch is working and looks for any function that matches this signature:

  1. Set Returning Function
  2. All function input parameters must be named

In an empty PostgreSQL database with PostGIS installed, with no settings to change what schemas/tables/functions are whitelisted, the following native PostGIS functions will be made available:

  1. st_squaregrid(size, bounds)
  2. st_hexagongrid(size, bounds)

Note that with this set up, the functions are expected to return geometry and when vector tiles are requested, TiPG will automatically wrap the function with calls to ST_ASMVT/ST_ASMVTGEOM.

@vincentsarago
Copy link
Member

@bitner I think the last missing piece is custom function support.

TODO

@bitner
Copy link
Contributor Author

bitner commented Jan 4, 2023

@bitner I think the last missing piece is custom function support.

TODO

I don't actually like the file based function support. The "idea" of this library (at least to me) is that it never writes/changes anything in the database and that you should manage tables/functions directly in the database. My opinion (not strongly held, so definitely willing to consider the file based functions) is that TiPG should be able to fully run as a Read Only user (this would change if we add transaction support to tables). Ideally, for security, the user that TiPG connects as should not have the ability (even if we add transaction support) to create/drop any new tables/views/functions. I know that this will hardly ever be the case and most people will just be deploying using an admin user, but I'd still like to see us encouraging that best practice and the file based functions runs counter to that.

bitner pushed a commit that referenced this issue Feb 22, 2023
merge the test fix into my fork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants