pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

yancho private pastebin - collaborative debugging tool What's a private pastebin?


Posted by Yancho on Mon 14 Apr 16:40
report spam | download | new post

  1.      var_id := 1;
  2.  
  3.       FOR rec_shooting_star IN
  4.             EXECUTE var_text_shootingstar
  5.  
  6.         LOOP
  7.                 IF var_id = 1 THEN
  8.                         RAISE NOTICE '--CHANGING the Starting Point--';
  9.                         RAISE NOTICE 'Geometry type working on is : %, and as text : %',geometrytype(rec_shooting_star.the_geom), astext(rec_shooting_star.the_geom);
  10.                         var_num_geoms := NumGeometries(rec_shooting_star.the_geom);
  11.                         RAISE NOTICE 'Total Number of Geometries : %',var_num_geoms;
  12.                         FOR var_i IN 1 .. var_num_geoms
  13.                             LOOP
  14.                                 RAISE NOTICE 'Inside the Geometry array filling';
  15.                                 array_geoms[var_i] := geometryN (rec_shooting_star.the_geom, var_i);
  16.                             END LOOP;
  17.  
  18.                         var_first_linestring := geometryN (rec_shooting_star.the_geom, 1);
  19.                         RAISE NOTICE 'Old start point is : %',astext(startpoint(var_first_linestring));
  20.                         var_start_point :=  addpoint(var_first_linestring, var_source_geom, 0 );
  21.                         RAISE NOTICE 'New start point is : %',astext(startpoint(var_first_linestring));
  22.                         rec_path_result.id       := var_id ;
  23.                         rec_path_result.gid      := rec_shooting_star.gid;
  24.  
  25.                         final_geom := Collect ( var_first_linestring , geometryN (rec_shooting_star.the_geom, 2)  );
  26.  
  27.                         FOR var_i IN 2 .. var_num_geoms
  28.                             LOOP
  29.                                 final_geom := Collect ( geometryN (rec_shooting_star.the_geom, var_i) , geometryN (rec_shooting_star.the_geom, var_i+1) );
  30.                             END LOOP;
  31.                        
  32.                         RAISE NOTICE 'New Geometry is : %',astext(final_geom);
  33.                         rec_path_result.the_geom := final_geom;
  34.                         RETURN NEXT rec_path_result;
  35.                
  36.                 ELSE
  37.                
  38.                         rec_path_result.id       := rec_shooting_star.id;
  39.                         RAISE NOTICE 'Working on ID : % <><> And stored as %',rec_shooting_star.id, rec_path_result.id;
  40.                         rec_path_result.gid      := rec_shooting_star.gid;
  41.                         rec_path_result.the_geom := rec_shooting_star.the_geom;
  42.                         RETURN NEXT rec_path_result;
  43.  
  44.                 END IF;
  45.  
  46.                 var_id := var_id + 1;
  47.  
  48.         END LOOP;

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me