Densify straight line segments

Hello All,
I'm looking for a way to densify (add vertices at a specified interval) along a straight line segment. SDO_ARC_DENSIFY doesn't work as I need on straight line segments. Can anyone suggest a way to do this?
I considered writing my own function as the logic seems simple, but I don't see a function to measure distances along a line w/o converting to LRS.
Thanks!
--john                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Hi John,
So what's the aversion to LRS? Licensing? The Oracle Spatial guide pretty much steps you through what you want to do here using LRS
http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11830/sdo_lrs_ref.htm#autoId1
They take a linestring, snap it into two pieces at measure 5 and then stick the pieces back together with the new point at the break. Just wrap up a CONVERT_TO_LRS_GEOM and CONVERT_TO_STD_GEOM on the way in and on the way out of your function. I assume you already know from what end you want to measure and that your linestrings run that way consistently.
If you don't have the Spatial license then it's a bit more complicated. You need to walk the coordinates in the linestring adding up the distance and then figure out where your break point would land on the segment when you hit the desired measure. That's a fairly tall order for a forum request but perhaps other folks have some ideas for you. I would just use the LRS stuff myself so I've never thought through what it would take.
Cheers,
Paul

Similar Messages

  • How can I find out the angle of a straight line between two anchor points?

    I would like to extend a line which is at a given angle (not 45,90 degree). Is there a quick and reliable way to do this? or to find out the angle of a segment?
    What I'm doing at the moment is just direct selecting an anchor point and using the visual guides to extend it. I don't think this is exact though so was I wondering if anyone had any techniques for doing this?
    Thanks!

    portfelio,
    Smart Guides are your friends.
    As a general solution, you may:
    1) With the Line Segment Tool ClickDrag between the two Anchor Points (Smart Guides say anchor);
    2) With the appropriate Reference Point selected in the Transform palette, increase the W or H value and Ctrl/Cmd+Enter;
    3) Lock the new auxiliary line;
    4) ClickDrag the relevant Anchor Point of the original line along the extended auxiliary line (Smart Guides say path);
    5) Unlock and delete the auxiliary line.
    After 1), you may also click the Line Segment Tool to see the angle.
    Or,  in a case with a straight path (segment), you may use the Scale Tool:
    1) (Direct) Select the straight path (segment);
    2) Switch to the Scale Tool and Click the Anchor Point that is to stay, then ClickDrag the one to move (Smart Guides say uniform when you are dragging in the right direction).

  • Bisecting a line segment with smart guides?

    Is it possible to use smart guides to place an anchor point exactly in the middle of a line segment?

    Assuming the segment is straight, Object>Path>AddAnchorPoints will add an anchorPoint at the center of the segment.
    JET

  • Anchor points on line segments.....

    Closed path made with pen tool in Flash MX  comprises of line segments & curved segments both.While adding anchor points on segments it is noticed
    that pen tool adds anchor points on curvaceous segments but not on line segments. Why is it so ? Is their any way to accomlish this task ?

    If you hover over the pen tool in its toolbar you should get a selection of different pen tools, at least one of which will allow you to add an anchor point on a straight line.

  • Extend line segments

    I've drawn a line segment between 2 intersections. Can I extend this segment beyond the intersections, such that it still passes through them?
    TIA
    steven

    To extend a straight segment from one of its ends:
    1. WhitePointer: Select the anchorPoint at the end of the segment you want to extend.
    2. Scale Tool: Altclick the anchorPoint at the opposite end of the segment, to set the transformation anchor there.
    3. ShiftDrag to scale the selected anchorPoint.
    JET

  • Closing paths not resulting in straight line

    Hi,
    When drawing a path, I sometimes find that when closing it (and seeing the circle to let you know you're about to), it sometimes doesn't make a straight line to but rather a curve. Why does that happen and how can it be avoided? Thanks.

    bf,
    More specifically, you have ClickDragged the last point before closing, unless you have ClickDragged the start/end Anchor Point and almost unavoidably changed the first segment.
    To get s traight segment, you need to Click the last one before closing (and then Click the starting Anchor Point).

  • How to join multiple line segments to make a fillable polygon

    Howdy,
    I have illustrator CS2 12.0.1. Is there any easy way to create an irregular shaped fillable polygon? The way I currently do this is (1) I use the line segment tool to draw the sides of the polygon, (2) then for each corner of the polygon, I use the direction selection tool to select the corner, then do command-J to "join" the two segments that touch that corner. Only after doing that, I am finally able to use the eyedropper tool to fill the polygon.
    This take a lot of tedious effort. I have LOTS of polygons to draw. Once I have drawn the segments, it seems like I should just be able to select all the segments and have an option that does all the joins at once.
    Or, maybe instead of the line segment tool I could use some path tool. But whenever I have tried that, I end up with curved segments instead of straight ones.
    Can anyone tell me how to do this?
    Thanks for any help,
    Frank B

    Basically I am drawing on top of a bitmapped background which is a satellite map. My polygons are essentially the property lots on this map. So I visually see where the corners are, and I want to make a polygon that I can fill. I actually will fill with a few different translucent colors to indicate different types of lots. This all works fine except that my current means of drawing the polygons is tedious, and it seems like there should be a better way.
    Another way I could solve my problem is if I were able to reshape an existing polygon by dragging its corners to where I wanted them to be. I have not figured out how to do that. Either the entire polygon moves when I drag a corner, or the polygon gets reshaped by the drag in a way I don't want (what I want is to move one corner, and what I get instead seems like one corner stays put and the other three move around to keep constant skewishness; or something).
    Frank

  • Problem with creating a straight line with polygamo lasso

    I am having a problem with polygamo lasso. when i create a triangle or a rechtangle in straight line it is turn out the line become not straight. I don't what did i wrong, was always working fine till today. YOu can see the pic the top line lookslike a step.

    Ihope I did right, was not sure how to save as channel.

  • How to draw only straight line instead of angled one??

    Dear friends,
    I saw a very good code posted by guru here(I think is camickr),
    But I tried to change it and I hope to draw only straight line instead of angled one, can you help how to do it??
    Thanks so much.
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DrawingArea extends JPanel
         Vector angledLines;
         Point startPoint = null;
         Point endPoint = null;
         Graphics g;
         public DrawingArea()
              angledLines = new Vector();
              setPreferredSize(new Dimension(500,500));
              MyMouseListener ml = new MyMouseListener();
              addMouseListener(ml);
              addMouseMotionListener(ml);
              setBackground(Color.white);
         public void paintComponent(Graphics g)
              // automatically called when repaint
              super.paintComponent(g);
              g.setColor(Color.black);
              AngledLine line;
              if (startPoint != null && endPoint != null)
                   // draw the current dragged line
                   g.drawLine(startPoint.x, startPoint.y, endPoint.x,endPoint.y);
              for (Enumeration e = angledLines.elements(); e.hasMoreElements();)
                   // draw all the angled lines
                   line = (AngledLine)e.nextElement();
                   g.drawPolyline(line.xPoints, line.yPoints, line.n);
         class MyMouseListener extends MouseInputAdapter
              public void mousePressed(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        startPoint = e.getPoint();
              public void mouseReleased(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             AngledLine line = new AngledLine(startPoint, e.getPoint(), true);
                             angledLines.add(line);
                             startPoint = null;
                             repaint();
              public void mouseDragged(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             endPoint = e.getPoint();
                             repaint();
              public void mouseClicked( MouseEvent e )
                   if (g == null)
                        g = getGraphics();
                   g.drawRect(10,10,20,20);
         class AngledLine
              // inner class for angled lines
              public int[] xPoints, yPoints;
              public int n = 3;
              public AngledLine(Point startPoint, Point endPoint, boolean left)
                   xPoints = new int[n];
                   yPoints = new int[n];
                   xPoints[0] = startPoint.x;
                   xPoints[2] = endPoint.x;
                   yPoints[0] = startPoint.y;
                   yPoints[2] = endPoint.y;
                   if (left)
                        xPoints[1] = startPoint.x;
                        yPoints[1] = endPoint.y;
                   else
                        xPoints[1] = endPoint.x;
                        yPoints[1] = startPoint.y;
         public static void main(String[] args)
              JFrame frame = new JFrame("Test angled lines");
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              DrawingArea d = new DrawingArea();
              frame.getContentPane().add( d );
              frame.pack();
              frame.setVisible(true);
    }

    Change the AngledLine class to store two points instead of 3 points (I would rename the class to be StraightLine). The code is much simpler because you just store the starting and ending points and you don't need to calculate the middle point.

  • Combining Line Segments into a single shape

    I drew one half of a shape by drawing multiple line segments using the arc tool. Think of the shape as sort of a C. Once I had the shape the way I wanted it, I copied and reflected it to give me the other half, so now it looks sort of like an O. However, when I go to fill the shape, I get all sort of weird fills, like it is trying to close each of the individual arcs that I drew.
    I have spent over an hour going through Illustrators help and searching the internet, but I can't figure out how to join all these line segments into a single shape that I can then apply a fill to. I'm sure this is easy, but I'm frustrated.
    Thanks,
    Ken

    Thanks Kurt. That did it. My gosh, I would never have thought of looking for something like that. I upgrade to CS3 sometime ago, but hadn't used illustrator much since I upgraded.
    Thanks for the help.
    Ken

  • When I record an audio track, there is a waveform. When I stop recording, the waveform disappears and becomes a straight line. It also disappears from the track edit window. But the sound is there. How can I stop the waveform from disappearing?

    When I record an audio track using Logic Pro X, there is a visible waveform which appears as I record. When I stop recording, the waveform disappears and becomes a straight line. It also disappears from the track edit window. But the sound is still there. How can I stop the waveform from disappearing? And can I do something to view it after it has disappeared? Anyone know the anser?

    In Logic:
    Preferences/Audio Set Recording Delay to 0 <zero>
    This should always be set to zero unless a specific set of circumstances exist and you're audio drivers do not report position correctly.
    On occasion, usually when importing a Logic 9 project, Logic-X randomly changes this to a negative/positive number.  It's actually a bug in Logic, as it should always display the waveform.

  • Ssrs 2008 r2 straight line within a matrix

    In an SSRS 2008 R2 new report have placed a matrix on the end of the report for information the user wants to see at the end of the report. The user wants to place a straight line between the different infomation sections in the tablix. Here are the problems
    I am having:
    1. In a row I would like to merge 2 cells together so that a line placed within the matrix is the same length. The problem is that I do not know how to merge the cells.
    2. When I drag a line into a cell in the matrix, the line is not straight. The line points to an angle. I have tried to change the properties of the line on the endpoint values but that has not worked. Thus can you tell me how to make the line placed within
    a matrix cell to be straight?

    Take a look at this post for inserting a horizontal (or vertical) line into a tablix cell:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/397d6dc4-766a-43c9-9706-5370a2bfaeb4/insert-line-into-table?forum=sqlreportingservices
    For merging cells, you simply select a set of contiguous cells, right-click, merge cells. There is a catch of course. The catch is that all of the cells you are trying to merge must be in the same scope. Below are some screenshots showing a simple Matrix
    with 1 column group and 1 row group.
    As you can see in this screenshot, I have selected 2 adjacent cells that are both in the same scope, and merge cells is available.
    In this screenshot, I have selected 2 adjacent cells that are not in the same scope. The left cell is only scoped by the row group while the cell on the right is scoped by both the row and the column group. As a result, I cannot merge the cells.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • How to get rid of or at least easily fix random Position A to Positon B 'archs'?(want straight line)

    Hey,
    I hope i can describe my question correctly: is there a way to tell after effects that i want to default every position edit to be a straight path/arch (i'm actually looking for a lack of 'arch'--I just want a straight line) instead of defaulting to a seemingly random arch that i then find very tedious if not impossible to fix, even by manipulating vertice box 'arms' while holding alt? in other words, can i tell the program that, from now on, 'position A' and 'position B' must be traveled between in a straight line ONLY, never any erronious archs? i hope i described it well enough without being too familar with technical terms
    thanks

    Rick's pointing you in the right direction.
    Details are here:
    http://help.adobe.com/en_US/aftereffects/cs/using/WS3878526689cb91655866c1103906c6dea-7d99 a.html#WS3878526689cb91655866c1103906c6dea-7d98a

  • My Macbook Pro (OSX 10.6.7 2.26 GHz Intel Core 2 Duo) has started misbehaving on me. When I'm working, the cursor will start spontaneously moving to the left in a straight line, and randomly right clicking on things.  If I close the computer and open it b

    my Macbook Pro (OSX 10.6.7 2.26 GHz Intel Core 2 Duo) has started misbehaving on me. When I'm working, the cursor will start spontaneously moving to the in a straight line, and randomly right clicking on things.
    If I close the computer and open it back up, it sometimes stops for a little while, then will spontaneously start again. Any help would be truly appreciated. Thanks!

    See this knowledge base article. Also, you might want to update to 10.6.8 (don't know that that will fix your problem, but it's the latest version of Snow Leopard).
    Clinton

  • Can I extend the slideshow horizontal in a straight line but not full page up and down?

    Can I extend the slideshow horizontal in a straight line across the page end to end, but not full page up and down?

    Hi
    Please check these videos for help :
    https://www.youtube.com/watch?v=BDgERSf2a5k
    https://www.youtube.com/watch?v=diUtfwFGI1w
    Thanks,
    Sanjit

Maybe you are looking for