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

migrate priority datasets into database #1

Open
3 tasks
bbest opened this issue Jan 24, 2022 · 1 comment
Open
3 tasks

migrate priority datasets into database #1

bbest opened this issue Jan 24, 2022 · 1 comment

Comments

@bbest
Copy link
Contributor

bbest commented Jan 24, 2022

Priority databases to migrate

  • hydrographic
  • larval fish
  • zooplankton: only krill, or all?
@bbest bbest changed the title database migration migrate priority datasets into database Jan 24, 2022
@bbest
Copy link
Contributor Author

bbest commented Apr 20, 2022

Loading spatial data for vector tiles, starting with sanctuaries

To get this sanctuaries to load into tile.calcofi.io after loading the spatial features into the database:

Ran the following SQL in DBeaver:

SELECT UpdateGeometrySRID('aoi_fed_sanctuaries','geom',4326);

after checking with:

SELECT
	nspname AS SCHEMA,
	relname AS TABLE,
	relkind, 
	typname, 
	attname AS geometry_column,
	postgis_typmod_srid (atttypmod) AS srid,
	postgis_typmod_type (atttypmod) AS geometry_type
FROM
	pg_class c
	JOIN pg_namespace n ON (c.relnamespace = n.oid)
	JOIN pg_attribute a ON (a.attrelid = c.oid)
	JOIN pg_type t ON (a.atttypid = t.oid)
WHERE
  relkind IN('r', 'v', 'm') AND 
  typname = 'geometry' AND 
  postgis_typmod_srid (atttypmod) != 0 AND
  relname = 'aoi_fed_sanctuaries';

References:

  • pg_tileserv
    A very thin PostGIS-only tile server in Go. Takes in HTTP tile requests, executes SQL, returns MVT tiles.
  • PostGIS: UpdateGeometrySRID

@bbest bbest added this to Management Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Status: No status
Development

No branches or pull requests

1 participant