create or replace function real_st_astext( geom in clob ) return clob is geometry clob; tempGeom clob; begin geometry := upper(geom); if geom like ‘(((%‘ then geometry := ‘MULTIPOLYGON‘||geom; else if geom like ‘((%‘ then tempGeom := substr(geom, instr(geom, ‘((‘)+2, length(geom)); if tempGeom like ‘%(%‘ then geometry := ‘MULTILINESTRING ‘||geom; else geometry := ‘POLYGON ‘||geom; end if; else if geom like ‘(%‘ then if geom like ‘%,%‘ then geometry := ‘LINESTRING‘||geom; else geometry := ‘POINT‘||geom; end if; end if; end if; end if; return geometry; end;
时间: 2024-11-06 15:31:52