# HG changeset patch # User Ingo Weinzierl # Date 1336472568 0 # Node ID bb116a8d6e194af7a371558ef951bd54767b342d # Parent b3d5e6d6e468dfd46913ebe0fe96695341927d69 Changed the geometry type of 'catchments' from polygon to multipolygon. flys-backend/trunk@4356 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r b3d5e6d6e468 -r bb116a8d6e19 flys-backend/ChangeLog --- a/flys-backend/ChangeLog Tue May 08 07:06:37 2012 +0000 +++ b/flys-backend/ChangeLog Tue May 08 10:22:48 2012 +0000 @@ -1,3 +1,11 @@ +2012-05-08 Ingo Weinzierl + + * doc/schema/oracle-spatial_idx.sql: Set the geometry type of 'catchments' + to 'multipolygon'. + + * src/main/java/de/intevation/flys/model/Catchment.java: The geometry + attribute in such instances is now from type 'Geometry'. + 2012-05-08 Ingo Weinzierl * doc/schema/import-dems.sql: New. Insert statements to insert dems into diff -r b3d5e6d6e468 -r bb116a8d6e19 flys-backend/doc/schema/oracle-spatial_idx.sql --- a/flys-backend/doc/schema/oracle-spatial_idx.sql Tue May 08 07:06:37 2012 +0000 +++ b/flys-backend/doc/schema/oracle-spatial_idx.sql Tue May 08 10:22:48 2012 +0000 @@ -1,4 +1,4 @@ -CREATE INDEX catchment_spatial_idx ON catchment(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=polygon'); +CREATE INDEX catchment_spatial_idx ON catchment(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=multipolygon'); CREATE INDEX river_axes_km_spatial_idx ON river_axes_km(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=point'); CREATE INDEX buildings_spatial_idx ON buildings(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); CREATE INDEX fixpoints_spatial_idx ON fixpoints(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT'); diff -r b3d5e6d6e468 -r bb116a8d6e19 flys-backend/src/main/java/de/intevation/flys/model/Catchment.java --- a/flys-backend/src/main/java/de/intevation/flys/model/Catchment.java Tue May 08 07:06:37 2012 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/Catchment.java Tue May 08 10:22:48 2012 +0000 @@ -15,7 +15,7 @@ import org.hibernate.Query; import org.hibernate.annotations.Type; -import com.vividsolutions.jts.geom.Polygon; +import com.vividsolutions.jts.geom.Geometry; import de.intevation.flys.backend.SessionHolder; @@ -29,7 +29,7 @@ private BigDecimal area; private String name; private River river; - private Polygon geom; + private Geometry geom; public Catchment() { } @@ -83,12 +83,12 @@ @Column(name = "geom") @Type(type = "org.hibernatespatial.GeometryUserType") - public Polygon getGeom() { + public Geometry getGeom() { return geom; } - public void setGeom(Polygon geom) { + public void setGeom(Geometry geom) { this.geom = geom; }