Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Transformations, Edge effects?

Hi Marcel,

The functions you are calling are actually GeoTools methods. To see a list available, you can check out your the WFS GetCapabilities document from GeoServer (1) under the ogc:Function_Names tag.

Distance is a tricky thing: When ones ask for a distance calculation, the units will be determined by the Coordinate Reference System (CRS). GeoMesa makes the assumption that all your data is longitude / latitude which is EPSG:4326. In that CRS, the unit of measurement is degrees.

In order to get a 'more helpful' answer, libraries like GeoTools GeodeticCalculator or our GeoMesa wrapper (2) can take two points specified in lon-lat and return the distance in meters. Those libraries use the Haversine formula or the Vincenty's formula (3).

For the Point(0,0), it is on a corner of a GeoHash. In our implementation, GeoHashes contain their bottom and left edge, so this point is in the 's' 5-bit GeoHash.

One easy way to see duplicate data in GeoMesa is if you have entered the same data multiple times without specifying the feature id. If that's not what has happened, you may have found a bug. If you can write up some steps to reproduce, I'm happy to check things out.

Thanks,

Jim

1. For example: http://your-server/geoserver/ows?service=wfs&version=1.0.0&request=GetCapabilities

2.  GeoMesa's Scala wrapper about the GeoTools GeodeticCalculator:
https://github.com/locationtech/geomesa/blob/master/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geohash/GeomDistance.scala
Unit tests/examples of use:
https://github.com/locationtech/geomesa/blob/master/geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/geohash/GeomDistanceTest.scala

3.
https://en.wikipedia.org/wiki/Haversine_formula
https://en.wikipedia.org/wiki/Vincenty's_formulae


On 09/04/2015 12:54 PM, Marcel wrote:
Hey,

I played around with some geomesa transformations like strConcat() and distance(). This returns the distance in degrees which looks kind of unfamiliar to me. Is there a transformation, which returns the distance in meters or kilometers (given two points)? Which distance do you calculate (euclidean distance, distance using haversin formula or based on an ellipsoid)?

Looking at the results of another query I noticed that one record occurs 4 times (Point(0, 0)). I could imagine that there is the boundary of a geohash and this point intersects with all of the four geohashes around. Do I have to remove these duplicates afterwards?

Thanks again,
Marcel.
_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
http://www.locationtech.org/mailman/listinfo/geomesa-users



Back to the top