3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.