Get all WMS layer features from the Openlayers 3 with in selected bounding box? - openlayers-3

For vector layer we have solution to get the feature with in the bounding box.
PFB the solution
http://tsauerwein.github.io/ol3/animation-flights/examples/box-selection.html
but, Is there any respective solution for for WMS layer?

Is there any respective solution for for WMS layer?
No from my knowledge.
It seems confirmed from this topic "Use GetFeatureInfo with OpenLayers and a Bounding Polygon" on GIS.stackexchange forum and from reading the official GeoServer WMS GetFeatureInfo documentation section

Some partial solution :
Using WFS service we can able to pass polygon geometry and get feature from geo-server.

Related

ol3-cesium - is it possible to use an ol3' ImageVector layer as an ImageryProvider for Cesium?

I'm familiar with Cesium but not with OpenLayers. Knowing Cesium's current limitations in drawing vector layers, I'm looking for a way to use OL3 ImageVector as an ImageryProvider for Cesium. This would allow me easily to display vector data on terrain with the rich styling (dashed strokes etc..) that OL3 offers.
OpenLayers 3 has an ol.layer.Image layer that can take an ol.source.ImageVector to render an ol.source.Vector to an image (canvas)
(here's an example). I would like to take it's output and synchronize it with Cesium.
After looking at some samples and source code, I've found the
RasterSynchronizer and VectorSynchronizer which are used respectively to synchronize imagery and vector layers between OL3 and Cesium. Unfortunately, the RasterSynchronizer will only accept a ol.layer.Tile and not an ol.layer.Image.
Bottom-line, my question is :
Is it possible to synchronize OL3 ImageVector as a raster in Cesium, if not how hard should it be to implement it?
Side note:
I'm also considering rasterization on geoserver, but would prefer a client side solution
In the image below you can see the difference in the triangle's shape between OL3 (left) to Cesium (right), which I'm trying to eliminate by re-using the ImageVector's output for Cesium's imagery.

removing duplicates labels in geoserver tiled wms

i have hard time finding an example for avoiding duplicates labels in geoserver tiled wms through ol3. Any chance someone has a link or a piece of code ?
regards
You can use the centroid function to find the geometry in the label rule, then most of the polygons will labelled correctly. The only other issue is where they fall near the edge of the tile, then you need to set the gutter in GWC to allow them to run over.

Aggregate shapes to new shape in OpenCV

I'm trying to detect an object composed of other objects. Actualy, there are three circles in my binary image which shape up a triangle as shown here:
These circles are correctly detected, but only as single objects as shown here:
What I need to have is an aggregation or composition of these objects, so they get detected as one big object as shown here:
The bigger goal is to get the image moments to get the rotation and scale of the shape. Please share your ideas or code if you have any, it would be well appreciated.
I would suggest using the bounding box functions of opencv
Here is a link to an example of bounding box in C++ OpenCV, however if you are using something like Python, it might be worth your while looking at this link, which is a full set of tutorials for working with binary images and contours (including bounding box/elipse)
Again if you are using the Python port, look at this set of tutorials, they really are great and have a massive supply of information on most functions of OpenCV.
Hope this helps.
Good luck.
Your question is very similar to this question, which has answers with code examples. Alternatively check the documentation of OpenCV. If you are interested in the convex hull of your points, see cv::convexHull().

OL3: Is it possible adding different layers with different projections in one map using openlayers3?

I want to add two different layers in one map. A is using EPSG:4326 projection, while B is using EPSG:3857 projection. When I tried this with openlayers3, some error come out.
I can't find function like setProjection in ol.View, it seems that openlayers3 do not support this action.
But when i use Cesium, Cesium support this.
What can i do if i have to do this with openlayers3?
OpenLayers 3 can reproject vector data sources without any problem. But since you mention Cesium, I guess you are asking about raster sources. Raster reprojection is currently not possible, but it is a planned feature.

Image edge/shape detection in OpenCV

After converting a color image to black and white, I want to detect the shape of the image.
What are the best methods to detect the shape? I mean how can I detect it pixel wise or histogram wise? And how can I store each detected shape in a database if it's like histogram
eg:
To detect above image shape what method is most accurate?
And I saw same kind of method on the internet after convert image to binary they store same kind of graph information(below link) in here how we store information like that?
Try coding shape with strings. It could be done with Freeman chain code or angle chain code(approx contour with approxPolyDP() then code segments with angle and length).
For matching Freeman chain code you could use pairwise geometrical histogram for example.
A Survey of Shape Feature Extraction is link to all the existing methods for shape Feature Extractions..
Hi, if the link not working then try this paper in Google
"A Survey of Shape Feature Extraction Techniques by Yang
Mingqiang,Kpalma Kidiyo1 and Ronsin Joseph"
Hope it is useful,
Have a Happy coding...

Resources