How can I add Geo(JSON) to ArcGIS for Portal?

4818
6
10-15-2016 03:12 AM
Highlighted
New Contributor

I've been trying to add a JSON file containing fields with coordinates (not sure if that is the only criteria for calling JSON files GeoJSON). This JSON file comes from an external real-time server but is saved locally. The steps I took are as: My content > Add item > From my computer. Everytime I try to add the concerning JSON file, it says: "invalid url". Extra information: the JSON file is a saved output from the HERE Traffic REST API. The corresponding URL to get the output contains parameters like the desired incidents categories, bounding box, and the API ID and key. 

Reply
0 Kudos
6 Replies
Highlighted
Esri Esteemed Contributor

Hi Collin,

We don't support directly adding a JSON file to Portal for ArcGIS. Please see this help topic,

What can you add to your portal?—Portal for ArcGIS | ArcGIS for Server 

FYI, a GeoJSON file is not just a JSON file with coordinates, it is an open standard format for representing simple geometries. You can add a GeoJSON file to Portal, but not a JSON file. Learn more here,

GeoJSON - Wikipedia 

Hope this helps,

Highlighted
New Contributor II

*necro*

Hey folks,

@Derek: Just to clarify this. By 'We don't support directly adding a JSON' you mean a JSON file not in the GeoJson format or files ending with .json in general? As you also say: 'You can add a GeoJSON file to Portal, but not a JSON file.' Yet the 'supportet-items' page states: 'GeoJSON file (.geojson, .json)'

I'm trying to upload a GeoJson file to ArcGIS Portal. For testing purposes I use the 'example' provided in the wikipedia article about GeoJson Derek referenced in his post. I saved this in a file called test.json.

Following the guide on Publish hosted feature layers—Portal for ArcGIS I keep getting an error after hitting the 'Add Item' button (step 8):

"ERROR 999999: Error executing function. No geojson found in item. Failed to execute (Publish Portal Service). Failed."

Renaming the file to test.geojson leads to a successful upload.

Another error I get is related to the proterties object of the single features. Whenever a property value is not a string or an integer, but an array or object I get following error upon upload.

"ERROR 999999: Error executing function. The value type is incompatible with the field type. [prop1] The workspace is not connected. Failed to execute (Publish Portal Service). Failed."

I am using ArcGIS for Portal version 10.4.1.

Thanks in advance

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Hi Hannes,

> Just to clarify this. By 'We don't support directly adding a JSON' you mean a JSON file not in the GeoJson format or files ending with .json in general? As you also say: 'You can add a GeoJSON file to Portal, but not a JSON file.' Yet the 'supportet-items' page states: 'GeoJSON file (.geojson, .json)'

I was referring to directly adding a JSON file not in the GeoJSON format. I did not mean files ending with .json in general.

> I'm trying to upload a GeoJson file to ArcGIS Portal. For testing purposes I use the 'example' provided in the wikipedia article about GeoJson Derek referenced in his post. I saved this in a file called test.json.

Following the guide on Publish hosted feature layers—Portal for ArcGIS I keep getting an error after hitting the 'Add Item' button (step 8):

"ERROR 999999: Error executing function. No geojson found in item. Failed to execute (Publish Portal Service). Failed."

Renaming the file to test.geojson leads to a successful upload.

FYI, this was a bug in the Portal software that was recently fixed. You should be able to use files with the .json extension in a future Portal release (post 10.5.1).

> Another error I get is related to the proterties object of the single features. Whenever a property value is not a string or an integer, but an array or object I get following error upon upload.

"ERROR 999999: Error executing function. The value type is incompatible with the field type. [prop1] The workspace is not connected. Failed to execute (Publish Portal Service). Failed."

Can you please contact Esri Tech Support so we can investigate further? Please provide detailed repro steps.

Hope this helps,

Highlighted
New Contributor

Hi, I also have this question, but am working with a dynamic dataset provided as a REST API in json format.  Is there a way to access this dynamic data in our Portal? I found some information on Koop, but not sure if that will work for us behind our firewall (the json REST API is also behind our firewall).  I'm not a programmer, but can do some scripting if needed.  Any help is appreciated. Thanks!

Reply
0 Kudos
Highlighted
Esri Regular Contributor

Becky, Data Interoperability extension can read JSON via REST, transform it into rows or features (if that is what the endpoint abstracts) and write to a portal feature service with truncate or update.  An ETL can be called via Python on any schedule.

Highlighted
New Contributor

Hi Bruce, I recently submitted a ticket and worked with an ESRI tech on this issue and he found that there is a bug in Arcmap 10.5 that does not allow for json or geojson to be read via REST utilizing the Spatial ETL Tool. v10.5.1 however, fixes this bug.  Since I will not be able to upgrade soon, I was hoping that you might know of another fix for this issue?

Reply
0 Kudos