{
  "context": [
    {
      "type": "contextDef",
      "subType": "prefix",
      "key": "aGeo",
      "value": {
        "type": "term",
        "subType": "namedNode",
        "value": "http://example.org/geo#",
        "loc": {
          "sourceLocationType": "source",
          "start": 13,
          "end": 38
        }
      },
      "loc": {
        "sourceLocationType": "source",
        "start": 0,
        "end": 38
      }
    }
  ],
  "subType": "select",
  "where": {
    "type": "pattern",
    "subType": "group",
    "patterns": [
      {
        "type": "pattern",
        "subType": "bgp",
        "triples": [
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "variable",
              "value": "a",
              "loc": {
                "sourceLocationType": "source",
                "start": 65,
                "end": 67
              }
            },
            "predicate": {
              "type": "term",
              "subType": "namedNode",
              "value": "placeName",
              "loc": {
                "sourceLocationType": "source",
                "start": 68,
                "end": 82
              },
              "prefix": "aGeo"
            },
            "object": {
              "type": "term",
              "subType": "literal",
              "value": "Grenoble",
              "loc": {
                "sourceLocationType": "source",
                "start": 83,
                "end": 93
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 65,
              "end": 93
            }
          },
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "variable",
              "value": "a",
              "loc": {
                "sourceLocationType": "source",
                "start": 104,
                "end": 106
              }
            },
            "predicate": {
              "type": "term",
              "subType": "namedNode",
              "value": "locationX",
              "loc": {
                "sourceLocationType": "source",
                "start": 107,
                "end": 121
              },
              "prefix": "aGeo"
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "axLoc",
              "loc": {
                "sourceLocationType": "source",
                "start": 122,
                "end": 128
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 104,
              "end": 128
            }
          },
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "variable",
              "value": "a",
              "loc": {
                "sourceLocationType": "source",
                "start": 139,
                "end": 141
              }
            },
            "predicate": {
              "type": "term",
              "subType": "namedNode",
              "value": "locationY",
              "loc": {
                "sourceLocationType": "source",
                "start": 142,
                "end": 156
              },
              "prefix": "aGeo"
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "ayLoc",
              "loc": {
                "sourceLocationType": "source",
                "start": 157,
                "end": 163
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 139,
              "end": 163
            }
          },
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "variable",
              "value": "b",
              "loc": {
                "sourceLocationType": "source",
                "start": 175,
                "end": 177
              }
            },
            "predicate": {
              "type": "term",
              "subType": "namedNode",
              "value": "placeName",
              "loc": {
                "sourceLocationType": "source",
                "start": 178,
                "end": 192
              },
              "prefix": "aGeo"
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "neighbor",
              "loc": {
                "sourceLocationType": "source",
                "start": 193,
                "end": 202
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 175,
              "end": 202
            }
          },
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "variable",
              "value": "b",
              "loc": {
                "sourceLocationType": "source",
                "start": 213,
                "end": 215
              }
            },
            "predicate": {
              "type": "term",
              "subType": "namedNode",
              "value": "locationX",
              "loc": {
                "sourceLocationType": "source",
                "start": 216,
                "end": 230
              },
              "prefix": "aGeo"
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "bxLoc",
              "loc": {
                "sourceLocationType": "source",
                "start": 231,
                "end": 237
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 213,
              "end": 237
            }
          },
          {
            "type": "triple",
            "subject": {
              "type": "term",
              "subType": "variable",
              "value": "b",
              "loc": {
                "sourceLocationType": "source",
                "start": 248,
                "end": 250
              }
            },
            "predicate": {
              "type": "term",
              "subType": "namedNode",
              "value": "locationY",
              "loc": {
                "sourceLocationType": "source",
                "start": 251,
                "end": 265
              },
              "prefix": "aGeo"
            },
            "object": {
              "type": "term",
              "subType": "variable",
              "value": "byLoc",
              "loc": {
                "sourceLocationType": "source",
                "start": 266,
                "end": 272
              }
            },
            "loc": {
              "sourceLocationType": "source",
              "start": 248,
              "end": 272
            }
          }
        ],
        "loc": {
          "sourceLocationType": "source",
          "start": 65,
          "end": 274
        }
      },
      {
        "type": "pattern",
        "subType": "filter",
        "expression": {
          "type": "expression",
          "subType": "operation",
          "operator": "<",
          "args": [
            {
              "type": "expression",
              "subType": "functionCall",
              "function": {
                "type": "term",
                "subType": "namedNode",
                "value": "distance",
                "loc": {
                  "sourceLocationType": "source",
                  "start": 293,
                  "end": 306
                },
                "prefix": "aGeo"
              },
              "args": [
                {
                  "type": "term",
                  "subType": "variable",
                  "value": "axLoc",
                  "loc": {
                    "sourceLocationType": "source",
                    "start": 307,
                    "end": 313
                  }
                },
                {
                  "type": "term",
                  "subType": "variable",
                  "value": "ayLoc",
                  "loc": {
                    "sourceLocationType": "source",
                    "start": 315,
                    "end": 321
                  }
                },
                {
                  "type": "term",
                  "subType": "variable",
                  "value": "bxLoc",
                  "loc": {
                    "sourceLocationType": "source",
                    "start": 323,
                    "end": 329
                  }
                },
                {
                  "type": "term",
                  "subType": "variable",
                  "value": "byLoc",
                  "loc": {
                    "sourceLocationType": "source",
                    "start": 331,
                    "end": 337
                  }
                }
              ],
              "distinct": false,
              "loc": {
                "sourceLocationType": "source",
                "start": 293,
                "end": 338
              }
            },
            {
              "type": "term",
              "subType": "literal",
              "value": "10",
              "langOrIri": {
                "type": "term",
                "subType": "namedNode",
                "value": "http://www.w3.org/2001/XMLSchema#integer",
                "loc": {
                  "sourceLocationType": "noMaterialize"
                }
              },
              "loc": {
                "sourceLocationType": "source",
                "start": 341,
                "end": 343
              }
            }
          ],
          "loc": {
            "sourceLocationType": "source",
            "start": 291,
            "end": 345
          }
        },
        "loc": {
          "sourceLocationType": "source",
          "start": 284,
          "end": 345
        }
      }
    ],
    "loc": {
      "sourceLocationType": "source",
      "start": 63,
      "end": 355
    }
  },
  "solutionModifiers": {},
  "datasets": {
    "type": "datasetClauses",
    "clauses": [],
    "loc": {
      "sourceLocationType": "noMaterialize"
    }
  },
  "variables": [
    {
      "type": "term",
      "subType": "variable",
      "value": "neighbor",
      "loc": {
        "sourceLocationType": "source",
        "start": 47,
        "end": 56
      }
    }
  ],
  "loc": {
    "sourceLocationType": "inlinedSource",
    "newSource": "PREFIX aGeo: <http://example.org/geo#>\n\nSELECT ?neighbor\nWHERE { ?a aGeo:placeName \"Grenoble\" .\n        ?a aGeo:locationX ?axLoc .\n        ?a aGeo:locationY ?ayLoc .\n\n        ?b aGeo:placeName ?neighbor .\n        ?b aGeo:locationX ?bxLoc .\n        ?b aGeo:locationY ?byLoc .\n\n        FILTER ( aGeo:distance(?axLoc, ?ayLoc, ?bxLoc, ?byLoc) < 10 ) .\n      }\n",
    "start": 0,
    "end": 9007199254740991,
    "loc": {
      "sourceLocationType": "source",
      "start": 0,
      "end": 355
    },
    "startOnNew": 0,
    "endOnNew": 355
  },
  "type": "query"
}
