django
django copied to clipboard
Fixed GIS tests with Oracle 23c.
My attempt at a patch to allow GIS tests to pass with Oracle 23c.
The change to LayerMapping
is due to Oracle 23c changing "MULTI" geometries containing one value to their single type.
create table LAYERMAP_COUNTY_TEST
(
ID NUMBER(11),
NAME NVARCHAR2(25),
STATE_ID NUMBER(11),
MPOLY MDSYS.SDO_GEOMETRY
);
INSERT INTO "LAYERMAP_COUNTY_TEST" ("NAME",
"STATE_ID",
"MPOLY")
VALUES ('Galveston', 3, SDO_GEOMETRY('MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)))',4269));
INSERT INTO "LAYERMAP_COUNTY_TEST" ("NAME",
"STATE_ID",
"MPOLY")
VALUES ('Hawaii', 4, SDO_GEOMETRY('MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)),
((15 5, 40 10, 10 20, 5 10, 15 5)))',4269));
select SDO_UTIL.TO_WKTGEOMETRY("LAYERMAP_COUNTY_TEST"."MPOLY")
from LAYERMAP_COUNTY_TEST;
"POLYGON ((30.0 20.0, 45.0 40.0, 10.0 40.0, 30.0 20.0))"
"MULTIPOLYGON (((30.0 20.0, 45.0 40.0, 10.0 40.0, 30.0 20.0)), ((15.0 5.0, 40.0 10.0, 10.0 20.0, 5.0 10.0, 15.0 5.0)))"