Filtering the Clustered Points by JSON attributes using Mapbox-gl-js - mapbox

I am working on the project in which I want to filter the GeoJson using their attributes and visualize the marker in cluster form on the map.
I try using the following "Filtering Clustered Points by JSON attributes using Mapbox-gl-js"
solution but unable to understand how to filter GeoJson using their attributes and set filter GeoJson data to map.
I already made an application using Google Maps API, but now I want to develop through Mapbox-gl-js API.
Existing Application Link: http://maps.dicrc.in/BM/

Mapbox The GeoJSON clustering happens at the source level. If you want to filter data in the clusters, you will have to filter the GeoJSON itself based on the attributes BEFORE clustering it.
You can use tools like turf/filter to filter the GeoJSON data. For clustering and updating your filtered data, follow the example in this jsfiddle map.getSource('sourceName').setData(filteredData)
disclaimer: I work at Mapbox

Related

WFS GetFeature request feature with lat/lng literal

According to the Geoserver documentation: https://docs.geoserver.org/master/en/user/services/wms/reference.html#getfeatureinfo it is preferred to use the WFS GetFeature service over WMS GetFeatureInfo as literally cited:
The GetFeatureInfo operation requests the spatial and attribute data for the features at a given location on a map. It is similar to the WFS GetFeature operation, but less flexible in both input and output. Since GeoServer provides a WFS service we recommend using it instead of GetFeatureInfo whenever possible.
I have been looking for a way to request all matching features for a lat/lng point and the shape of a layers geometry via WFS GetFeature. I can't find it and the cql_filter combiantion with within or intersects won't get me any further. Any good documeantion or examples someone has to share?
Don't know if you are still needed, but just provides for others who need.
WFS GetFeature request feature with lat/lng literal:
{youHost}/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName={yourTypeName}&srsName=EPSG:4326&maxFeatures=10000&format_options=callback:getJson&cql_filter=INTERSECTS(geom, POINT ({long} {lat}))

IBM AlchemyAPI - create corpus/knowledge graph with my data and perform concept search

I'd like to create a corpus with my data set. I'd like something similar to creating a corpus with documents in Watson Concept Insights, but I did not find the corresponding API in Alchemy. How do you create a corpus/knowledge graph using AlchemyAPI? The relation extraction works only on the input. Is there way to perform relation extraction on the corpus to get related concepts?
I already used Watson Concept Insights. The customer requirement is to use AlchemyAPI.

Feed JSON to Nominatim with import.io

Greetings fellow SO users,
I am extracting data with import.io from a site which contains city names. What I want to accomplish is to get the coordinates to each city from Nominatim and finally create/get a JSON response which contains the city name and the corresponding coordinates for each.
So I basically need to use the result from one API as the input for another (Nominatim).
Or in other words: feed a JSON list of city names to OSM's Nominatim and get back the coordinates to each city.
I wonder if this is even possible or what other options I have. Finally this would be used with leaflet to put some markers at a map.
There are tutorials for Nominatim, how to query etc. but only one query at a time. Is it even possible to query a whole list of places?
What you want to achieve in here is what we call Chained APIs. So you will need two APIs, where the input of the second one is the output of the first one.
In this case you will need some custom processing between the two APIs. From the first API you are getting the city name and from here you need to generate a list of URLs in the format http://nominatim.openstreetmap.org/search?q=CITY&format=xml one per each CITY.
After that you can use the Bulk Extract feature in import.io and pass the whole list of URLs to be queried against the API.

Shape File To Convert Realtion tag in OSM Data

I am Routing Working routing application which is working in osm data but i have data in shape file so by using JOSM i convert in to OSM data but i have another file for turn restriction where i have get to , form and Junction data so how to implement in to osm file

Using visjs manipulation to create workflow dependencies

We are currently using visjs version 3 to map the dependencies of our custom built workflow engine. This has been WONDERFUL because it helps us to visualize the flow and find invalid or missing dependencies. What we want to do next is simplify the process of building the dependencies using the visjs manipulation feature. The idea would be that we would display a large group of nodes and allow the user to order them correctly. We then want to be able to submit that json structure back to the server for processing.
Would this be possible?
Yes, this is possible.
Vis.js dispatches various events that relate to user interactions with graph (e.g. manipulations, or position changes) for which you can add handlers that modify or store the data on change. If you use DataSets to store nodes and edges in your network, you can always use the DataSets' get() function to retrieve all elements in you handler in JSON format. Then in your handler, just use an ajax request to transmit the JSON to your server to store the entire graph in your DB or by saving the JSON as a file.
The oppposite for loading the graph: simply query the JSON from your server and inject it into the node and edge DataSets' using the set method.
You can also store the networks current options using the network's getOptions method, which returns all applied options as json.