How gaps (fill) when converting to a 2006 geometry in a geometry of 2002

Is it possible to fill (filling) the differences when converting to a geometry in a single geometry of 2002 in 2006. I have a solution for the conversion of 2006 to 2002 provided by BHall but on other investigation of my dataset some of the multi line polygons are weak I need to fill and I don't know how to go on this subject.

Here is a simple example of what I'm trying to reach

Front

SELECT (sdo_geometry (2006, 81989, NULL,))

MDSYS.sdo_elem_info_array (1,2,1,5,2,1,9,2,1,13,2,1),

MDSYS.sdo_ordinate_array (16,0.999,16.998,-0,001, 17.253,-0.001, 18.003, 0.999, 18.003, 0.999, 19.001, 0.999, 19.001, 0.999, 19,999,-0,001)))

OF the double

After

SELECT (sdo_geometry (2006, 81989, NULL,))

MDSYS.sdo_elem_info_array (1,2,1),

MDSYS.sdo_ordinate_array (16,0.999,17.253,-0.001,18.003,0.999,19.001,0.999,19.999,-0.001))) DOUBLE

Thanks in advance

Hi rock,

Well, I ran all three examples that you sent through my code and it seemed to work!  I pasted the code above in a "pre" html tag and I can still see things deteriorated.  Lemme try this with a different syntax.  You know that this new forum software not only grew on me.  It's just clumsy and exaggerated.  And those weird people at the top.  What were they looking at?  I imagine that Larry on some loft above.

Anyway, you are right that when Bryan code is used to convert the multiple string, the gaps are filled.  But that's because he wrote of this approach.

Really, there is no generic way to convert a multiple line string we are discussing.  If you use SDO_UTIL. CONCATENATE_LINES, it will leave gaps.

See you soon,.

Paul

CREATE OR REPLACE PACKAGE dz_gap_fill
AUTHID CURRENT_USER
AS

   FUNCTION linear_gap_filler(
       p_input            IN  MDSYS.SDO_GEOMETRY
      ,p_tolerance        IN  NUMBER DEFAULT 0.05
   ) RETURN MDSYS.SDO_GEOMETRY;

END dz_gap_fill;

CREATE OR REPLACE PACKAGE BODY dz_gap_fill
AS

   FUNCTION fast_point(
       p_x             IN  NUMBER
      ,p_y             IN  NUMBER
      ,p_z             IN  NUMBER DEFAULT NULL
      ,p_m             IN  NUMBER DEFAULT NULL
      ,p_srid          IN  NUMBER DEFAULT 8265
   ) RETURN MDSYS.SDO_GEOMETRY
   AS
   BEGIN

      --------------------------------------------------------------------------
      -- Step 10
      -- Check over incoming parameters
      --------------------------------------------------------------------------
      IF p_x IS NULL
      OR p_y IS NULL
      THEN
         RAISE_APPLICATION_ERROR(-20001,'x and y cannot be NULL');

      END IF;

      --------------------------------------------------------------------------
      -- Step 20
      -- Do the simplest solution first
      --------------------------------------------------------------------------
      IF  p_z IS NULL
      AND p_m IS NULL
      THEN
         RETURN SDO_GEOMETRY(
             2001
            ,p_srid
            ,SDO_POINT_TYPE(
                 p_x
                ,p_y
                ,NULL
             )
            ,NULL
            ,NULL
         );

      END IF;

      --------------------------------------------------------------------------
      -- Step 30
      -- Do the other wilder choices
      --------------------------------------------------------------------------
      IF p_z IS NULL
      AND p_m IS NOT NULL
      THEN
         RETURN SDO_GEOMETRY(
             3301
            ,p_srid
            ,SDO_POINT_TYPE(
                 p_x
                ,p_y
                ,p_m
             )
            ,NULL
            ,NULL
         );

      ELSIF p_z IS NOT NULL
      AND   p_m IS NULL
      THEN
         RETURN SDO_GEOMETRY(
             3001
            ,p_srid
            ,SDO_POINT_TYPE(
                 p_x
                ,p_y
                ,p_z
             )
            ,NULL
            ,NULL
         );

      ELSIF p_z IS NOT NULL
      AND   p_m IS NOT NULL
      THEN
         RETURN SDO_GEOMETRY(
             4401
            ,p_srid
            ,NULL
            ,SDO_ELEM_INFO_ARRAY(1,1,1)
            ,SDO_ORDINATE_ARRAY(p_x,p_y,p_z,p_m)
         );

      ELSE
         RAISE_APPLICATION_ERROR(-20001,'ERR!');
      END IF;

   END fast_point;

   FUNCTION get_start_point(
      p_input        IN  MDSYS.SDO_GEOMETRY
   ) RETURN MDSYS.SDO_GEOMETRY
   AS
      int_dims PLS_INTEGER;
      int_gtyp PLS_INTEGER;
      int_lrs  PLS_INTEGER;

   BEGIN

      --------------------------------------------------------------------------
      -- Step 10
      -- Check over incoming parameters
      --------------------------------------------------------------------------
      IF p_input IS NULL
      THEN
         RETURN NULL;

      END IF;

      --------------------------------------------------------------------------
      -- Step 20
      -- Gather information about the geometry
      --------------------------------------------------------------------------
      int_dims := p_input.get_dims();
      int_gtyp := p_input.get_gtype();
      int_lrs  := p_input.get_lrs_dim();

      --------------------------------------------------------------------------
      -- Step 30
      -- Handle point and multipoint inputs
      --------------------------------------------------------------------------
      IF int_gtyp = 1
      THEN
         RETURN p_input;

      ELSIF int_gtyp = 5
      THEN
         RETURN SDO_UTIL.EXTRACT(p_input,1);

      END IF;

      --------------------------------------------------------------------------
      -- Step 40
      -- Return results
      --------------------------------------------------------------------------
      IF int_dims = 2
      THEN
         RETURN fast_point(
             p_input.SDO_ORDINATES(1)
            ,p_input.SDO_ORDINATES(2)
            ,NULL
            ,NULL
            ,p_input.SDO_SRID
         );

      ELSIF  int_dims = 3
      AND int_lrs = 3
      THEN
         RETURN fast_point(
             p_input.SDO_ORDINATES(1)
            ,p_input.SDO_ORDINATES(2)
            ,NULL
            ,p_input.SDO_ORDINATES(3)
            ,p_input.SDO_SRID
         );

      ELSIF  int_dims = 3
      AND int_lrs = 0
      THEN
         RETURN fast_point(
             p_input.SDO_ORDINATES(1)
            ,p_input.SDO_ORDINATES(2)
            ,p_input.SDO_ORDINATES(3)
            ,NULL
            ,p_input.SDO_SRID
         );

      ELSIF  int_dims = 4
      AND int_lrs IN (4,0)
      THEN
         RETURN fast_point(
             p_input.SDO_ORDINATES(1)
            ,p_input.SDO_ORDINATES(2)
            ,p_input.SDO_ORDINATES(3)
            ,p_input.SDO_ORDINATES(4)
            ,p_input.SDO_SRID
         );

      ELSIF  int_dims = 4
      AND int_lrs = 3
      THEN
         RETURN fast_point(
             p_input.SDO_ORDINATES(1)
            ,p_input.SDO_ORDINATES(2)
            ,p_input.SDO_ORDINATES(4)
            ,p_input.SDO_ORDINATES(3)
            ,p_input.SDO_SRID
         );

      ELSE
         RAISE_APPLICATION_ERROR(-20001,'ERR!');

      END IF;

   END get_start_point;

   FUNCTION get_end_point(
      p_input        IN  MDSYS.SDO_GEOMETRY
   ) RETURN MDSYS.SDO_GEOMETRY
   AS
      int_dims PLS_INTEGER;
      int_gtyp PLS_INTEGER;
      int_lrs  PLS_INTEGER;
      int_len  PLS_INTEGER;

   BEGIN

      --------------------------------------------------------------------------
      -- Step 10
      -- Check over incoming parameters
      --------------------------------------------------------------------------
      IF p_input IS NULL
      THEN
         RETURN NULL;

      END IF;

      --------------------------------------------------------------------------
      -- Step 20
      -- Gather information about the geometry
      --------------------------------------------------------------------------
      int_dims := p_input.get_dims();
      int_gtyp := p_input.get_gtype();
      int_lrs  := p_input.get_lrs_dim();
      int_len  := p_input.SDO_ORDINATES.COUNT();

      --------------------------------------------------------------------------
      -- Step 30
      -- Handle point and multipoint inputs
      --------------------------------------------------------------------------
      IF int_gtyp = 1
      THEN
         RETURN p_input;
      ELSIF int_gtyp = 5
      THEN
         RETURN SDO_UTIL.EXTRACT(
             p_input
            ,SDO_UTIL.GETNUMELEM(p_input)
         );
      END IF;

      --------------------------------------------------------------------------
      -- Step 40
      -- Return results
      --------------------------------------------------------------------------
      IF int_dims = 2
      THEN
         RETURN fast_point(
             p_input.SDO_ORDINATES(int_len - 1)
            ,p_input.SDO_ORDINATES(int_len)
            ,NULL
            ,NULL
            ,p_input.SDO_SRID
         );

      ELSIF  int_dims = 3
      AND int_lrs = 3
      THEN
         RETURN fast_point(
             p_input.SDO_ORDINATES(int_len - 2)
            ,p_input.SDO_ORDINATES(int_len - 1)
            ,NULL
            ,p_input.SDO_ORDINATES(int_len)
            ,p_input.SDO_SRID
         );

      ELSIF  int_dims = 3
      AND int_lrs = 0
      THEN
         RETURN fast_point(
             p_input.SDO_ORDINATES(int_len - 2)
            ,p_input.SDO_ORDINATES(int_len - 1)
            ,p_input.SDO_ORDINATES(int_len)
            ,NULL
            ,p_input.SDO_SRID
         );

      ELSIF  int_dims = 4
      AND int_lrs IN (4,0)
      THEN
         RETURN fast_point(
             p_input.SDO_ORDINATES(int_len - 3)
            ,p_input.SDO_ORDINATES(int_len - 2)
            ,p_input.SDO_ORDINATES(int_len - 1)
            ,p_input.SDO_ORDINATES(int_len)
            ,p_input.SDO_SRID
         );

      ELSIF  int_dims = 4
      AND int_lrs = 3
      THEN
         RETURN fast_point(
             p_input.SDO_ORDINATES(int_len - 3)
            ,p_input.SDO_ORDINATES(int_len - 2)
            ,p_input.SDO_ORDINATES(int_len)
            ,p_input.SDO_ORDINATES(int_len - 1)
            ,p_input.SDO_SRID
         );

      ELSE
         RAISE_APPLICATION_ERROR(-20001,'ERR!');

      END IF;

   END get_end_point;

   FUNCTION is_spaghetti(
       p_input             IN  MDSYS.SDO_GEOMETRY
      ,p_tolerance         IN  NUMBER DEFAULT 0.05
   ) RETURN VARCHAR2
   AS
      num_tolerance    NUMBER := p_tolerance;
      ary_strings      MDSYS.SDO_GEOMETRY_ARRAY := MDSYS.SDO_GEOMETRY_ARRAY();
      ary_starts       MDSYS.SDO_GEOMETRY_ARRAY := MDSYS.SDO_GEOMETRY_ARRAY();
      ary_ends         MDSYS.SDO_GEOMETRY_ARRAY := MDSYS.SDO_GEOMETRY_ARRAY();
      int_count        PLS_INTEGER;
      ary_start_count  MDSYS.SDO_NUMBER_ARRAY := MDSYS.SDO_NUMBER_ARRAY();
      ary_end_count    MDSYS.SDO_NUMBER_ARRAY := MDSYS.SDO_NUMBER_ARRAY();
      ary_inside_count MDSYS.SDO_NUMBER_ARRAY := MDSYS.SDO_NUMBER_ARRAY();

   BEGIN

      --------------------------------------------------------------------------
      -- Step 10
      -- Check over incoming parameters
      --------------------------------------------------------------------------
      IF p_input IS NULL
      THEN
         RETURN NULL;

      ELSIF p_input.get_gtype = 2
      THEN
         RETURN 'FALSE';

      ELSIF p_input.get_gtype <> 6
      THEN
         RAISE_APPLICATION_ERROR(-20001,'input gtype must be 2 or 6');

      END IF;

      IF num_tolerance IS NULL
      THEN
         num_tolerance := 0.05;

      END IF;

      --------------------------------------------------------------------------
      -- Step 20
      -- Break multistring into single linestrings with nodes
      --------------------------------------------------------------------------
      int_count := SDO_UTIL.GETNUMELEM(p_input);
      ary_strings.EXTEND(int_count);
      ary_starts.EXTEND(int_count);
      ary_ends.EXTEND(int_count);
      ary_start_count.EXTEND(int_count);
      ary_end_count.EXTEND(int_count);
      ary_inside_count.EXTEND(int_count);
      FOR i IN 1 .. int_count
      LOOP
         ary_strings(i) := SDO_UTIL.EXTRACT(p_input,i);
         ary_starts(i)  := get_start_point(ary_strings(i));
         ary_ends(i)    := get_end_point(ary_strings(i));

      END LOOP;

      --------------------------------------------------------------------------
      -- Step 30
      -- Loop through and count the nodes connections
      --------------------------------------------------------------------------
      FOR i IN 1 .. int_count
      LOOP
         ary_start_count(i)  := 0;
         ary_end_count(i)    := 0;
         ary_inside_count(i) := 0;

         FOR j IN 1 .. int_count
         LOOP
            IF i != j
            THEN
               IF SDO_GEOM.RELATE(
                  ary_starts(i),
                  'DETERMINE',
                  ary_strings(j),
                  num_tolerance
               ) IN ('TOUCH','CONTAINS','COVERS','ON')
               THEN
                  ary_start_count(i) := ary_start_count(i) + 1;

               ELSIF SDO_GEOM.RELATE(
                  ary_ends(i),
                  'DETERMINE',
                  ary_strings(j),
                  num_tolerance
               ) IN ('TOUCH','CONTAINS','COVERS','ON')
               THEN
                  ary_end_count(i) := ary_end_count(i) + 1;

               ELSIF SDO_GEOM.RELATE(
                  ary_strings(i),
                  'DETERMINE',
                  ary_strings(j),
                  num_tolerance
               ) IN ('TOUCH','CONTAINS','COVERS','OVERLAPBYINTERSECT')
               THEN
                  ary_inside_count(i) := ary_inside_count(i) + 1;

               END IF;

            END IF;

         END LOOP;

         IF ary_start_count(i) > 1
         OR ary_end_count(i) > 1
         OR ary_inside_count(i) > 0
         THEN
            RETURN 'TRUE';
         END IF;

      END LOOP;

      RETURN 'FALSE';

   END is_spaghetti;

   -----------------------------------------------------------------------------
   -----------------------------------------------------------------------------
   FUNCTION points2segment(
       p_point_one              IN  MDSYS.SDO_POINT_TYPE
      ,p_point_two              IN  MDSYS.SDO_POINT_TYPE
      ,p_srid                   IN  NUMBER
   ) RETURN MDSYS.SDO_GEOMETRY
   AS
   BEGIN

      IF ( p_point_one.Z IS NULL AND p_point_two.Z IS NOT NULL )
      OR ( p_point_one.Z IS NOT NULL AND p_point_two.Z IS NULL )
      THEN
         RAISE_APPLICATION_ERROR(
            -20001,
            'both points must have the same number of dimensions, point_one Z is ' ||
            NVL(TO_CHAR(p_point_one.Z),'') ||
            ' and point_two Z is ' ||
            NVL(TO_CHAR(p_point_two.Z),'')
         );

      END IF;

      IF p_point_one.Z IS NULL
      THEN
         RETURN SDO_GEOMETRY(
             2002
            ,p_srid
            ,NULL
            ,SDO_ELEM_INFO_ARRAY(1,2,1)
            ,SDO_ORDINATE_ARRAY(p_point_one.X,p_point_one.Y,p_point_two.X,p_point_two.Y)
         );

      ELSE
         RETURN SDO_GEOMETRY(
             3002
            ,p_srid
            ,NULL
            ,SDO_ELEM_INFO_ARRAY(1,2,1)
            ,SDO_ORDINATE_ARRAY(p_point_one.X,p_point_one.Y,p_point_one.Z,p_point_two.X,p_point_two.Y,p_point_two.Z)
         );

      END IF;

   END points2segment;

   -----------------------------------------------------------------------------
   -----------------------------------------------------------------------------
   FUNCTION points2segment(
       p_point_one              IN  MDSYS.SDO_GEOMETRY
      ,p_point_two              IN  MDSYS.SDO_GEOMETRY
   ) RETURN MDSYS.SDO_GEOMETRY
   AS
      int_gtype1 PLS_INTEGER;
      int_dims1  PLS_INTEGER;
      int_gtype2 PLS_INTEGER;
      int_dims2  PLS_INTEGER;
      point_one  MDSYS.SDO_POINT_TYPE;
      point_two  MDSYS.SDO_POINT_TYPE;

   BEGIN

      int_gtype1 := p_point_one.get_gtype();
      int_dims1  := p_point_one.get_dims();
      int_gtype2 := p_point_two.get_gtype();
      int_dims2  := p_point_two.get_dims();

      IF  int_gtype1 = 1
      AND int_gtype2 = 1
      AND int_dims1  = int_dims2
      AND p_point_one.SDO_SRID = p_point_two.SDO_SRID
      THEN
         NULL;  -- Good

      ELSE
         RAISE_APPLICATION_ERROR(
             -20001
            ,'both point objects must be points and have the same number of dimensions and SRIDs'
         );

      END IF;

      IF int_dims1 = 4
      THEN
         RETURN SDO_GEOMETRY(
             4402
            ,p_point_one.SDO_SRID
            ,NULL
            ,SDO_ELEM_INFO_ARRAY(1,2,1)
            ,SDO_ORDINATE_ARRAY(
                 p_point_one.SDO_ORDINATES(1)
                ,p_point_one.SDO_ORDINATES(2)
                ,p_point_one.SDO_ORDINATES(3)
                ,p_point_one.SDO_ORDINATES(4)
                ,p_point_two.SDO_ORDINATES(1)
                ,p_point_two.SDO_ORDINATES(2)
                ,p_point_two.SDO_ORDINATES(3)
                ,p_point_two.SDO_ORDINATES(4)
            )
         );

      ELSE
         -- Use the sdo_point_type method for the rest
         IF p_point_one.SDO_POINT IS NOT NULL
         THEN
            point_one := p_point_one.SDO_POINT;

         ELSE
            IF int_dims1 = 3
            THEN
               point_one := SDO_POINT_TYPE(
                   p_point_one.SDO_ORDINATES(1)
                  ,p_point_one.SDO_ORDINATES(2)
                  ,p_point_one.SDO_ORDINATES(3)
               );

            ELSE
               point_one := SDO_POINT_TYPE(
                   p_point_one.SDO_ORDINATES(1)
                  ,p_point_one.SDO_ORDINATES(2)
                  ,NULL
               );

            END IF;

         END IF;

         IF p_point_two.SDO_POINT IS NOT NULL
         THEN
            point_two := p_point_two.SDO_POINT;

         ELSE
            IF int_dims1 = 3
            THEN
               point_two := SDO_POINT_TYPE(
                    p_point_two.SDO_ORDINATES(1)
                   ,p_point_two.SDO_ORDINATES(2)
                   ,p_point_two.SDO_ORDINATES(3)
               );

            ELSE
               point_two := SDO_POINT_TYPE(
                   p_point_two.SDO_ORDINATES(1)
                  ,p_point_two.SDO_ORDINATES(2)
                  ,NULL
               );

            END IF;

         END IF;

         RETURN points2segment(
             p_point_one   => point_one
            ,p_point_two   => point_two
            ,p_srid        => p_point_one.SDO_SRID
         );

      END IF;

   END points2segment;

   FUNCTION linear_gap_filler(
       p_input            IN  MDSYS.SDO_GEOMETRY
      ,p_tolerance        IN  NUMBER DEFAULT 0.05
   ) RETURN MDSYS.SDO_GEOMETRY
   AS
      sdo_input     MDSYS.SDO_GEOMETRY := p_input;
      num_tolerance NUMBER;
      int_counter   PLS_INTEGER;
      ary_edges     MDSYS.SDO_GEOMETRY_ARRAY;
      ary_starts    MDSYS.SDO_GEOMETRY_ARRAY;
      ary_ends      MDSYS.SDO_GEOMETRY_ARRAY;
      ary_nearest   MDSYS.SDO_NUMBER_ARRAY;
      ary_distance  MDSYS.SDO_NUMBER_ARRAY;
      num_temp      NUMBER;
      num_nearest   NUMBER;
      int_winner    PLS_INTEGER;
      int_winner2   PLS_INTEGER;
      sdo_point1    MDSYS.SDO_GEOMETRY;
      sdo_point2    MDSYS.SDO_GEOMETRY;
      boo_done      BOOLEAN;
      num_one       NUMBER;
      num_two       NUMBER;
      int_looper    PLS_INTEGER := 1;

   BEGIN

      --------------------------------------------------------------------------
      -- Step 10
      -- Check over incoming parameters
      --------------------------------------------------------------------------
      IF num_tolerance IS NULL
      THEN
         num_tolerance := 0.05;

      END IF;

      IF sdo_input IS NULL
      OR sdo_input.get_gtype() <> 6
      THEN
         RETURN sdo_input;

      END IF;

      IF is_spaghetti(sdo_input,p_tolerance) = 'TRUE'
      THEN
         RETURN sdo_input;

      END IF;

      <>
      ary_edges     := MDSYS.SDO_GEOMETRY_ARRAY();
      ary_starts    := MDSYS.SDO_GEOMETRY_ARRAY();
      ary_ends      := MDSYS.SDO_GEOMETRY_ARRAY();
      ary_nearest   := MDSYS.SDO_NUMBER_ARRAY();
      ary_distance  := MDSYS.SDO_NUMBER_ARRAY();

      --------------------------------------------------------------------------
      -- Step 20
      -- Break multistring into edges and start and end nodes
      --------------------------------------------------------------------------
      int_counter := SDO_UTIL.GETNUMELEM(sdo_input);
      ary_edges.EXTEND(int_counter);
      ary_starts.EXTEND(int_counter);
      ary_ends.EXTEND(int_counter);
      FOR i IN 1 .. int_counter
      LOOP
         ary_edges(i)  := SDO_UTIL.EXTRACT(sdo_input,i);
         ary_starts(i) := get_start_point(ary_edges(i));
         ary_ends(i)   := get_end_point(ary_edges(i));

      END LOOP;

      --------------------------------------------------------------------------
      -- Step 30
      -- Determine the closest endpoints
      --------------------------------------------------------------------------
      ary_nearest.EXTEND(int_counter);
      ary_distance.EXTEND(int_counter);
      FOR i IN 1 .. int_counter
      LOOP
         num_nearest := NULL;
         int_winner := NULL;
         FOR j IN 1 .. int_counter
         LOOP
            IF j != i
            THEN
               num_temp := SDO_GEOM.SDO_DISTANCE(
                   ary_edges(i)
                  ,ary_edges(j)
                  ,num_tolerance
               );

               IF num_nearest IS NULL
               OR num_temp < num_nearest
               THEN
                  num_nearest := num_temp;
                  int_winner := j;

               END IF;

            END IF;

         END LOOP;

         ary_nearest(i) := int_winner;
         ary_distance(i) := num_nearest;

      END LOOP;

      --------------------------------------------------------------------------
      -- Step 40
      -- Find the smallest gap
      --------------------------------------------------------------------------
      int_winner := NULL;
      num_nearest := NULL;
      FOR i IN 1 .. int_counter
      LOOP
         IF num_nearest IS NULL
         OR ary_distance(i) < num_nearest
         THEN
             int_winner := i;
             num_nearest := ary_distance(i);
             int_winner2 := ary_nearest(i);

         END IF;

      END LOOP;

      --------------------------------------------------------------------------
      -- Step 50
      -- Determine the endpoints to connect
      --------------------------------------------------------------------------
      num_one := SDO_GEOM.SDO_DISTANCE(
         get_start_point(ary_edges(int_winner)),
         ary_edges(int_winner2),
         num_tolerance
      );
      num_two := SDO_GEOM.SDO_DISTANCE(
         get_end_point(ary_edges(int_winner)),
         ary_edges(int_winner2),
         num_tolerance
      );

      IF ( num_one = 0 AND SDO_GEOM.RELATE(
         get_start_point(ary_edges(int_winner)),
         'ANYINTERACT',
         ary_edges(int_winner2),
         num_tolerance
      ) = 'TRUE' )
      OR ( num_two = 0 AND SDO_GEOM.RELATE(
         get_end_point(ary_edges(int_winner)),
         'ANYINTERACT',
         ary_edges(int_winner2),
         num_tolerance
      ) = 'TRUE' )
      THEN
         sdo_point1 := NULL;

      ELSIF num_one < num_two
      THEN
         sdo_point1 := get_start_point(ary_edges(int_winner));

      ELSE
         sdo_point1 := get_end_point(ary_edges(int_winner));

      END IF;

      num_one := SDO_GEOM.SDO_DISTANCE(
         get_start_point(ary_edges(int_winner2)),
         ary_edges(int_winner),
         num_tolerance
      );
      num_two := SDO_GEOM.SDO_DISTANCE(
         get_end_point(ary_edges(int_winner2)),
         ary_edges(int_winner),
         num_tolerance
      );

      IF ( num_one = 0 AND SDO_GEOM.RELATE(
         get_start_point(ary_edges(int_winner2)),
         'ANYINTERACT',
         ary_edges(int_winner),
         num_tolerance
      ) = 'TRUE' )
      OR ( num_two = 0 AND SDO_GEOM.RELATE(
         get_end_point(ary_edges(int_winner2)),
         'ANYINTERACT',
         ary_edges(int_winner),
         num_tolerance
      ) = 'TRUE' )
      THEN
         sdo_point2 := NULL;

      ELSIF num_one < num_two
      THEN
         sdo_point2 := get_start_point(ary_edges(int_winner2));

      ELSE
         sdo_point2 := get_end_point(ary_edges(int_winner2));

      END IF;

      --------------------------------------------------------------------------
      -- Step 50
      -- Smash together
      --------------------------------------------------------------------------
      IF sdo_point1 IS NULL
      OR sdo_point2 IS NULL
      THEN
         sdo_input := SDO_UTIL.CONCAT_LINES(
            ary_edges(int_winner),
            ary_edges(int_winner2)
         );

      ELSE
         sdo_input := SDO_UTIL.CONCAT_LINES(
            SDO_UTIL.CONCAT_LINES(
               ary_edges(int_winner),
               points2segment(sdo_point1,sdo_point2)
            ),
            ary_edges(int_winner2)
         );

      END IF;

      boo_done := TRUE;
      FOR i IN 1 .. int_counter
      LOOP
         IF i NOT IN (int_winner,int_winner2)
         THEN
            sdo_input := SDO_UTIL.APPEND(sdo_input,ary_edges(i));
            boo_done := FALSE;

         END IF;

      END LOOP;

      --------------------------------------------------------------------------
      -- Step 60
      -- Check if valid if returning
      --------------------------------------------------------------------------
      IF sdo_input.get_gtype() = 2
      OR boo_done = TRUE
      THEN
         RETURN sdo_input;

      END IF;

      int_looper := int_looper + 1;
      GOTO TOP_OF_IT;

   END linear_gap_filler;

END dz_gap_fill;

Tags: Database

Similar Questions

  • In FF password manager (30.0), when you open change, what are all the fields and how you fill them?

    When you open Edit, there are two choices: Web form and annotated.
    What is the difference?

    Then, there are fields for the host, submit the prefix, username, password, etc.
    How to fill out these fields?

    When you click for the Manager "assumes that of the current Page", all fields not necessarily fill up, so it's just for the username and password?
    I use constantly editing function, so it's a little strange to not see that further instructions here.

    When I click on tools, the saved password dialog box is on the list, so it's in my toolbar all the time.
    I use it constantly.

    What is the last password security? I know there are competitors of ideas. What is Mozilla?

    Thank you.

    Personally, I do not record the connections site in Firefox. The FireFTP extension records the FTP connections, so I use a master password to protect the people.

    I know I should finally pass a manager based password on a cloud, because if often, I forgot my login and have to reset, but... I have not bypassed by comparing the features and tests.

  • How to fill out the customer type when you submit a form?

    How to fill out the customer type when you submit a form?

    You can't do right now in British Colombia by means of forms.

  • How to fill a field of date with today's date when the signature field is signed?

    How to fill a field of date with today's date when the signature field is signed? In the LCD, I insert a signature field and a date field, what parameters in these two fields are necessary to make this work? Is the date field, the value calculated? I tried different JS suggestions I found, but none work. In the form, I named the signature ClaimSignature field and the date in the ClaimSigDate field.

    The thought of her with a little help. In the script editor window, I selected the postSign event and added the following JS:

    Form1.Page1.ClaimSignature::postSign - (JavaScript, client)

    var date = new Date();

    var day = date.getDate ();

    var month = date.getMonth () + 1;

    var monthstring = (month, 10?) ('0' + month: month)

    year var = date.getFullYear ();

    var = year DateString + '-' + monthString + '-' + (day< 10="" "0"="" +="" day="" :="">

    ClsimSigDate.rawValue = dateString;

    I hope this helps someone else save time.

  • How to use Scandinavian letters when converting pdf in Word form?

    I have a problem when converting pdf form which is composed of the letters O Ä in word document

    What should I do?

    Hi Matti,

    ExportPDF online service supports several Scandinavian languages for optical recognition of characters. To change the language it uses, click on the language of the Document (for text recognition) once you have selected the file you want to export. You will find several Scandinavian languages listed in the context menu, including the Norwegian, Danish and Swedish.

    Please let us know how it goes.

    Best,

    Sara

  • Picture in picture book uses white between photos and filling when using "Adapt to the chassis" instead of the border color of page like in iPhoto

    I used the book of images to create a book in iPhoto several times because the line between the pictures and the filling when I use 'Adapt to the chassis', is the same color as the color chosen for the borders of homepage and text boxes.  It is seamless.

    I just tried to use the book of images in pictures but the line between the pictures and the fill to 'Adapt to the chassis' is white, and not same color I chose for the page border.  It is, therefore, very ugly.

    Is it possible to remedy this situation?

    first get a glimpse of your p = book - Preview a print project in Photos, iPhoto or Aperture to avoid problems - Apple Support - so you can see exactly what will be printed

    You cannot change how the program works so if the problem persists in the overview say Apple about the bug - http://www.apple.com/feedback/photos.html

    LN

  • How to fill out the list of dynamic measurements

    Hello

    I create a dynamic action on a region by using a select list (item) (lov on table A).

    now the problem is that if the value in the selection list is present in the table B then must trigger the action.

    can someone tell me how to fill the column of values as the values in table B.

    I don't want to set the values manually.

    Thank you
    Little Foot

  • You can create a hidden page element that acts as an indicator of the condition "exists."
  • Create a D.A. say 'Set Hidden Page Item"that fires on the element of change o selection list, which is of type 'set Value' and uses a function body PLSQL to set the hidden page (the affected item) item, choose the item of list selection in the field 'referred to submit page '.
    Now the PLSQL block, can return 1/0 'TRUE' or 'FALSE' or 'Y' / ' not etc. Depending on whether the record exists in the other table (or whatever condition you have)

    Now when the selection list is changed, the hidden element would be set correctly by using this dynamic Action.

    So, to check if the element exists, we can use the value of the element of hidden after that page.

    You can do this either as another action True under the dynamic Action of "Set Hidden Page Item" itself (after the action SetValue True) and added a condition using the value of the hidden element
    or add another dynamic Action, fired when the hidden item is changed and when the value of the hidden element corresponds with that of your conidtion.

    Hope that I was clear enough.

  • DateField as itemrender causes Error #1034: Type coercion failed: cannot convert '10/03/2006.

    I have itemrende onliner.

    < mx:DataGridColumn dataField = "solddate."
    headerText = "Date".
    itemRenderer = "mx.controls.DateField"
    rendererIsEditor = "true".
    editorDataField = "selectedDate" / >

    XML =

    < solddate > 10/03/2006 < / solddate >

    This translates

    DateField as itemrender causes Error #1034: Type coercion failed: cannot convert ' 10/03/2006' in Date.

    Is it possible for me to be

    1. change the output xml to the required format

    or

    2 convert the data within the itemrenderer

    The answer is here http://blog.flexmonkeypatches.com/2008/04/08/datefield-itemeditor-when-date-is-a-string/comment-page-1/
    
    or you can do it inline like
    
    DataGridColumn headerText="Date"                   editable="true"                    rendererIsEditor="true">                              DateField selectedDate="{new Date(Date.parse(data.@solddate as String))}"/>                                               DataGridColumn>
    
    
    
  • How to fill the canvas with lines

    < mx:Canvas id = "b1" x = "10" y = "10" height = "40" width = "300" borderStyle = "solid" borderColor = "black" / >

    When I want to draw lines with difference of 15 pixels to fill the entire canvas I wrote the following

    for (var i: int = b1.x + 15; i < b1.x + b1.width; i = i + 15)
    {
    var line1:UIComponent = new UIComponent();
    var lineThickness1:Number = 1;
    var lineColor1:Number = 0 x 000000;
    var lineAlpha1:Number = 1;
    LINE1. Graphics.LineStyle (lineThickness1, lineColor1, lineAlpha1);
    LINE1. Graphics.MoveTo (i, B1.y);
    LINE1. Graphics.LineTo (i, B1.y + B1. Height);
    this.addChild (line1);
    }

    It works very well

    LLY,

    < mx:Canvas id = "b4" x = "600" y = "200" height = "60" width = "300" borderStyle = "solid" borderColor = rotation "black" = "40" / >

    I have the canvas above with the "b4" id only difference is that this canvas rotation

    How to fill the canvas with lines that I just did above?

    Hope this code will help you,

    for(var i: int = 15; i < b4.width; i = i + 15) {
         var line1: UIComponent = new UIComponent();
         var lineThickness1: Number = 1;
         var lineColor1: Number = 0x000000;
         var lineAlpha1: Number = 1;
         line1.graphics.lineStyle(lineThickness1, lineColor1, lineAlpha1);
         line1.graphics.moveTo(i, 0);
         line1.graphics.lineTo(i, b4.height - 1);
         //Add line in canvas instead of main container
         b4.addChild(line1);
    }
    
    
    
  • In CS4 the pencil tool does not maintain a fill when establishing?

    Ai CS4, how can I get the fill color to keep filling when I draw with the pencil tool? The fill color disappears and by default, no fill every time I draw with the pencil tool so I'm unable to see what I drew. CS1 has failed in this way that he kept the fillings or assigned previously.

    It seems that two things have changed in CS4. Double-click the pencil tool, and check the box that says new filling lines of pencil. Then make a new rectangle filled with the color you want and Option (Alt) - drag - upward left most box in the graphic Styles Panel to set a new default for this document. Finally, in the appearance Panel flyout make new Art has basic appearance is selected.

  • How to fill a datagrid with a web service result which is an array?

    I know how to fill a DataGrid to a CF of the web service that returns a query result. But what happens if I want to my CF component to run a query, then massage the data and back-is not a query - but a picture from the web service.

    Seems my two dimension table because ColdFusion has no column name, I need to create on the CF side name-value pairs or the side Flex. BTW, I prefer to use mx:webservice and not remoteObject.

    Any ideas on the best way to fill a datagrid from an array?

    Thank you.

    (Sorry for the previous double post).

    A colleague found the answer for me. I hope this saves someone else from 5 days of anquish!

    When a ColdFusion component returns an array of structures (not the result of a query), redesign the table as an arrayCollection collection throws an error.

    IT DOES NOT WORK:
    acSpeeds = new ArrayCollection (wsSpeeds.oneNode.lastResult);

    THIS WORKS!
    acSpeeds = wsSpeeds.oneNode.lastResult;

    It seems that a table generated by ColdFusion structures is already a collection arrayCollection 'official '!

    Hope this helps someone.

  • How is it when I send photos to send to send to someone... the legends do not give.

    How is it when I send photos to send to send to someone... the legends do not give.

    Because captions are not part of the picture.

  • Please tell how to do, when I want to transfer a message, a message opens in a new tab, not in a new message window in thunderbird. Thank you.

    Please tell how to do, when I want to transfer a message, a message opens in a new tab, not in a new message window in thunderbird. Thank you.

    Sorry, but at the moment "Dial in tab" is not yet possible. You will always have a new window when the composition or the sponsor/transfer a message.

  • How to open or convert the .avi file on old mac running OS.10.6.8?

    How to open or convert the .avi file on the old mac running OS.10.6.8.  We tried downloading several conversion programs as well as programs that run .avi, but everyone's message could not be opened on the mac or require a fee.  Anyone able to fix it.  We have great audio video file we need to convert.

    Try to use MPEG Streamclip; You can be told to install Perian or another component, or who does not open the AVI file. AVI is a container, not a format; no single component or codec will open all reviews, and some cannot be played or converted in Mac OS X.

    (142484)

  • How to play (or convert) a file .avi on my MacBook Pro?

    How to play (or convert) a file .avi on my MacBook Pro?

    Probably by installing VLC, but some AVI files can not be played in Mac OS X; AVI is a container, not a format.

    (141493)

Maybe you are looking for

  • Number disconnected

    Please help me! My account is in perfect condition, but when I try to call through my Skype to Go, the only thing I hear is,"this number has been disconnected, altered or is no longer in service. » Please let me know what happens. I'm so frustrated.

  • PC slows to stand still and needs to be restarted

    My PC works normally for about an hour, then it slows down to a possible status quo.  I have to restart to make it back to speed, once again for about an hour.  I tried a F10 recovery at first upward and get an error message "Stop: c0000218 {Registry

  • Problem installing printer HP 4 L CSE and 970 in Vista

    I replaced a XP Pro that fried with a Vista Home Premium.  Trying to install HP 4 L and 970 CSE printers, but not had much luck, so I paid a geek $180 for the installation.  The 4L (primary) bit the dust, and I can't get the 970 to print at all.  Use

  • Impossible to receive packets from UDP broadcast on a PPP connection

    I'm fighting for two days now with no success. I have two modems (don't ask, some special stuff), which uses the dial-up access (PPP). I tried on windows XP and it works like a charm. I'll send unicast and broadcast UPD packets. If I repeat that on W

  • Strange objects!

    Hello!Please see the video. Strange things happens with these files. As you can see on the screenshot when I want to get a preview of the file in the source window, that I can't, but when I drag the clip to the timeline it plays very well. Thank you!