In point cloud filtering, there is radius filtering, that is, filtering inside the sphere. I want to change the range of filtering from sphere to ellipsoid. How to achieve this.I want to do it in c++ or python.I have tried to read the code of RadiusOutlierRemove in PCL, but it is still not clear how to construct an ellipsoid for filtering, and whether the search strategy still uses knn.
I am struggling with DWithin queries in geomesa.
I have ingested many geo points from OSM and want to make DWithin queries.
I have the following code for query:
val query = new Query("t1", ECQL.toFilter("DWITHIN(geo_point, POINT (14.453943 60.499611), 5000, meters)"))
I expect geomesa to answer with the points not far then 5000 meters from POINT (14.453943 60.499611) (points 2,3,4 on the map).
But geomesa gives me more points than expected.
All the points in the map (1,2,3,4,5,6) are returned for this query.
It seems that geomesa can't properly filter out the points for DWithin query since it does not have support for geodesic distance checks.
So, is there any way to make DWITHIN query work correctly (in a geodesic manner) with geomesa?
Thanks!
GeoMesa uses the geotools dwithin filter function for such queries. Unfortunately, the function only supports native distances (i.e. degrees in WGS84).
Currently, your best bet is to use the geotools GeodeticCalculator class to create a polygon covering your query area and use that in an intersects filter. Alternatively, you could post-filter the results using the Geodetic Calculator.
Going forward, I've created a ticket to handle this use case better in GeoMesa: https://geomesa.atlassian.net/browse/GEOMESA-2263
How to search geo-point with polygon across dateline(International Date Line,or 180 and -180 longitude) use java api?
Hello everyone:
I use ElasticSearch 2.1 and its java api, I want to search documents with polygon geo filter(the polygon is rectangle usually),but when the polygon across the dateline (International Date Line,or 180 and -180 longitude),it go wrong. For example:
My code:
BoolQueryBuilder mustQuery = QueryBuilders.boolQuery().must(QueryBuilders.matchAllQuery());
......
GeoPolygonQueryBuilder qb = QueryBuilders.geoPolygonQuery("description.device_location.es_geo");
qb.addPoint(0,100);//the left down vertex of the polygon(rectangle),patams is (lat , lon)
qb.addPoint(0,-170);//right down
qb.addPoint(80,-170);//right up
qb.addPoint(80,100);//left up
qb.addPoint(0,100);//left down,same to the first vertex
mustQuery = mustQuery.must(qb);
SearchResponse searchResponse = EsClient.getClient().prepareSearch(Config.indexName)
.setTypes(Config.typeName)
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
.setQuery(mustQuery)
.setFrom(0).setSize(size).setExplain(true)
.execute()
.actionGet();
diagrammatic sketch:
I want search in A areaļ¼but ES search in B area in fact
As the picture above, I provide ES points [0,100],[0,-170],[80,-170],[80,100],[0,100] to describe A area,and I want docs in A area, A area across dteline.
But according to the result, there is longitude 82,98,-121 etc., but no docs between [100,180]and between [-180,-170],so I suppose ES search in B area in fact(It analyze the polygon in error).
I search for the solution , on the ES's website, I found some words about this problem:
(form www.elastic.co/guide/en/elasticsearch/reference/2.1/geo-shape.html)
IMPORTANT NOTE: GeoJSON does not mandate a specific order for vertices thus ambiguous polygons around the dateline and poles are possible. To alleviate ambiguity the Open Geospatial Consortium (OGC) Simple Feature Access specification defines the following vertex ordering:
Outer Ring - Counterclockwise
Inner Ring(s) / Holes - Clockwise
For polygons that do not cross the dateline, vertex order will not matter in Elasticsearch. For polygons that do cross the dateline, Elasticsearch requires vertex ordering to comply with the OGC specification. Otherwise, an unintended polygon may be created and unexpected query/filter results will be returned.
The following provides an example of an ambiguous polygon. Elasticsearch will apply OGC standards to eliminate ambiguity resulting in a polygon that crosses the dateline.
But this is for geo-Shape datatype, and my docs' location is geo-point, I can't found similar words on geo-points's webpage(www.elastic.co/guide/en/elasticsearch/reference/2.1/geo-point.html).
I hava try some way:
1. Counterclockwise and clockwise vertex order;
2. start from every vertex of rectangle;
3. replace -170 lon with 190 lon;
but these ways all don't work.
Does anyone know how to search with a polygon across dateline ?
Thanks!
(sorry, I'm a Chinese developer and I can't speak English well, if there is solecism,please give me advice or comments, thank you.)
Here is the translated text of Chinese.Chinese characters couldn't be insert to question direct.
I'm the asker, and I have an answer already.
I have ask this question at https://discuss.elastic.co/t/search-geo-point-with-polygon-across-dateline/39103/3 ,and get answer there.
Before,I have ever think if there isn't perfect solution,I can split the polygon into 2 by dateline.I have know ES don't suport to search geo-point with polygon across dateline now:
At the moment geo_polygon queries for geo_point types do not work
across the dateline. You will either have to:
manually split the polygon into 2 and combine them using a boolean AND;
reindex the geo_points as geo_shapes (recommend setting points_only = true) and using a geo_shape (www.elastic.co/guide/en/elasticsearch/reference/2.1/geo-shape.html) query.
But if you know the polygon is a
rectangle, you can use a geo_bounding_box (www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-bounding-box-query.html) query which will properly
handle the dateline (as in your example).
Thanks for #nknize and #medcl1 (at discuss.elastic.co)!
I am working on a application that is filtering a point cloud from a laser distance measuring device. Its a small array only 3x176x132 and Im trying to find parts inside a bin and pick the top most. So far I have played around with filtering the data into a way that can be processed by more traditional vision algorithms. I have been using the Sobel operator on the distance data and normalizing it and this is what I came up with
The Same filter applied to the PMD amplitude
My problem is I feel like I am not getting enough out of the distance data. When I probe the actual height values I see a drop the thickness of a part around the edges but this is not reflected in the results. I think it has to do with the fact that the largest distance changes in the image are 800mm and a part is only 10mm but Im sure there must be a better way to filter this.
Any suggestions
I am trying to visualize a river flow- basically, should be able to visualize river current direction and speed based on an user-defined external parameter. This is required to demonstrate vectors in two dimensions- given education needs, animation quality can be minimal- 'tolerable enough'.
I tried a simplistic approach by a blue background with lines indicating currents- comes out very weak and below my low standards!!
Can someone point out a good example/ approach for achieving the same? Thanks.
You can create an image filter that looks like water. Look at Jerry's image filters. Specifically look at the the caustic filter. You could animate it moving from one end of the river to the other end. You can also experiment with varying the time parameter. Since it's open source, you can translate it to other languages.
Here are some links to 3d visualizations.