I have been trying to dissolve a shapefile with more than 38000 rows. I used query as follows
ogr2ogr -f "ESRI Shapefile" dissolved.shp Barangays.shp -dialect sqlite -sql "select ST_union(Geometry),* from input GROUP BY concated"
It gave me error that geometry is invalid because of self-intersecting polygons.
I found out there are 86 features which have invalid geometries using QGIS. I tried Make Valid tool as suggested in this question. But this is also not working, giving error undefined symbol, which I couldn't understand. So I decided to validate using ogr2ogr and after searching through google I tried this query
ogr2ogr -f "ESRI Shapefile" valid_barangays.shp Barangays.shp -dialect sqlite -sql "select Geometry.MakeValid(),* from Barangays"
It gave me this error
ERROR 1: In ExecuteSQL(): sqlite3_prepare(select Geometry.MakeValid(),* from Barangays):
near "(": syntax error
How can I solve this problem?
I also imported my shapefile using ogr2ogr in phpmyadmin mysql. It saved geomtry column as [geometry some_number B]. I am not able to query. I always give error function not exist.