2

I am using springboot, hibernate-spatial with postgis database to store and query spatial objects. I wonder if there is a way to create GIST spatial index on postgis with JPA annotations. I have only seen very old posts about spatial index creation which is working only on Point types.

The code below creates BTREE index on geometry column which is not recommended by postgis.

@Table(name = "region",indexes = {@Index(name = "region_spatial_index", columnList="geometry")

Would like to know what is the best way of creating GIST spatial indexes on postgis when using JPA

0 Answers0