In this section, we are going to use the point built-in data type from Neo4j. Before that, we need to understand a few concepts purely related to spatial data.
Understanding geographic coordinate systems
The spatial data we'll be talking about in this chapter are points on the Earth's surface. There is no unique way to assign coordinates to each point.
Coordinates of a point P on a fixed radius sphere rely on two angles: the longitude, the angle from a reference meridian (θ in the following diagram), and the latitude, the angle with respect to the equator (δ in the following diagram):
Changing the longitude involves moving in a north-south direction, which corresponds to the y-axis in other projection systems. This means in a general case that longitude is denoted with an x and latitude with a y, which is counter-intuitive.
But, as you may know, the Earth is not a perfect sphere. Indeed, the radius close to the equator is higher than...