1

I am using the JSON to features tool in the ArcMap conversion toolbox and i cannot seem to get the symbology right.

This JSON i am using is a GPFeatureRecordSetLayer which i have written to a .json file

{
    "displayFieldName": "pointFeature",
    "hasM": false,
    "hasZ": false,
    "geometryType": "esriGeometryPoint",
    "spatialReference": {
        "wkid": 102100,
        "latestWkid": 3857
    },
    "fields": [
        {
            "name": "OBJECTID",
            "type": "esriFieldTypeOID",
            "alias": "OBJECTID"
        },
        ...
    ],
    "features": [
        {
            "geometry": {
                "type": "point",
                "x": 19865753.933378372,
                "y": -2051854.6857393598,
                "spatialReference": {
                    "wkid": 102100,
                    "latestWkid": 3857
                }
            },
            "symbol": {
                "color": {
                    "r": 0,
                    "g": 0,
                    "b": 0,
                    "a": 0.001176470588235294
                },
                "size": 13.333333333333332,
                "type": "simplemarkersymbol",
                "style": "circle",
                "outline": {
                    "color": {
                        "r": 0,
                        "g": 255,
                        "b": 255,
                        "a": 1
                    },
                    "width": 2.6666666666666665,
                    "type": "simplelinesymbol",
                    "style": "solid"
                },
                "xoffset": 0,
                "yoffset": 0
            },
            "attributes": {
                "OBJECTID": "4131",
                ...

            }
        }
    ],
    "exceededTransferLimit": true
}

When i run the Features to JSON tool on the generated features i get this JSON string which totally skips any symbology information.

{
    "displayFieldName": "pointFeatures",
    "fieldAliases": {
        "OBJECTID": "OBJECTID"
    },
    "geometryType": "esriGeometryPoint",
    "spatialReference": {
        "wkid": 102100,
        "latestWkid": 3587
    },
    "fields": [
        {
            "name": "OBJECTID",
            "type": "esriFieldTypeOID",
            "alias": "OBJECTID"
        },
        ...
    ],
    "features": [
        {
            "attributes": {
                "OBJECTID": "4131",
                ...
            },
            "geometry": {
                "x": 19865753.933378372,
                "y": -2051854.6857393598
            }
        }
    ]
}

Everything else works fine. Is this a known limitation?

  • I am using this as part of a GP service and the step after converting from json to features, using the model builder, is layer to kml, where all my features are barely visible because they dont have any symbology. Should i mark this as answered simply because the help for the json to features tool only says it can be used to set attribute and geometry data and does not mention the ability to set any other attributes of a feature or graphic? – Shalvendra Sukul Oct 2 '15 at 10:25
  • correct. it doesnt do symbology. – KHibma Oct 2 '15 at 12:55
1

i will mark this as answered simply because the json to features tool only says it can be used to set attribute and geometry data and does not mention the ability to set any other attributes of a feature or graphic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.