WITH polys1500 AS (
SELECT mdsys.sdo_geometry(2003,82469,NULL,sdo_elem_info_array(1,1003,3),sdo_ordinate_array( 1,1, 10,10)) AS geom FROM dual UNION ALL
SELECT mdsys.sdo_geometry(2003,82469,NULL,sdo_elem_info_array(1,1003,3),sdo_ordinate_array( 5,5, 12,12)) AS geom FROM dual
)
,
polys900 AS (
SELECT mdsys.sdo_geometry(2003,82469,NULL,sdo_elem_info_array(1,1003,3),sdo_ordinate_array(-1,-1, 7,7)) AS geom FROM dual UNION ALL
SELECT mdsys.sdo_geometry(2003,82469,NULL,sdo_elem_info_array(1,1003,3),sdo_ordinate_array( 6, 0, 8,2)) AS geom FROM dual
)
SELECT SDO_AGGR_UNION(MDSYS.SDOAGGRTYPE(polys1500.geom, 0.005)) p1500un,
SDO_AGGR_UNION(MDSYS.SDOAGGRTYPE( polys900.geom, 0.005)) p900un,
SDO_GEOM.SDO_INTERSECTION( SDO_AGGR_UNION(MDSYS.SDOAGGRTYPE(polys1500.geom, 0.005)), SDO_AGGR_UNION(MDSYS.SDOAGGRTYPE( polys900.geom, 0.005)), 0.005) intr
FROM polys1500, polys900;
May be you can adapt the code. When doing the union i loose information about each one and I cannot loose that info.
I want to crop A and limit it to the area of B.Others include the fact that you have access to Spatial's aggregate and geoprocessing functionality but didn't tell me. I thought you didn't because you were asking about SC4O's complementary functionality for Locator users because you had downloaded it.
B overlaps to A, is smaller than A and is completely inside A.
Ex: It is like if I had A as France and B as Paris. Where France and Paris were two columns on different tables each one composed by severall geometries like the ones above described.
With wpolys900 as (
SELECT SDO_AGGR_UNION(MDSYS.SDOAGGRTYPE( polys900.geom, 0.005)) as uGeom
FROM polys900;
)
SELECT SDO_GEOM.SDO_INTERSECTION(a.geom,b.uGeom, 0.005) as rGeom
FROM polys1500 a, wpolys900 b
WHERE SDO_ANYINTERACT(a.geom,b.uGeom) = 'TRUE' /* Limits processing to area defined by table900 */;
Do not forget that this sort of polygon processing is most likely going to return polygon/multipolygon and compound 2004 geometries (point/line/polygon). Where a result is a 2004 SDO_GEOMETRY you will have to enact extract processing to extract the polygon elements from them. There are methods for this that have been dealt with on this forum before. I also deal with it on my website via a blog article that you may care to look for. Enact suitable searching on this before creating a new forum post that is separate to this one if you can't work out how to do it.I think I am having problems because the type of geometry I have for Paris is like this MDSYS.SDO_GEOMETRY(2007,8307,MDSYS.SDO_POINT_TYPE(...),....Why should these cause any processing issues? I cannot see why they should as Oracle can intersect a multipolygon by a polygon as easily as poly/poly.