Cannot load WFS, GeoJSON, KML with Add layer from URL

1914
15
08-04-2023 10:39 AM
Labels (1)
RobertoRossi
Occasional Contributor

Veneto Region Environmental Agency publishes meteorological data in several formats:

Available formatsAvailable formats

 

but when I try to use them in ArcGIS Online with the Add layer from URL command

Attempt with GeoJSON formatAttempt with GeoJSON format

 

I receive this error message:

Error GeoJSONError GeoJSON

I have a similar (in some cases different) error with every format.

The only format working is the CSV format, but I can't use it because of the way the coordinates are managed (in a unique geom field)

I give here the URL of different formats available in Add layer from URL (none of the works) if someone can test them:

Thanks

Roberto Rossi

Padua University

Tags (2)
15 Replies
MiguelParedes
Esri Contributor

Greetings @RobertoRossi 
I have been trying to test some of the formats you described in your posting, but unfortunately, https://gaia.arpa.veneto.it/layers/geonode:v_ieri_temperatura is unavailable. Do you know if there are problems with it?

I will try later when the site is running again.

Miguel
0 Kudos
JustinAnderson4
New Contributor

Hello all,

I am having a similar issue. I am new at working with an enterprise environment and am getting used to all the restrictions. I have created a geojson file from my computer and have added it to a map. The geojson file shows in my content however, when I try to add it to another map, it does not show up in my content. 

Is there something I'm missing? Any help would be greatly appreciated!

0 Kudos
RobertoRossi
Occasional Contributor

Thank you @MiguelParedes 

At the moment https://gaia.arpa.veneto.it/layers/geonode:v_ieri_temperatura works (at least for me).

Roberto

0 Kudos
MiguelParedes
Esri Contributor

Greetings @RobertoRossi 

Still no joy for me. I have even gone to the following site to try to gain access:
https://civil-protection-knowledge-network.europa.eu/organisations/agenzia-regionale-la-prevenzione-... but when I click on the link to go to https://www.arpa.veneto.it I get a failed page. 
In any case, I have seen the URL you provided in your first screen capture and you have added a GetFeature request for a WFS, which is not the correct URL.  To add the WFS try using the following instead:
https://gaia.arpa.veneto.it/geoserver/ows
You should get a list of the layers in the service that will allow you to select the layer for "temperatura".

Also, I have noticed that the requests for GeoJSON and for KML are all directed to the WFS service, specifically to the Layer named (typename) geonode.v_ieri_temperatura, and outputFormat of JSON and KML respectively. So I think the problem with GeoJSON and KML URLs is their complexity.

I hope the above is of help.

 

Miguel
0 Kudos
RobertoRossi
Occasional Contributor

Thank you again @MiguelParedes ,

I cannot understand why you cannot load the Arpav URL and pages.

I supposed it might be a problem of accesses from foreign (from Italy) countries, or access from USA, but I tested them with a friend in USA and everything seem to work. I also tested with Free Website Reachability Check (like Semonto or Uptomio), and the test is OK (https://semonto.com/tools/website-reachability-check?test=8b8404b2df8dbb957a82609fa60097f0a).

 

Anyway, I verified that using the URL you suggested, https://gaia.arpa.veneto.it/geoserver/ows, instead than the one provided in the page solves the problem "This version of WFS is not supported". Anyway WFS it's not the best format to load data (as you may now). For example I have problems with actions on dashboards.

To try to solve the problem of GeoJSON and KML what can I suggest to people in charge of publishing the data? Something like "do not use a WFS service with an outputFormat parameter, but..."?

 

Thanks again

Roberto

0 Kudos
MiguelParedes
Esri Contributor

Greetings @RobertoRossi,

I am based in the UK, and for some reason, I do not have access to that particular site. However, I have a colleague who through the use of a VPN was able to access the site and provide me with a copy of the Capabilities document for the WFS service, and according to it should support versions 1.0.0, 1.1.0 and 2.0.0. Usually, and by default, the ArcGIS Online client apps (MVC and MV), would request the latest version first, in this case, 2.0.0, so I don't know why you would be getting the message about the version not being supported. It is hard to say without being able to have access to the WFS.

Using the WFS to provide the data in GeoJSON and KML and other supported output formats, is a perfectly valid option, and using them should allow one to add the data as a layer to the Content in ArcGIS Online or directly to one of the above-mentioned clients, but again, without being able to test it I am not sure why the URLs are not working with ArcGIS Online.

I know this isn't much help but maybe other Community users that have access to the service might be able to offer further guidance.

 

Miguel
0 Kudos
RobertoRossi
Occasional Contributor

Thank you @MiguelParedes for your efforts and suggestions.

I got in touch with Arpav Agency IT technicians which told me "At the moment we block access on a geographical basis, starting from the assumption that our services serve Italy and neighboring countries" (so strange and disappointing in my opinion!).

Actually the Website Reachability Check (https://semonto.com/tools/website-reachability-check?test=8b8404b2df8dbb957a82609fa60097f0a) says the service is not reachable just from UK (it's reachable form USA)!

I'm going to ask them to remove this block.

------------------------

Summarizing, after your suggestions, at the moment it will be interesting for me to understand why URL like

https://gaia.arpa.veneto.it/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typename=geon...

are not working in ArcGIS Online.

The strange thing is that I saved the JSON file (it's attached here as zip file) and then succeed in loading it on ArcGIS Pro using JSON To Features tool.

If I try to Add Layer form file with ArcGIS Online, I get the unsupported GeoJSON 'crs' member error, also if I load a file in EPSG 4326 or EPSG 3857 CRS.

So it would be interesting to understand why ArcGIS Online is not able to load using Add layer form URL a JSON service which gets a JSON file which is OK with Pro. Maybe something in the URL syntax?

0 Kudos
MiguelParedes
Esri Contributor

Greetings @RobertoRossi 

Thank you for finding out. No wonder why I was not able to access the service.

With respect to the GeoJSON files you provided, I was able to add them to Content in ArcGIS Online and then to the Map Viewer:
GeoJSON_data_AGO.jpg

Since I do not have access to the service you are using, I decided to enable the WFS capabilities in an ArcGIS Server 10.9.1 Sample World Cities default service and try if I would be able to add the GeoJSON and KML links into ArcGIS Online, so:
https://<server>.<domain>/server/services/SampleWorldCities/MapServer/WFSServer?request=GetFeature&s...srs=EPSG:4326&outputformat=GEOJSON
and 
https://<server>.<domain>/server/services/SampleWorldCities/MapServer/WFSServer?request=GetFeature&s...KML

I was able to add both services to the Content using the +Add item > URL
P1KVphLooK.jpg

Interestingly, when I checked the GeoServer guide for WFS 2.0.0 for GetFeature I found that the parameter for specifying the CRS is srsName.  In the Esri WFS, it is srs only.  I would suggest trying the URL again but with only srsName, committing the srs parameter:
https://gaia.arpa.veneto.it/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typename=geonode:v_ieri_temperatura&outputFormat=json&srsName=EPSG:3003 

Hopefully, that will work for you.

Miguel
0 Kudos
RobertoRossi
Occasional Contributor

You're right @MiguelParedes! It seems that in ArcGIS Online we should only use the srsName parameter, without the srs one, when we load WFS URLs...

I was able to load the JSON in ArcGIS Online, but only as hosted feature layer and not directly form the URL:

AddLayerJson.jpg

 

If I try Reference the file from the URL and add it to the map I receive this error:

Unable.jpg

 

Now I have to understand if the hosted feature layer I created will update automatically, when, daily, the Agency updates the data. This because my aim is to create a map and a dashboard which uses the daily updated data...

I postpone marking your last answer as a solution, waiting to check if the data in the hosted feature layer update daily.

Thanks again.

Roberto