Spatial Data from Postgis to Java/REST with RestEasy + Jackson GeometryFactory gf = new GeometryFactory();
Coordinate c[] = new Coordinate[pontos.length];
String ap[];
for (int i = 0; i < c.length; i++) {
ap = pontos[i].split(",");
c[i] = new Coordinate(Double.parseDouble(ap[0]), Double.parseDouble(ap[1]));
}
Rota r = new Rota(id, usuario, descricao, gf.createLineString(c));
rotaBC.create(r);