I'm trying to export a .geojson file as a shapefile but I get an error stating that "Unsupported type for field style". Any solution to that?
-
Welcome to Geographic Information Systems! Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short tour for more about how the site works– Ian TurtonCommented Jul 12, 2022 at 7:31
-
1what types does your input file have in it?– Ian TurtonCommented Jul 12, 2022 at 7:31
-
Shapefile does not support datetime field type: do you have such a field in your layer?– BabelCommented Jul 12, 2022 at 7:49
Add a comment
|
1 Answer
In QGIS, make sure to check the option "Use Key/Value" for the field concerned ('style' in your case) when exporting a GeoJSON file into an ESRI shapefile.
Otherwise, you'll get an Error: Unsupported type for field prop1
-
1How can make this checkbox acvtive while using pyqgis? I mean, probably this codeblock gives same error beacuse of same issue: >>> layer = iface.layerTreeView().selectedLayers()[0] >>> QgsVectorFileWriter.writeAsVectorFormat(layer, outfile, 'utf-8', 'GeoJSON') (4, 'Unsupported type for field extra') what should do in this case? Commented May 12, 2023 at 7:58
-