Can I use HBase Ganos to store and retrieve geo-fencing data?

Geo-fencing data is "Plane" data in GeoJSON standard data format. Geo-fencing data in HBase Ganos is stored and retrieved in the same way as "Point" and "Line" data.

{
  "features": [
    {
      "geometry": {
        "coordinates": [
          [0,0],
          [0,1],
          [1,1],
          [1,0],
          [0,0]
        ],
        "type": "Polygon"
      },
      "id": "polygon_feature",
      "properties": {
        "name": "shanghai"
      },
      "type": "Feature"
    }
  ],
  "type": "FeatureCollection"
}

How can I create an ID?

If you use IDs as indexes, you must ensure that all the IDs are unique. We recommend that you create IDs in the format of biz_id + timestamp.

What date format do I choose to create temporal indexes?

Temporal data in HBase Ganos is stored in the properties attribute. Temporal data is saved in timestamp format. A timestamp accurate to milliseconds is a 13-digit integer, for example, 1542628013000. A string type date is stored in the following format: 2018/11/19 19:46:53. If the date contains time zone information, it is stored in the following format: 2018/11/19T19:46:53Z. As shown in the following example, the dtg field in the properties attribute is a date type field. The name of the field can be customized. You can specify the date=properties.dtg parameter to create indexes on dates. date is the key of the parameter. properties.dtg is a date field in GeoJSON.

{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [125.6, 10.1]
  },
  "properties": {
    "name": "Dinagat Islands",
	"dtg": 1536041936000,
	"id":  "1"
  }
}

What are the possible reasons that cause slow temporal data queries?

  • Verify that indexes are created on the temporal data. GeoMesa is required if you want to create indexes on temporal data.
  • Verify that the date format of the query conditions is the same as that of the temporal data to be queried. Date type fields are stored in timestamp format (integer type, for example, 1542628013000). If the query conditions are of the string type, for example, 2018/11/19 19:46:53, the temporal indexes become invalid.

How can I update data? In HBase, when the same {row, column} is queried, only data of the latest version is returned. Therefore, data updating is equivalent to data overwriting. Example: insert rows 1:a,b,c and 1:a1,b1 in sequence. Only 1:a1,b1 is stored. Insert rows 1:a,b,c and 1:a1,b1,c1,d,e,f in sequence. Only 1:a1,b1,c1,d,e,f is stored.

How can I perform elevation queries?

Spatio-temporal indexes are two-dimensional, including spatial coordinates and temporal coordinates. Therefore, you cannot use spatio-temporal indexes to perform elevation queries. You can store elevation information in attributes and create indexes on the elevation information.

What are the considerations when I call the RESTful API to create a DataStore?

When you call the RESTful API to create a DataStore, you must specify the HBase catalog endpoint and ZooKeeper endpoint. These two parameters determine the location where the data is stored. Unlike data sources in other databases, a DataStore in this topic is the name of a configuration. You can use this name to find the HBase catalog and ZooKeeper service. If the HBase catalog and ZooKeeper service use different endpoints, we recommend that you create different DataStores for them. Otherwise, we recommend that you use the DataStore for both of them.

Why does the system return the same result when I query an index with the same name in two different DataStores? A DataStore is an alias. The endpoints of the HBase catalog and ZooKeeper service determine the DataStore that you query. If two different DataStores are using the same HBase catalog and ZooKeeper endpoints, the indexes with the same name in the two DataStores refer to the same index. As a result, the system returns the same query result.