kartoza / fbf-project

Project data and resources for WB Forecast Based Financing work
23 stars 15 forks source link

Flood uploader not working #71

Closed timlinux closed 4 years ago

timlinux commented 4 years ago

image

Just sits there when I press upload. I used the attached json

timlinux commented 4 years ago

flood_classes.geojson.zip

lucernae commented 4 years ago

@timlinux your flood contains Polygon feature while the database uses MultiPolygon geometry.

Try this one: https://raw.githubusercontent.com/kartoza/fbf-project/develop/Datasets/Flood/flood_classes/flood_classes.geojson

lucernae commented 4 years ago

Perhaps we need to add these validations:

NyakudyaA commented 4 years ago

@lucernae when you insert the geometry you just need to cast the geometry as multi ie

insert into foo (id, geom)
select id, st_multi(geom) as geom from foobar
lucernae commented 4 years ago

yeah but we are posting the feature thru PostgREST, I don't know if I was able to fix it using SQL.