I want to insert GeoMesa compatible GIS data into my Cassandra database. How can I achieve this?
- Create a table with a point type column
- Insert some table data with a point coordinate
user@ubuntu: /var/log/cassandra$ cqlsh
Connected to Test Cluster at 127.0.0.1:9042
[cqlsh 5.0.1 | Cassandra 3.0.29 | CQL spec 3.4.0 | Native protocol v4]
Use HELP for help
cqlsh> CREATE KEYSPACE geomesa WITH REPLICATION = {'class': 'SimpleStrategy'. 'replication_factor': 3};
cqlsh> use geomesa;
cqlsh:geomesa> CREATE TABLE test (point 'Point');
SyntaxException: Error setting type Point: Unable to find abstract-type class 'org.apache.cassandra.db.marshal.Point'
Thanks!
Instead of using
cqlsh
, you'll need to interact with Cassandra using Java and the GeoTools API. GeoMesa also provides command-line tools which can be used to ingest data without writing any code. You may also consider using Apache NiFi or Apache Spark.