- Git
- Java 17
- Docker
- IntelliJ Community
- Heroku CLI
//pgAdmin Query Tool:
CREATE DATABASE cities
WITH
OWNER = postgres
ENCODING = 'UTF8'
CONNECTION LIMIT = -1;
//PSQL Tool:
CREATE EXTENSION cube;
CREATE EXTENSION earthdistance;
- Postgres Earth distance
- earthdistance--1.0--1.1.sql
- OPERATOR <@>
- postgrescheatsheet
- datatype-geometric
psql -U youruser cities
Point
select ((select lat_lon from cidade where id = 4929) <@> (select lat_lon from cidade where id=5254)) as distance;
Cube
select earth_distance(
ll_to_earth(-21.95840072631836,-47.98820114135742),
ll_to_earth(-22.01740074157715,-47.88600158691406)
) as distance;
- Java 17
- Maven Project
- Jar
- Spring Web
- Spring Data JPA
- PostgreSQL Driver