I uploaded a shape file to cartodb
then I exported it as a csv
Now I want to load it from the csv file (I'm studying how to generate a csv like that from other sources)
I have a geojson strng column with all the info of the geometry (a polygon)
then I try to update the_geom with a query like this:
update paisprov2012 set
the_geom = st_setsrid(st_geomfromgeojson(geojson),4326)
And I get this error:
ERROR: Geometry type (MultiPolygon) does not match column type (Point)
SO I try with
ALTER TABLE paisprov2012 ALTER COLUMN the_geom TYPE Polygon using the_geom::Polygon
But I get a
ERROR: cannot cast type geometry to polygon
Any idea?