aipescience / mysql_sphere Goto Github PK
View Code? Open in Web Editor NEWMySQL port of pgSphere 1.1.1
Home Page: https://escience.aip.de/mysql-sphere/
License: Apache License 2.0
MySQL port of pgSphere 1.1.1
Home Page: https://escience.aip.de/mysql-sphere/
License: Apache License 2.0
+-----------------------------------------------------------------------------+ | 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
determine order of types in normal UDF of all *_com functions and choose accordingly. Deprecate the *_com UDFs but keep them available for compatibility
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.
port the *_out functions of pgsphere
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.
mariadb-server 10.1.23-9+deb9u1
doesn't provide mysqlbug
anymore.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.