Hi everyone,
I have my data stored in Excel, saved as .csv. Online I have converted the .csv to a shapefile (zip).
When I upload the shapefile (add as layer into Map Viewer), the column which has "hectares" should be recognized as a number with two decimal places. Instead, it defines it as text, which will be problematic during analysis later.
(During the conversion from .csv to shp, I could not define the columns that I want recognized as a number.)
First option I tried:
I have tried to correct this in the ArcGIS REST Services Directory --> Admin --> Update Definition:
by editing:
{
"name" : "Hectares",
"type" : "esriFieldTypeDouble",
"actualType" : "float",
"alias" : "Hectares",
"sqlType" : "sqlTypeFloat",
"nullable" : true,
"editable" : true,
"visible" : true,
"domain" : null,
"defaultValue" : null
},
but even though the changes seem to get accepted, and I refreshed the page, they are not visible in Map Viewer.
--> Question: should I have used a command somewhere that indicates I want to change field type from esriFieldTypeString to esriFieldTypeDouble?
Second option I have tried:
I have also tried ArcGIS Assistant, by View Item JSON --> Edit JSON, but this also didn't update the changes in Map Viewer.
Third option I have tried:
I have tried to get Excel to recognize the data in the column as number, by using "number format" and specifying 2 decimals. Unfortunately, AGOL still treats it as text, instead of a number. In addition, the Polygon data I have stored in the same Excel under header WKT does not get recognized as spatial data.
The fourth and final option I have tried:
I have tried the add-in ArcGIS for Excel. When I choose lat/long as coordinates, it will create a point, and I want the polygon data from column A to be used. But when I choose ESRI JSON Geometry, it does not recognize WKT as the geometry column.
The big question: What will be my best option to change field data type (from string to double)?
Information:
- I'm using ArcGis Online (Creator License)
- I have created the layer and am the host
- The Feature Layer has editing enabled
I really hope someone can help, I have been at it for three full days and can't figure out what I'm doing wrong.
Thanks in advance!