Closed abarciauskas-bgse closed 1 year ago
I started to try and run tifeatures locally and I'm getting this error: asyncpg.exceptions.UndefinedTableError: relation "geometry_columns" does not exist
Also note I had to install postgis extension on my database. The tifeatures documentation may be incomplete as the setup locally does not include much instructions about how to setup the local postgres postgis database.
I was able to get the tifeatures app to run locally after running these commands:
➜ psql postgis
psql (14.1, server 14.5 (Homebrew))
Type "help" for help.
postgis=# CREATE EXTENSION postgis;
CREATE EXTENSION
with DATABASE_URL=postgresql://postgres:@0.0.0.0:5432/postgis
and then I was able to insert into the database using:
ogr2ogr -f "PostgreSQL" \
PG:"host=0.0.0.0 dbname=postgis user=postgres" \
-t_srs EPSG:4326 \
"../veda-documentation/fireline.fgb" \
-nln fire_boundearies_2019
sorry about that @abarciauskas-bgse, I'll try to update the documentation.
FYI: We are moving away from tifeatures/timvt to https://github.com/developmentseed/tipg (empty for now) which will have both mvt and features endpoints.
Nice example, @abarciauskas-bgse!
Let me know when it would make sense to replace the ogr2ogr
upload by a Python solution, for example with GeoDatatFrame.to_postgis
. Should be pretty straightforward.
@vincentsarago oh I wasn't expecting the documentation to be complete btw :) I realize that some of the "setup postgis" is left as an exercise to the reader (and I am a novice postgis user)
I started to lookinto using GeoDataFrame.to_postgis but an error arose, see: https://github.com/NASA-IMPACT/veda-features-api/blob/ab/add-features-script/scripts/add_fire_features.ipynb
Also recapping some discussion from slack with Alexey, Bitnerd and Alex M:
eis_fire_perimeter
, eis_fire_fireline
, eis_fire_new_fire_pixels
. Data from different years should be appended to the appropriate table.
AC:
eis_fire_perimeter, eis_fire_fireline, eis_fire_new_fire_pixels
data including datetime columnDetails
Current state:
tifeatures-timvt-staging