heavydb icon indicating copy to clipboard operation
heavydb copied to clipboard

Support for Geospatial Queries

Open BitByBen opened this issue 9 years ago • 7 comments

Would be super useful for a lot of different types of spatial analysis.

BitByBen avatar May 08 '17 17:05 BitByBen

Definitely, we can collaborate on this.

billmaimone avatar May 08 '17 17:05 billmaimone

Note that there's a distance_in_meters function you can call to find the distance between two WGS-84 positions: https://github.com/mapd/mapd-core/blob/master/QueryEngine/ExtensionFunctions.hpp#L227. Example (taken from tests): SELECT DISTANCE_IN_METERS(-74.0059, 40.7217,-122.416667 , 37.783333) FROM test LIMIT 1;.

asuhan avatar May 08 '17 18:05 asuhan

Yeah, I've dug through the docs on the website. Looking for stuff like ST_Contains for polygons and points.

But the link to the source code is quite handy for seeing how these functions are implemented.

BitByBen avatar May 08 '17 18:05 BitByBen

contains should be easy by adding another function to compute barycentric coordinates w/ it for triangles and dot product for others etc.

m1mc avatar May 08 '17 20:05 m1mc

I'd merge this issue with this one: https://github.com/mapd/mapd-core/issues/58

dfernan avatar Mar 05 '18 16:03 dfernan

This should probably be closed with the 4.0 release, which now supports geo features, and ST_DISTANCE and ST_CONTAINS geoprocessing ops mentioned above. @m1mc, @billmaimone and @benjaminjs: are you finding what you need now? If not, perhaps open a new issue - MapD is looking for community contributions/priorities for its geo road map. ST_INTERSECTION, ST_AREA, etc. could make fun projects for interested geogeeks!

mflaxman10 avatar Jul 10 '18 02:07 mflaxman10

Yep, exactly what I was looking for!

BitByBen avatar Jul 23 '18 20:07 BitByBen