[postgis-devel] Oracle SDO_GEOMETRY vs PostGIS WKT
Andrea Peri
aperi2007 at gmail.com
Wed Aug 25 08:08:50 PDT 2010
>Do you have any answer to Jorges initial question why the Oracle geometry representation (sdo_geometry) seems so complicated if it is not about topology?
It not seem complicated it is complicated :)
1)
almost in the 10g version, oracle don't support EPSG definition of SRS,
but use another coding.
2)
define a new table is easy:
create table table-1 ( id number, poi_name varchar2(32), location sdo_geometry);
but when need to insert in it is a bit more complex then in postgis.
insert into table-1 values
( 1,
'aaaa',
sdo_geometry(
2001, // sdo_gtype attribute: "2" in 2001 mean 2-dimensionality
NULL, // this was the SRID (SRS) code
sdo_point_type (
xx, // first coordinate,
yy, // second coordinate,
NULL, // third coordinate
),
NULL,
NULL
),
);
as you can see insert a point is more complex then a simple WKT use
from postgis.
Too complex again if you want store a Linestring or a polygon beacause
must use a structure like an array.
sdo_geometry (
2001, // again use 2001 because you polygon or linestirng is 2-dimensional
8307 , // srid code
NULL, // sdo_pont attribute set to null
sdo_elem_info_array (
...
),
sdo_ordinate_array (
....
)
)
etc....
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20100825/25a83365/attachment.html>
More information about the postgis-devel
mailing list