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

Not able to access my postgres data after running project #80

Open
krishnaglodha opened this issue Jun 16, 2023 · 17 comments
Open

Not able to access my postgres data after running project #80

krishnaglodha opened this issue Jun 16, 2023 · 17 comments

Comments

@krishnaglodha
Copy link
Contributor

I've created .env file

TIPG_NAME="OGC Features and Tiles API - Krishna"
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
  1. I'm not able to see my layers in collection
  2. and when I click on collection, I'm getting following error
Screenshot 2023-06-15 at 5 05 17 PM
@vincentsarago
Copy link
Member

@krishnaglodha can you enable debug
TIPG_DEBUG=TRUE
and show the content of /rawcatalog

also the content of /collections/public.countries/queryables

@krishnaglodha
Copy link
Contributor Author

Hi , response of /rawcatalog is added as attachment
rawcatalog.json.zip

and response for /collections/public.countries/queryables is as follows


[geom](https://geojson.org/schema/MultiPolygon.json)
ABBREV: string
ABBREV_LEN: number
ADM0_A3: string
ADM0_A3_AR: string
ADM0_A3_BD: string
ADM0_A3_BR: string
ADM0_A3_CN: string
ADM0_A3_DE: string
ADM0_A3_EG: string
ADM0_A3_ES: string
ADM0_A3_FR: string
ADM0_A3_GB: string
ADM0_A3_GR: string
ADM0_A3_ID: string
ADM0_A3_IL: string
ADM0_A3_IN: string
ADM0_A3_IT: string
ADM0_A3_JP: string
ADM0_A3_KO: string
ADM0_A3_MA: string
ADM0_A3_NL: string
ADM0_A3_NP: string
ADM0_A3_PK: string
ADM0_A3_PL: string
ADM0_A3_PS: string
ADM0_A3_PT: string
ADM0_A3_RU: string
ADM0_A3_SA: string
ADM0_A3_SE: string
ADM0_A3_TR: string
ADM0_A3_TW: string
ADM0_A3_UA: string
ADM0_A3_UN: number
ADM0_A3_US: string
ADM0_A3_VN: string
ADM0_A3_WB: number
ADM0_DIF: number
ADM0_DIFF: string
ADM0_ISO: string
ADM0_TLC: string
ADMIN: string
BRK_A3: string
BRK_DIFF: number
BRK_GROUP: string
BRK_NAME: string
CONTINENT: string
ECONOMY: string
FCLASS_AR: string
FCLASS_BD: string
FCLASS_BR: string
FCLASS_CN: string
FCLASS_DE: string
FCLASS_EG: string
FCLASS_ES: string
FCLASS_FR: string
FCLASS_GB: string
FCLASS_GR: string
FCLASS_ID: string
FCLASS_IL: string
FCLASS_IN: string
FCLASS_ISO: string
FCLASS_IT: string
FCLASS_JP: string
FCLASS_KO: string
FCLASS_MA: string
FCLASS_NL: string
FCLASS_NP: string
FCLASS_PK: string
FCLASS_PL: string
FCLASS_PS: string
FCLASS_PT: string
FCLASS_RU: string
FCLASS_SA: string
FCLASS_SE: string
FCLASS_TLC: string
FCLASS_TR: string
FCLASS_TW: string
FCLASS_UA: string
FCLASS_US: string
FCLASS_VN: string
FIPS_10: string
FORMAL_EN: string
FORMAL_FR: string
GDP_MD: number
GDP_YEAR: number
GEOUNIT: string
GEOU_DIF: number
GU_A3: string
HOMEPART: number
INCOME_GRP: string
ISO_A2: string
ISO_A2_EH: string
ISO_A3: string
ISO_A3_EH: string
ISO_N3: string
ISO_N3_EH: string
LABELRANK: number
LABEL_X: number
LABEL_Y: number
LEVEL: number
LONG_LEN: number
MAPCOLOR13: number
MAPCOLOR7: number
MAPCOLOR8: number
MAPCOLOR9: number
MAX_LABEL: number
MIN_LABEL: number
MIN_ZOOM: number
NAME: string
NAME_ALT: string
NAME_AR: string
NAME_BN: string
NAME_CIAWF: string
NAME_DE: string
NAME_EL: string
NAME_EN: string
NAME_ES: string
NAME_FA: string
NAME_FR: string
NAME_HE: string
NAME_HI: string
NAME_HU: string
NAME_ID: string
NAME_IT: string
NAME_JA: string
NAME_KO: string
NAME_LEN: number
NAME_LONG: string
NAME_NL: string
NAME_PL: string
NAME_PT: string
NAME_RU: string
NAME_SORT: string
NAME_SV: string
NAME_TR: string
NAME_UK: string
NAME_UR: string
NAME_VI: string
NAME_ZH: string
NAME_ZHT: string
NE_ID: number
NOTE_ADM0: string
NOTE_BRK: string
POP_EST: number
POP_RANK: number
POP_YEAR: number
POSTAL: string
REGION_UN: string
REGION_WB: string
SOVEREIGNT: string
SOV_A3: string
SUBREGION: string
SUBUNIT: string
SU_A3: string
SU_DIF: number
TINY: number
TLC: string
TLC_DIFF: string
TYPE: string
UN_A3: string
WB_A2: string
WB_A3: string
WIKIDATAID: string
WOE_ID: number
WOE_ID_EH: number
WOE_NOTE: string
featurecla: string
fid: number
scalerank: number

@vincentsarago
Copy link
Member

Interesting, it might be a lower/upper case issue 👀

@krishnaglodha
Copy link
Contributor Author

krishnaglodha commented Jun 19, 2023 via email

@vincentsarago
Copy link
Member

vincentsarago commented Jun 19, 2023

But I’m more interesting in knowing how can I connect my PG to it

sure, I'll try to see if I can find if there is a bug somewhere ;-)

@krishnaglodha do you have other table in your database? does tipg has the same issue with the other tables?

@krishnaglodha
Copy link
Contributor Author

krishnaglodha commented Jun 19, 2023 via email

@vincentsarago
Copy link
Member

@krishnaglodha https://stackoverflow.com/questions/20878932/are-postgresql-column-names-case-sensitive is interesting

Looking at https://github.com/developmentseed/tipg/blob/main/data/countries.sql, the columns are set to be in lower case, so I'm not sure why yours are in uppercase type 🤷

do you get the same error for public.landsat_wrs ?

also what is your system info?

@krishnaglodha
Copy link
Contributor Author

Hi @vincentsarago , I'm not able to fetch public.landsat_wrs
Screenshot 2023-06-20 at 10 04 48 AM

Also as of now I'm not able to connect to database, thus not sure how case sensitivity is handled.

System : Macbook pro M1 max

@vincentsarago
Copy link
Member

@krishnaglodha it's pretty hard for me to debug 🤷

I assumed you were using docker but looking at the postgres url you shared in #80 (comment) it seems you're trying to connect to your local postgres.

Looking at your rawcatalog, you don't have public.landsat_wrs (because it's one table that we load into the postgres we set when using docker-compose 😅 ) but you have public.raster_columns, you should be able to access it.

As for the countries table, I'm not sure how you ingested it into your postgres database but there is def something wrong with the column (maybe @bitner has an idea)

@krishnaglodha
Copy link
Contributor Author

I think the countries table it is referring to is from local storage not PG

@krishnaglodha
Copy link
Contributor Author

Hi @vincentsarago any updates on this ?

@vincentsarago
Copy link
Member

@krishnaglodha I have no idea what's going on I'm sorry

can you try with other tool like pg_tileserv or pg_featureserv to see if they work

@krishnaglodha
Copy link
Contributor Author

yeah pg_tileserv works fine

@krishnaglodha
Copy link
Contributor Author

Can you confirm If I'm taking correct steps https://we.tl/t-wruLsjZ8p0

@vincentsarago
Copy link
Member

thanks for the video,
everything looks good.

can you tell which version of postgres you are using?

@krishnaglodha
Copy link
Contributor Author

I'm on postgreSQL 14

@krishnaglodha
Copy link
Contributor Author

Issue is with M1 I guess , it works fine in Intel ?

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

No branches or pull requests

2 participants