1

How can i make a

com.vividsolutions.jts.geom.MultiPolygon

objects as they occur e.g. from GeoTools using Hibernate-Spatial into a Postgis database?

Denis Lukenich
  • 3,084
  • 1
  • 20
  • 38

1 Answers1

0

Using Hibernate Spatial 5 an example table (using the Annotations-Method) could look like:

@Entity
public class MultiPolygon {

    @Id
    private int id;

    @Column(columnDefinition = "geometry(MultiPolygon,4326)")
    private com.vividsolutions.jts.geom.MultiPolygon polygon;

    // ... Getters - setters 
}
Denis Lukenich
  • 3,084
  • 1
  • 20
  • 38