JSON To Features does not obey symbology

2306
2
Jump to solution
09-29-2015 08:55 PM
ShalvendraSukul
New Contributor II

Hi guys so 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?

0 Kudos
1 Solution

Accepted Solutions
NeilAyres
MVP Frequent Contributor

Just looked at the help for Json to features.

It talks about geometry and any associated attributes and their values. It does not mention symbology.

Which makes sense if you think about how ArcGIS approaches spatial data.

The data is one thing and its various attributes, how you symbolize this is entirely another thing and is applied afterwards.

View solution in original post

2 Replies
NeilAyres
MVP Frequent Contributor

Just looked at the help for Json to features.

It talks about geometry and any associated attributes and their values. It does not mention symbology.

Which makes sense if you think about how ArcGIS approaches spatial data.

The data is one thing and its various attributes, how you symbolize this is entirely another thing and is applied afterwards.

View solution in original post

ShalvendraSukul
New Contributor II

Thanks i guess i will have to look at this from a different angle. But if you think about it, if you can convert a graphic to a feature, shouldn't you be able to vice versa. Well you can but without symbols. Anyways the help doc is clear by not mentioning anything about symbology. Thanks.

0 Kudos