cedardevs / onestop

OneStop is a data discovery system being built by CIRES researchers on a grant from the NOAA National Centers for Environmental Information. We welcome contributions from the community!
GNU General Public License v2.0
44 stars 20 forks source link

SME support to populate a spatial database #1239

Open dneufeldcu opened 4 years ago

dneufeldcu commented 4 years ago

Summary

As a GIS developer and web map viewer supporter
I want to be able to display spatial data associated with granule level data stored in files
So that I can link in my GIS web mapping stack and allow fine grained spatial data search capabilities

Tasks

Reference

erinreeves commented 4 years ago

https://github.com/cedardevs/onestop-clients/tree/master/python-client#how-to-publish-a-new-version-of-this-client

JeffreyHuynh1 commented 3 years ago

Was getting a lot of errors trying to install psycopg2, fixed it with this command in pycharm terminal -env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip install psycopg2

JeffreyHuynh1 commented 3 years ago

You can create postgres tables that allow for postgis in python code, but using the pgadmin UI for the time being

JeffreyHuynh1 commented 3 years ago

In order to use postgis extension I need to be a superuser. Getting the following error 'ERROR: permission denied to create extension "postgis" HINT: Must be superuser to create this extension.'

Tried using 'ALTER ROLE onestop SUPERUSER; ' but got the following error 'ERROR: must be superuser to alter superusers'

Found some docs suggesting to use : su postgres psql alter role user_name superuser;

then create the extension as the user in a different screen

alter role user_name nosuperuser;

Unsure about how to incorporate this with docker though

SOLUTION: Created credentials via helm to log into the default superuser role which is 'postgress'. Was able to use the postgis extension on tables after this.

JeffreyHuynh1 commented 3 years ago

Geometry points in postgis will be displayed as hex. To change the hex into a tuple for a viewable format, you can use the query command