Check if Linear Line String

Hi!
I get a linear line string and I want to check which streets are on that line string. For that I have a table with streets and intersections.
There are any sdo functions to realise that?
best regards.

Thats the structur of table FEATURE:
CREATE TABLE FEATURE (
       F_ID NUMBER(25,0) CONSTRAINT pk_feature PRIMARY KEY,
       F_GEOM SDO_GEOMETRY,
       F_DSS_ID CONSTRAINT fk_f_dss REFERENCES DATA_SUPPLIER_SOURCE(DSS_ID),
       F_FT_ID CONSTRAINT fk_f_ft REFERENCES FEATURE_TYPE(FT_ID),
       F_NAME VARCHAR2(80),
       F_INSERT TIMESTAMP,
       F_UPDATE TIMESTAMP    
);Data on table FEATURE only LINE STRINGS GEOM_TYPE = 2002
Structur of table GPS_TOURS:
CREATE TABLE GPS_TOURS (
       GT_ID NUMBER(25,0) CONSTRAINT pk_gps_tour PRIMARY KEY,
       GT_TOUR_ID NUMBER(25,0),
       GT_TOUR_DESCRIPTION VARCHAR2(50),
       GT_START TIMESTAMP,
       GT_END TIMESTAMP,
       GT_GEOM MDSYS.SDO_GEOMETRY
);Also contains just GEOM_TYPE 2002.
Now I wanted to check if a line of the table FEATURE contains or any interact with a table from GPS_TOURS.
Because if I tried to check if line A contains line B I saw that that cant be the solution because a line isnt a area and so I cant check if line A contains line B - true?
For now I do following with SDO_NN:
create or replace view v_segment_detection as
select
       gps_tours.gt_id,
       gps_tours.gt_tour_id,
       feature.f_id,
       feature.f_name,
       sdo_nn_distance(1) AS DISTANCE
    from gps_tours, feature
    where sdo_nn (feature.f_geom, gps_tours.gt_geom, 'sdo_num_res=1', 1) = 'TRUE'
;Anyone have a better solution? Do compare all points would be time-consuming for 7 000 000 data sets.
best regards
Message was edited by:
yoda

Similar Messages

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • Help me in Converting textarea msg to single line string

    Please help me in converting the textarea message with line breaks in to single line string. because i shud pass that to the Javascript which doesnot accept line breaks.
    <%
    StringBuffer text = new StringBuffer(request.getParameter("textarea1"));
    int loc = (new String(text)).indexOf('\n');
    while(loc > 0){
    text.replace(loc, loc+1, "<BR>");
    loc = (new String(text)).indexOf('\n');
    out.println(text);
    %>

    Hi,
    i did not understood your problem. javascript supports \n character processing. so you should not get any error. Do one thing write a javascript function, that replaces all \n with "". this will solve your problem
    funciton replaceNewLine(StringValue) {
    StringValue.replace('\n','') (check replace() syntax once)
    have fun!!
    raj

  • Create point geometry off Line string

    Hi,
    I am new in using the oracle spatial functions. I need some help in trying to generate point geomteries off a line string.
    E.g. I have a line string say is a mile long; I need to dynseg this line string at regular intervals say 1/100th of a mile (52 feet accuracy) and extract the point geometries.
    Basically for a mile long line string, I need 10 point geomteries at equal distances (.01 mile apart). How can I achieve this? Do we have any geomtery functions that does this dyn seg?
    Any help is appreciated.
    This is an e.g of a line string in my table.
    Route: SFRAIR00270**C
    Begin_log:     15.21
    End-log:     15.42
    SD_GEOM: 2002, 41104, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(NUMBER(1, 2, 1)), MDSYS.SDO_ORDINATE_ARRAY(NUMBER(545906.05083, 229998.885452, 545888.2, 230082.23, 545838.54, 230335.43))
    Thanks,
    LS.
    Edited by: user12035460 on Nov 9, 2012 12:35 PM

    If you are licensed for Spatial then look at the SDO_LRS package. It has all the functionality you need.
    If you are not so licensed, have a look at the LINEAR package on my website.
    http://www.spatialdbadvisor.com/source_code/214/linear-package-sdo_lrs-replacement
    regards
    Simon

  • Multi-line string - Array?

    I was wondering if someone could tell me how to take a multi-line
    string and dump it into an array. I'm assuming that I use the 'Pick
    Line' function in a while loop? What do I check for to terminate the
    loop?
    Thanks...
    -- N

    "kevin" wrote in message news:...
    > In article <[email protected]>, "Natalia"
    > wrote:
    >
    > > I was wondering if someone could tell me how to take a multi-line string
    > > and dump it into an array. I'm assuming that I use the 'Pick Line'
    > > function in a while loop? What do I check for to terminate the loop?
    > >
    > > Thanks...
    > >
    > > -- N
    >
    > Natalia,
    >
    > Use the 'Spreadsheet String to Array' vi. Use the End of Line delimiter
    > (or carriage return, depends on OS). Add a %s to the format string and
    > POOF!, an instant text array. No loops required. Oh yeah, you also need
    > to add an array string constant to the array type so the output comes ou
    t
    > as a string type instead of the default double.
    >
    > You can do it with you present method if you need the loops for other
    > stuff. To terminate the loop just look for a -1 in the output of 'Pick
    > Line' when searching for you CR or EOL. You just have to remember to dump
    > the last value.
    >
    > good luck,
    > - Kevin
    Kevin -
    Thank you. That did the trick.
    -- Natalia

  • My test instrument is outputting a 5 line string but labview only read until the carriage return. how can I get it to read the whole string?

    I have a labview sub-VI reading the string being outputted by a pH meter.  The meter outputs a 5 line string and labview is only reading up to each lines carriage return, there-by giving me 5 separate strings is there anyway to rectify this and have the 5 line read as one string?
    NAS1
    St Petersburg FL
    Labview 2010

    Yes, LabVIEW will automatically update. What happens is that the old serial functions still exist in 7.1 and above but the code (the block diagram) has been modified to use VISA functions. Older versions of LabVIEW are fully supported in this manner. The only way you can avoid the automatic update is to have the old serial functions in an llb and your top level VI refer to these. Having any VI that was part of vi.lib in an llb is a very bad idea and the way to fix things is to remove any VIs in the llb that are part of the LabVIEW distribution.
    I don't remember how the old serial config worked and what the new version does with the VISA Configure Serial Port. Your program should only have a single serial config and you might just be able to directly replace that with the VISA configure Serial Port.

  • Availability check on schedule lines of contract

    Hi,
    We have maintained 2 line items (L1 and L2) with same material (M1) in contract. Also these two line items have schedule lines maintained.
    e.g.
    L1  :  S1,S2
    L2 :   S3,S4
    Now we create a sales order in reference to line item L1 and do an availability check.  The ATP does not show schedule lines for S1,S2 in availability overview. only S3,S4 quantities is taken into consideration for ATP calculation.
    We have activated availability check at schedule line level.
    Any pointers as to why S1,S2 requirements are not shown in availability overview
    P.S.  If we create a sales order in reference to line item L2 ,then the ATP does not show schedule lines for S3,S4 in availability overview. only S1,S2 quantities is taken into consideration for ATP calculation.
    Any pointers will be highly welcome.
    Thanks.

    Hi,
    Sorry, for Sch. AV check is not activated but TR is activated.
    For material ATP is activated- check in MM03
    Chidambaram

  • How to display two-lines strings item

    Hi,
    How can I display list of two-line string items? Each Item in the list should have a phone number and a time. It should look similar to the "dialled numbers" display where each item has an image, and two-line string.
    Is it possible doing it with the high-level API or should I go low-level?
    Thanks in advance
    Imzadi

    use: list.setFitPolicy(Choice.TEXT_WRAP_ON)

  • "Always Use Selected Format" check box in line items report

    Hi Experts,
    I have an issue in ECC 6.0.
    From the transaction code FBL1N (Vendor Line Items) I am trying to export the report to spreadsheet by selecting the option  List> Export>Spreadsheet  then I have selected "Always Use Selected Format" check box.  But if I execute the same report again I am not getting this option "Always Use Selected Format". Please let me how can we retrieve that option. Is there any possibility to get that option again either functionally or technically. I would like to know all the possible ways to get this option again.
    Please do the needful.

    Hello,
    In one my thread Mr. Frank has replied as follows. I believe he has solved this.
    Hope this may be really helpful.
    The problem with the spreadsheet download is at one point, users have selected their default file type.
    That said, SAPGUI is working as it should. (gui710)
    Question though is how do we reset the values so they get the ?Select Spreadsheet Format? popup again.
    The following steps should be performed :
    - Call transaction SE38, enter program SALV_BS_ADMIN_MAINTAIN, and press F8.
    - Follow the parameters below :
    - Select ?DELETE? on the Actions Group
    - Select ?DETAILED SELECTION? on the General Data :
    - On Client - your number
    - User : <user name>
    -Hit EXECUTE.
    -Press ENTER on the POPUP
    - If there is an entry in the report that will need to be deleted. Also, make sure that the entry you will delete (for the user) has a value of GUI_ALV_XML_VER on field ?Parameter? .
    - Select the line and hit the DELETE icon .
    - Press ?Y? to continue delete. Press ENTER on the popup.
    - Then EXIT all the way out of the program.
    NOTE : When you run program SALV_BS_ADMIN_MAINTAIN, make sure they are out of any program that they are using for download.
    Re: "Always Use Selected Format" check box in line items report
    Regards,
    Ravi
    Edited by: Ravi Sankar Venna on May 15, 2009 2:31 PM

  • What indexes are created when we check dimension as line item.

    What indexes are created when we check dimension as line item.
    and also What indexes are created when we check dimension as high cardinality.
    Where can i see that information in the system.
    Answers are highly appreciated.
    Regards
    Kunal

    Hi,
    Line item means it does not have any dimension table.
    High Cardinality means that the dimension is to have a large number of instances (that is, a high cardinality). Also, it is very important to indentify the line item dimension properly. E.g. Sales Order number, this will have the exact number of entries as the fact table entries. Hence, this can be created as a line item dimension. If you are not sure of high cardinality never select that. Activate this function when the dimension has is at least 10%- 20% the size of the fact table (in terms of the number of records). <b>In this case, B tree indices are created instead of bitmap indices.</b>. By default it is BITMAP but with high cardinality it is B-Tree indexing.
    Hope this helps.
    PB

  • How to do the multiple-line String at JList?

    hey everyone,
    i want to create a JList have to display multiple-line string.
    i have use String a="text1"+"\n"+"text2" inside my JList...
    the "\n" change to a sequare box...
    how cum like that.................??
    i need ur kindly helping...

    Because the default renderer for a JList element is a
    JLabel, and that is how JLabel behaves. The question
    "how to do a multiple-line JLabel" has been asked
    hundreds of times in this forum, search for that.i have search for it already but i no get it..anything!
    so, can u give me the url for me? thank you!

  • How to do the multiple-line String at JList? help!

    i need some code to multiple-line String at JList.
    i know that it is can be done by html code.
    example:
    <p>line1</p><p>line2</p>
    but if i use that html code...
    i face another problem to my JList..
    it cannot set the font use the ListCellRenderer..
    like:
    public Component getListCellRendererComponent(
    JList list,
    Object value,
    int index,
    boolean isSelected,
    boolean cellHasFocus)
    Color newColor = new Color(230, 230, 230);
    setIcon(((DisplayItem)value).getIcon());
    setText(((DisplayItem)value).getChat());
    setFont(((DisplayItem)value).getFont());
    setBackground(isSelected ? newColor : Color.white);
    setForeground(isSelected ? Color.black : Color.black);
    if (isSelected) {
    setBorder(
    BorderFactory.createLineBorder(
    Color.red, 2));
    } else {
    setBorder(
    BorderFactory.createLineBorder(
    list.getBackground(), 2));
    return this;
    all my JList will be html type...
    i don't want that happen..can be another method to do that multiple-line String in JList??
    i also need to set a icon image between string in the JList. anyone get idea??
    i need ur help!
    thank you.

    I think you should create/override several methods like setText(String), setIcons(Icon[]), paintComponent(Graphics), getMinimumSize(), getPreferredSize(), etc.
    I would like to code like below...:class MultilineLabel extends JLabel {
        private String[] text = null;
        private ImageIcon[] icons = null;
        public void setText( String newText ) {
            // It overrides JLabel.setText( String )
            // Tokenize newText with line-separator
            // and put each text into the 'text' array.
        public void setIcons( Icon[] newIcon ) {
            // It is similar to JLabel.setIcon( Icon ) method,
            // but it receives an array of Icon-s. Set these icons to 'icons' variable.
        public void paintComponent( Graphics g ) {
            // It overrides JComponent.paintComponent( Graphics ) method.
            super.paintComponent( g );
            if ( text != null && icons != null ) {
                int icon_x = 0;
                int text_x = 0;
                int y = 0;
                // draw customized content..
                for ( int i=0; i<text.length; i++ ) {
                    // compute x and y locations
                    // icon_x = ...
                    // text_x = ...
                    // y = ...
                    // and draw it!
                    g.drawString( text[ i ], text_x, y );
                    icon[ i ].paintIcon( this, g, icon_x, y );
        public Dimension getMinimumSize() {
            int width = super.getMinimumSize().width;
            int height = ... // I think you must compute it with 'text' and 'icons'' arrays.
            return new Dimension( width, height );
        public Dimension getPreferredSize() {
            int width = super.getPreferredSize().width;
            int height = ...
            return new Dimension( width, height );
    }I think that code-structure above is the minimum to implement your requirements. (Of course if you want to implement it :)
    Good luck and let me know it works or not. :)

  • JTable -showing column headers and displaying multi-line strings

    Hi,
    This is two questions really.
    #1 - Does anyone know why my column headers aren't showing in my jtable using the model below?
    #2 - Does anyone know how I can display, mulitple line strings in a jtable? Currently my newline character ('\n') is just being displayed as a character.
    any help very much appreciated,
    Tom
    private class TaskHistoryTableModel extends AbstractTableModel {
    private List taskHistory = new ArrayList();
    public Object getValueAt(int row, int col) {
    if (col == 0) {
    return ((TaskHistoryItem) taskHistory.get(row)).getText();
    } else {
    return ((TaskHistoryItem) taskHistory.get(row)).getDate().getTime();
    public int getRowCount() {
    return taskHistory == null ? 0 : taskHistory.size();
    public int getColumnCount() {
    return 2;
    /** Getter for property taskHistory.
    * @return Value of property taskHistory.
    public List getTaskHistory() {
    return taskHistory;
    /** Setter for property taskHistory.
    * @param taskHistory New value of property taskHistory.
    public void setTaskHistory(List taskHistory) {
    this.taskHistory = taskHistory;
    public String getColumnName (int col) {
    return col == 0 ? "Text" : "Entered At";
    public boolean isCellEditable(int row, int col) {
    return false;
    }

    fixed my own problem - make your mulit-line string into html format e.g.
    this string will appear on two lines in a jtable
    "<html><p>A much more interesting entry</p> <p>on multiple lines</p></html>"

  • An you tell me how to add an advanced action to the TEB so you can check for multiple lines of input

    an you tell me how to add an advanced action to the TEB so you can check for multiple lines of input? How do you add the advanced action?

    Can you elaborate your requirement?
    If you want to have a text wrapped around and enable a scroller for the same, you can achieve it by TEB properties and check the scroll bar option,
    Is this what you are looking to achieve?
    Thanks,
    Anjaneai

  • Track a Line String with a Trigger

    Hi,
    (sorry for my bad english)
    I need to know if i can track a Line String with a trigger. For example, in my case, i've to colums called "COORDINATEPARTENZA" and "COORDINATEARRIVO". From contains a CONTROID() coordinates, anche TO contains CENTROID() coordinates. Now, can i track a line in a colums "LINE" with a trigger? All in automatic?
    There is a method to take the coordinates from "COORDINATEPARTENZA" and "COORDINATEARRIVO" and track an automatic stringline with a trigger?
    This is the code:
    This is the Trigger:
    CREATE OR REPLACE TRIGGER "TRIGGERPERCORSO"
    BEFORE INSERT OR UPDATE OF luo_nomeluogo ON "SPOSTAMENTI"
    FOR EACH ROW
    DECLARE
    partenza VISUALPERCORSO.coordinatepartenza%TYPE;
    arrivo VISUALPERCORSO.coordinatearrivo%TYPE;
    vecchioluogo LUOGHI.nomeluogo%TYPE;
    nuovocodicespostamento SPOSTAMENTI.codicespostamento%TYPE;
    presenza NUMERIC;
    BEGIN
    SELECT COUNT(*) INTO presenza
    FROM spostamenti
    WHERE ope_codiceopera = :new.ope_codiceopera;
    IF (presenza >= 1) then
    SELECT luo_nomeluogo INTO vecchioluogo
    FROM (SELECT * FROM spostamenti
    WHERE ope_codiceopera = :new.ope_codiceopera
    ORDER BY codicespostamento DESC)
    WHERE ROWNUM <2;
    SELECT SDO_GEOM.SDO_CENTROID (c.COLLOCAZIONE, m.diminfo) INTO partenza
    FROM LUOGHI c, user_sdo_geom_metadata m
    WHERE m.table_name = 'LUOGHI' AND m.column_name = 'COLLOCAZIONE' AND c.nomeluogo = vecchioluogo;
    SELECT SDO_GEOM.SDO_CENTROID (d.COLLOCAZIONE, n.diminfo) INTO arrivo
    FROM LUOGHI d, user_sdo_geom_metadata n
    WHERE n.table_name = 'LUOGHI' AND n.column_name = 'COLLOCAZIONE' AND d.nomeluogo = :new.luo_nomeluogo;
    INSERT INTO VISUALPERCORSO(LUOGOPARTENZA, OPE_CODICEOPERA, COORDINATEPARTENZA, LUOGOARRIVO, COORDINATEARRIVO) VALUES (vecchioluogo, :new.ope_codiceopera, partenza, :new.luo_nomeluogo, arrivo);
    END IF;
    END;
    So, now i need to track a line (with oracle spatial) from "COORDINATEPARTENZA" to "COORDINATE ARRIVO". With another trigger.
    Thanks a lot (sorry for my bad english).

    "COORDINATEPARTENZA" and "COORDINATEARRIVO" are points, correct?
    If I understand, you need to create a line from initial point (PARTENZA) to final point (ARRIVO) in a trigger.
    Yes, you can do it.
    Anyway, you can write to me in italian (miguel dot fornari at gmail).

Maybe you are looking for

  • How to use more than one JCo in one project?

    hi all, I want to use more than one r/3 systems and want to switch between them while running the application. For that, how can I use more than one JCo connection in one project and how to activate/deactivate them so as to switch in between them? An

  • Lock button on ipod touch is broken? What to do to fix it?

    The lock button on my ipod touch has stopped working and I was wondering if there is any way I am able to fix it?

  • JVM DLL error : faulting module jvm.dll, version 27.6.5.32,

    Hi, I'm running WL in windows server and beasvc.exe is failing with this message. "Faulting application beasvc.exe, version 1.0.3.9, faulting module jvm.dll, version 27.6.5.32, fault address 0x0001e194" Any help please? thanks, Kam

  • CFMXE 7.x and SQL Server 2008

    Hello - a client recently upgraded to SQL Server 2008 and we can no longer connect from CFMXE 7.x. I have asked them to go through the steps outlined here <http://blog.mxunit.org/2009/02/connecting-sql-server-2008-to.html> but errors persist. The DSN

  • Cannot view videos in windows 8

    I suddenly started experiencing a problem viewing videos on my computer I have a windows 8. I installed adobe flash player latest version ,but I keep geting an "unresponsive script message! It asks to stop the script or continue and neither works it