asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Preston Carman <prest...@apache.org>
Subject ASTERIXDB-1371: Geo data type format question
Date Sun, 14 May 2017 17:00:45 GMT
I have question about the format used by AsterixDB to store points,
lines, etc.[1]. As we are adding support for other formats [2], I
wanted to ask a question about our current format. In the current
format, we use a keyword to specify the type followed by parenthesis
around a specially formatted string. The uses spaces and commas to
separate numeric values for defining the given geo data type. Why use
a string with a special string format?

Current Examples:
Point : point("80.10d, -10E5")
Line : line("10.1234,11.1e-1 +10.2E-2,-11.22")
Rectangle : rectangle("5.1,11.8 87.6,15.6548")
Circle : circle("10.1234,1.11 0.102")
Polygon : polygon("-1.2,+1.3e2 -2.14E+5,2.15 -3.5e+2,03.6 -4.6E-3,+4.81")

Is there a reason you would not want to use numeric types instead of
specially defined string? Or even reused types to define new types
like using points to define a line. The following are some examples of
how we could reuse AsterixDB types to define points, lines, etc.:

Type Based Example
Point : point(double, double)
Line : line(point(double,double), point(double,double))
Rectangle : rectangle(point(double,double), point(double,double))
Circle : circle(point(double,double),double)
Polygon : polygon(point(double,double), point(double,double),
point(double,double), point(double,double))

It seems the other formats we are looking at reuse numeric type in
their type definitions. Thoughts?

[1] http://asterixdb.apache.org/docs/0.9.1/datamodel.html#PrimitiveTypesPoint
[2] https://issues.apache.org/jira/browse/ASTERIXDB-1371

Mime
View raw message