I'm using ArcGIS Pro 2.0 and I've updated my system path to point to the version of Python (3.5.3) which shipped with ArcGIS Pro.
FeaturesToJSON_conversion is well documented as including a parameter for exporting to geoJSON in the new version. The desktop version of ArcPy does not include this parameter which is why I upgraded.
I receive a 999999 error when specifying
geoJSON='GEOJSON'. Just to be sure I'm using the right version of ArcPy I confirmed that it can take the parameter
I know how to do this with
ogr2ogr -f GeoJSON but I was hoping to stay in ArcPy this week.
This gives error 999999:
arcpy.FeaturesToJSON_conversion("lyr", r"G:\GIS_Projects\Backups\json\myjsonfeatures.json", geoJSON='GEOJSON')
but this works fine:
arcpy.FeaturesToJSON_conversion("lyr", r"G:\GIS_Projects\Backups\json\myjsonfeatures.json", geoJSON='NO_GEOJSON')