Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am reading GeoJson data from Weather.gov
I am manually saving the results from the API to a geoJson file and uploading.
Load * Extension
GeoOperations.ScriptEval('
Load()
DATASOURCE data GEOFILE url="lib://POC:DataFiles/WeatherAlerts.geojson"');
If I try to put my rest connection into the load command it says that it only accepts GeoJson file extensions.
Is there a way to pull the GeoJson from an API? If not can I use an automation to save the file to Qlik Storage?
Thanks!
GeoJSON is easiest to load using GeoOperations. The data doesn't have to geosjon ending.
Example:
weather:
Load * Extension GeoOperations.ScriptEval('
load() DATASOURCE weather GEOFILE type="geojson",
url="https://api.weather.gov/points/39.7456,-97.0892"');
More GeoOperations examples: https://community.qlik.com/t5/Qlik-Sense-Documents/GeoOperations-Examples-Qlik-GeoAnalytics/ta-p/175...
Stupid question , but in the headers, are you specifying type? I.E. CSV / JSON / GeoJSON etc. ?
From the site - are you requesting GEOJSON?
https://www.weather.gov/documentation/services-web-api
Endpoints typically have a GeoJSON default format, given the inclusion of geometry data. See the Specification tab for details on each endpoint. Below are common formats available by the API.
Hello-
Yes it is GEOJson, I can save the file off, and import it manually like in the example I have, but I cannot do it with a rest connector, and since the url doesn't end in .geojson it throws the error I described.
Sorry to hear - sound like an oversight in the rest connector / geoJSON handling. When I look for similar topics I find many people asking the same question but no resolution.
I'd maybe suggest reporting as a bug as it's something you'd expect to just work out the box. You definitely shouldn't need to download externally, then re-import. Defeats the purpose of having a rest connector!
How do you open a bug? is that putting in a support case?
GeoJSON is easiest to load using GeoOperations. The data doesn't have to geosjon ending.
Example:
weather:
Load * Extension GeoOperations.ScriptEval('
load() DATASOURCE weather GEOFILE type="geojson",
url="https://api.weather.gov/points/39.7456,-97.0892"');
More GeoOperations examples: https://community.qlik.com/t5/Qlik-Sense-Documents/GeoOperations-Examples-Qlik-GeoAnalytics/ta-p/175...
Thank you,
When I use it as a rest connector I had to put a User Agent in for the header, and I thought I would have to do something similar here. Thanks for the help.