Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B11C1200C74 for ; Sun, 14 May 2017 20:21:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ACF9B160BB7; Sun, 14 May 2017 18:21:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CB390160BA3 for ; Sun, 14 May 2017 20:21:05 +0200 (CEST) Received: (qmail 83009 invoked by uid 500); 14 May 2017 18:21:05 -0000 Mailing-List: contact dev-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list dev@asterixdb.apache.org Received: (qmail 82993 invoked by uid 99); 14 May 2017 18:21:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 May 2017 18:21:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5411AC047F for ; Sun, 14 May 2017 18:21:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id C9HzKnd_CgBM for ; Sun, 14 May 2017 18:21:03 +0000 (UTC) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 29CB75F520 for ; Sun, 14 May 2017 18:21:02 +0000 (UTC) Received: by mail-oi0-f46.google.com with SMTP id h4so109542150oib.3 for ; Sun, 14 May 2017 11:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=BHT/02ieueeyF61T/FrDUIDVmE1Nck26imeCRiTiZz8=; b=WISj7coKTzxK4t6CUEtjVbLG13YjVZ+6qy3aLc/NDkhVQT9JwwaCBzczMwqNvvyYds man1YJtcSL1/8yB9CleWY/fBfWfH+YPvmFdfll/pJ0caQQHLM+kV9K9CJ6uSmk/J/ZbO wpNtJSE6HdTVmdUwIvYdMO0eU2h+bMjthVgg+4V5C1TSNsvcJebCEcEx890XPdTBPi00 r5mzO8LY0Ij/w944mkkSn898kGvBa4tkvFKMQsyYP4mHP+1tDxoqWr17JLUMUDeDQFkA yYfoTIPP04jQpW0W32NNwpgvLkYQK9L55wSAJ+WanK0vmLy8sFZ9DU3Lk7v5wunBT3nc 3wOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=BHT/02ieueeyF61T/FrDUIDVmE1Nck26imeCRiTiZz8=; b=r0LaCOUyFg93qb2mhFUU1ZvwSOBit1JRb3pNx8+u42w02v88h67gvfdXuiAvpQoPUm nYIhz4ANtMUu/S/eYRuc+EgerzhV11jEsTUTmxQ1GGc4kxwJbAOPGUJevnry4yIT6T54 vlm1hG67B1uqaOtUk71Ku/+TgEn3jaEEa0JJVVXvjlfTW79IxfbOLN2rCVz99mKN9il0 dDz+AuApR/2HIDe+3ke1hSaP/JKPdNsaCUv0+LTTSI1Qbl+GP9lSveNbVG4HpWFHozND J3k7mdWKF7NmckqX+Y3+LoirAexCWGXPkwRS6Tp/qjlfjB9urKiHl3/zvG7HbL5J0aOU wCzQ== X-Gm-Message-State: AODbwcAVIply3JM6lBzk8wUrKwR0cgfWCYcGmOVxQegz45tOuMrYB7HL bEkRDYdUjfKYJggwt1zxuX0sIy/E32+j X-Received: by 10.157.14.14 with SMTP id c14mr1249368otc.90.1494786060665; Sun, 14 May 2017 11:21:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.49.38 with HTTP; Sun, 14 May 2017 11:21:00 -0700 (PDT) In-Reply-To: References: From: Wail Alkowaileet Date: Sun, 14 May 2017 21:21:00 +0300 Message-ID: Subject: Re: ASTERIXDB-1371: Geo data type format question To: dev@asterixdb.apache.org Content-Type: multipart/alternative; boundary="001a113e016a294941054f800097" archived-at: Sun, 14 May 2017 18:21:06 -0000 --001a113e016a294941054f800097 Content-Type: text/plain; charset="UTF-8" Just for reference, two years ago we had a discussion about serialization for clean JSON: http://www.mail-archive.com/dev@asterixdb.incubator.apache.org/msg00882.html On Sun, May 14, 2017 at 9:08 PM, Preston Carman wrote: > Thanks for pointing out we have functions that provide a way to create > the data using numeric values. As a review, we have functions to > create points using numeric types and the serialized form (ADM) holds > the special string format. > > function: create_point(47.44,80.65) > adm: point("47.44,80.65") > > On Sun, May 14, 2017 at 10:58 AM, Wail Alkowaileet > wrote: > > Sorry ! For some reason I missed a whole page. > > > > On Sun, May 14, 2017 at 8:54 PM, Yingyi Bu wrote: > > > >> Hi Wail, > >> > >> They're documented at: > >> https://ci.apache.org/projects/asterixdb/aql/ > >> builtins.html#SpatialFunctions > >> The prefixes in the documentation are "create_". > >> > >> Best, > >> Yingyi > >> > >> On Sun, May 14, 2017 at 10:51 AM, Wail Alkowaileet > >> wrote: > >> > >> > Previously, AsterixDB used to have such functions [1] prefixed with > >> > "create-*()". The functions are still in the master [2] .. but not > >> > documented. > >> > For the current spatial constructors, I think they're inspired by > WKT. I > >> > cannot be helpful on explaining the reason why... sorry! > >> > > >> > [1] > >> > https://github.com/apache/asterixdb/blob/release-0.8.7/ > >> > asterix-doc/src/site/markdown/aql/functions.md > >> > [2] > >> > https://github.com/apache/asterixdb/blob/master/ > >> > asterixdb/asterix-om/src/main/java/org/apache/asterix/om/ > >> > functions/BuiltinFunctions.java > >> > > >> > On Sun, May 14, 2017 at 8:00 PM, Preston Carman > >> > wrote: > >> > > >> > > 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 > >> > > > >> > > >> > > >> > > >> > -- > >> > > >> > *Regards,* > >> > Wail Alkowaileet > >> > > >> > > > > > > > > -- > > > > *Regards,* > > Wail Alkowaileet > -- *Regards,* Wail Alkowaileet --001a113e016a294941054f800097--