1

I've been searching the net up and down for days now and can't find a definite answer to this question, neither on google nor on the official page (http://ora2pg.darold.net/).

Does ora2pg support Oracle's SDO_GEOMETRY spatial type?

If I run ora2pg on an Oracle test table I get an output like

CREATE TABLE platzerl2 (
        objectid bigint NOT NULL,
        name varchar(40),
        class varchar(25),
        st varchar(2),
        stfips varchar(2),
        placefip varchar(5),
        houseunits bigint,
        pop2000 bigint,
        pop_class integer,
        arealand double precision,
        areawater double precision,
        shape SDO_GEOMETRY,
        se_anno_cad_data bytea
);

Clearly SDO_GEOMETRY should read something like GEOMETRY, Postgres/PostGIS's spatial type.

So, is SDO_GEOMETRY unsupported or am I doing something wrong?

2
  • 1
    SDO_GEOMETRY doesn't appear in the source code (github.com/darold/ora2pg) so I'd say you'll need to add support for it yourself. Commented Jan 30, 2014 at 8:52
  • could you please post this as answer so that i can mark it as solved question?
    – lightxx
    Commented Jan 30, 2014 at 9:13

1 Answer 1

2

SDO_GEOMETRY doesn't appear in the source code (github.com/darold/ora2pg) so I'd say you'll need to add support for it yourself, or manually fix up the SDO_GEOMETRY columns using a second pass over your code with awk / sed / whatever.

ora2pg is written in Perl and looks fairly sane, so I suggest adding SDO_GEOMETRY support and sending a pull request on github; that way others who need it later will have support for it.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.