I know we can access the geojson via tho python __GEO__INTERFACE, but it is very slow. It would be nice to nat have ta add an extra step to get geojson out or into a feature class. You have the Shape@JSON token, but it is not GEOJSON.
We're working on this! This status does not guarantee that the functionality will be in the next release, but development work has begun. Release cycles vary by product so make sure to check the product life cycle information to get an idea of when to expect the next release.
Better late than never! The idea made its way into the software (ArcGIS Pro 3.7) - arcpy.da Cursors now support the SHAPE@GEOJSON token, supporting the read and write of geometry GeoJSON representations.
Examples:
with arcpy.da.SearchCursor("data", "SHAPE@GEOJSON") as cursor: for row in cursor: print(row[0])
new_geojson = '{{"type":"Point","coordinates":[-1000, 1000],"crs":{{"type":"name","properties":{{"name":"EPSG:3857"}}}}}}' with arcpy.da.UpdateCursor("Point", "SHAPE@GEOJSON") as cursor: for row in cursor: row = [new_geojson] cursor.updateRow(row) break
See SearchCursor, UpdateCursor, and InsertCursor.
Melden Sie sich an, um zu posten, Inhalte zu folgen und mehr. Neu hier? Kostenlos registrieren.