Copyright 2003 - 2016 Peter Baumann / rasdaman GmbH.
RasdaPy is a client side interface for Rasdaman that enables execution of RasQL queries using the python programming languae without having to write the actual RasQL queries.
This directory contains the RasdaPy library.
Normally, this directory comes as part of the rasdaman package, available from:
The complete package includes the rasdaman source code. If you downloaded this package from PyPI or some other Python-specific source, you may have received only the Python part of the code. In this case, you will need to obtain the rasdaman database system from some other source before you can use this package locally.
The Python implementation of Protocol Buffers is not as mature as the C++ and Java implementations. It may be more buggy, and it is known to be pretty slow at this time. Since this library relies heavily on Protocol Buffers and GRPC, it might be prone to occasional hiccups and unexpected behaviour.
1) Make sure you have Python 2.7 or newer if using Python 2 and Python 3.4 or newer if using Python 3. If in doubt, run:
$ python --version
- If you do not have setuptools, numpy, scipy, grpcio, and protobuf installed, note that they will be downloaded , and numpy.
The complete documentation for RasdaPy can be found in Sphinx docs under the docs directory. Examples can be found in the examples directory.
$ from rasdapy.core import Connection
$ con = Connection(hostname="0.0.0.0", username="myuser", password="mypass", port=7000)
$ db = con.database("dbname")
$ collection_list = db.collections $ print(collection_list)
$ txn = db.transaction()
$ query = txn.query("select m[0:10 ,0:10] from mr as m") $ data = query.execute()
$ txn.abort() $ txn.commit()
$ db.close()
$ data = data.to_array()
$ data += 1
$ from rasdapy.surface import RasCollection
$ col = RasCollection("rgb")
$ col /= 3 $ col += 10 $ col = col.avg_cells() $ data = col.eval()
$ col.use_db(db)
$ arr = col.eval() $ data = col.to_array()
$ arr.to_image("example.png")
- Siddharth Shukla
- Alex Mircea Dumitru
- Vlad Merticariu
- George Merticariu
- Alex Toader
- Peter Baumann