GithubHelp home page GithubHelp logo

aipescience / mysql_sphere Goto Github PK

View Code? Open in Web Editor NEW
7.0 6.0 2.0 1.16 MB

MySQL port of pgSphere 1.1.1

Home Page: https://escience.aip.de/mysql-sphere/

License: Apache License 2.0

CSS 0.34% C++ 95.25% C 4.41%

mysql_sphere's Introduction

+-----------------------------------------------------------------------------+
|                 mysql_sphere 0.1 for MySQL 5.5 and MariaDB                  |
+-----------------------------------------------------------------------------+


This is a port of the pgSphere 1.1.1 library to MySQL. Ported are all spherical
functions but not the spherical index part.

Changes:
- made UDF calls coherent
- object wrapping is done using BLOBs that can either be base64 encoded or not
- due to non extensibility of MySQL SQL syntax, no operators are available for
  sphere objects and everything needs to be done using direct UDF function calls

No documentation is available yet, but this will be available in the future.

To install
----------

1) Download the mysql source corresponding to your installed
   version. Building mysql from scratch is recommended.

   Note: ONLY MYSQL VERSION 5.5 AND ABOVE ARE CURRENTLY 
   	 SUPPORTED

2) edit CMakeList.txt accordingly to point to the directory 
   where mysql is installed.

3) edit CMakeList.txt accordingly to point to the directory
   of the mysql sources

4) mkdir build
   cd build

5) cmake ..

6) make

7) make install

8) log into mysql server as root and execute the commands in 
   install_udfs.sql

How to use
----------

See the documentation under ./doc/index.html

mysql_sphere's People

Contributors

adrpar avatar kristinriebe avatar jochenklar avatar

Stargazers

 avatar Huy Nguyen Quang avatar  avatar HE Boliang avatar Stephane VAROQUI avatar August Muench avatar Juande Santander-Vela avatar

Watchers

James Cloos avatar Juande Santander-Vela avatar  avatar  avatar Stephane VAROQUI avatar  avatar

Forkers

adrpar mtjvc

mysql_sphere's Issues

errors when submitting queries with column fields as arguments in sbox and in sdist

I report the queries I tried (with "ra" and "dec_" as column fields) and their error messages below:

SELECT ra, dec_ FROM hosted.dabrusco2009 WHERE 1 = soverlaps(sbox(spoint(radians(0), radians(0)), spoint(radians(ra), radians(dec_))), scircle(spoint(radians(0), radians(0)), radians(1))) LIMIT 1000;
ERROR 2013 (HY000): Lost connection to MySQL server during query

SELECT ra, dec_ FROM hosted.dabrusco2009 WHERE 10 <> degrees(sdist(spoint(radians(ra), radians(dec_)), spoint(radians(0), radians(0)))) LIMIT 1000;
ERROR 1123 (HY000): Can't initialize function 'sdist'; dist() error combining MySQL sphere objects. Unsupported combination.

sstr function not working as expected

I am experiencing issues with sstr and other functions like sdist just typing examples from the documentation. I would appreciate any advice.
Many thanks in advance

mysql> SELECT spoint( '( 10.1d, -90d)' );
+---------------------------------------+
| spoint( '( 10.1d, -90d)' ) |
+---------------------------------------+
| PHB0Pkuz7ixJkMY/GC1EVPsh+b88dHA+AA== |
+---------------------------------------+
1 row in set (0,00 sec)

mysql> SELECT sstr(spoint('(10.1d,-90d)'));
ERROR 1123 (HY000): Can't initialize function 'sstr'; sstr() error decoding first parameter. Corrupted or not the correct type.

mysql> SELECT 180 * ( sdist( scircle( '<(0d,20d),2d>' ), scircle( '<(0d,40d),2d>' ) ) ) / pi() AS dist ;
ERROR 1123 (HY000): Can't initialize function 'sdist'; dist() error decoding first parameter. Corrupted or not the correct type.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.