Geographic Information Systems Asked on September 19, 2020
Im trying to convert geojson file to shapefile. Below is the code
import ogr2ogr
import json
def main():
#note: main is expecting sys.argv, where the first argument is the script name
#so, the argument indices in the array need to be offset by 1
ogr2ogr.main(["","-f","ESRI Shapefile","I:/shapefile/json_output.shp","I:/json_output.json -overwrite engine=GeoJSON"])
if __name__ == '__main__':
main()
I get the following error
Unable to open datasource `I:/json_output.json -overwrite engine=GeoJSON' with the following drivers.
-> PCIDSK
-> netCDF
-> JP2ECW
-> JP2OpenJPEG
-> JPEG2000
-> DB2ODBC
-> ESRI Shapefile
-> MapInfo File
-> UK .NTF
-> OGR_SDTS
-> S57
-> DGN
-> OGR_VRT
-> REC
-> Memory
-> BNA
-> CSV
-> GML
-> GPX
-> LIBKML
-> KML
-> GeoJSON
-> OGR_GMT
-> GPKG
-> SQLite
-> ODBC
-> WAsP
-> PGeo
-> MSSQLSpatial
-> PostgreSQL
-> OpenFileGDB
-> XPlane
-> DXF
-> Geoconcept
-> GeoRSS
-> GPSTrackMaker
-> VFK
-> PGDUMP
-> OSM
-> GPSBabel
-> SUA
-> OpenAir
-> OGR_PDS
-> WFS
-> HTF
-> AeronavFAA
-> Geomedia
-> EDIGEO
-> GFT
-> SVG
-> CouchDB
-> Cloudant
-> Idrisi
-> ARCGEN
-> SEGUKOOA
-> SEGY
-> XLS
-> ODS
-> XLSX
-> ElasticSearch
-> Walk
-> Carto
-> AmigoCloud
-> SXF
-> Selafin
-> JML
-> PLSCENES
-> CSW
-> VDV
-> TIGER
-> AVCBin
-> AVCE00
-> HTTP
I tried the following link
Unable to open datasource 'MySQL' using ogr2ogr but no luck. Please help!!
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP