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

Similar Messages

  • Creating a point geometry with coordinate transformation using JDBC

    If I execute the following SQL statement using a tool such as TOAD then I get a correct value for the point in the oracle column.
    INSERT INTO node (id, position) VALUES (53, SDO_CS.TRANSFORM(SDO_GEOMETRY(2001, 26910, SDO_POINT_TYPE(489535.0, 5457841.0, NULL), NULL, NULL), 4269))
    Point geometry:
    (2001, 4269, (-123.143865452971, 49.2732377100255, ), , )
    If I execute the same statement using JDBC in a Statement or PreparedStatement the Point in the oracle column has 0,0 for the coordinates.
    Point: geometry
    (2001, 4269, (0, 0, ), , )
    In both cases the SQL is exactly the same.
    my JDBC code is
    String insertSql = "INSERT INTO node (id, position) VALUES (" + id
    + ", SDO_CS.TRANSFORM(SDO_GEOMETRY(2001, " + geometrySrid
    + ", SDO_POINT_TYPE(" + coordinate2d.x + ", " + coordinate2d.y
    + ", NULL), NULL, NULL), " + srid + "))";
    Statement insertStatement = connection.createStatement();
    try {
    insertStatement.execute(insertSql);
    } finally {
    JdbcUtils.closeStatement(insertStatement);
    connection.commit();
    Any ideas why this is happening?
    I've tried to do the coordinate transformation in a separate call and pass in the STRUCT returned from that, using JGeometry to create a STRUCT for the value, using a WKT geometry and none of these approaches seem to work

    Paul,
    I have seen this work using JGeometry and STRUCT objects with PreparedStatements. Here's some sample code that seems to work just fine:
    ResultSet rs = null;
    try {
    PreparedStatement ps =
    getConn().prepareStatement("select SDO_CS.TRANSFORM(?, ?) from dual");
    /* constucts JGeometry objects using simple points (doubles) and SRID
    * Per the Javadoc, JGeometry objects can be constructed using the same
    * notation and signature as SDO_GEOMETRY objects -
    * JGeometry(int gtype, int srid, double x, double y, double z, int[] elemInfo, double[] ordinates) */
    JGeometry j_geom1 = new JGeometry(-122.4, 37.8, 8265);
    int newSRID = 4269;
    //convert JGeometry instances to DB STRUCT
    STRUCT obj1 = JGeometry.store(j_geom1, getConn());
    ps.setObject(1, obj1);
    ps.setInt(2, newSRID);
    rs = ps.executeQuery();
    while (rs.next()) {
    //System.out.println(rs.getString(1));
    STRUCT st = (oracle.sql.STRUCT) rs.getObject(1);
    JGeometry j_geom = JGeometry.load(st);
    System.out.println(j_geom);
    ps.close();
    rs.close();
    conn.close();
    } catch (Exception e) {
    System.err.print(e);
    Hope this helps.
    -Justin

  • Generating a Line geometry using collection of point geometry.

    Hi Team,
    Im using Oracle 11g spatial database. As my subject line says, Im trying to write a PL/SQL package, in which, I need to generate a LINE geometry which connects all my collection of POINT geometry. Do we have any in-built spatial SDO utils/packages which can does my work? Can anyone please suggest on this.
    Please let me know if further information is needed.
    Regards,
    Kumar.

    Kumar,
    See if Simon's post answers your question...
    http://www.spatialdbadvisor.com/oracle_spatial_tips_tricks/286/creating-linestrings-2002-from-points-2001
    Bryan

  • In and out point goes clip picture to go off-line

    Hello,
    When I do a mark in and out in a clip. there is somme clip in the browser that go off-line. The clip is not offline but the picon of the clip in the browser said that the clip is offline.
    if I go in this clip and do a mark in noe the picon become correct ???
    thanks
    Carl

    Carl,
    I'm not sure if I follw your question, but here's my attempt to answer:
    If I understand you have clips that show up in your Browser as Offline (red) but if you play them they are just fine and really are there. If you put an In or Out point in the Browser Clip then the files no longer appear offline.
    I have experienced this with clips in the Broswer and the Timeline. I figure it is just a bug in the program and since everything still works, I'm okay.
    So, if that is what's going on, I think it's just a bug, nothing more.
    If that's not what's going on, I'm lost too.
    Hope that helps!
    ~Luke

  • Failed to create the CTI Route Point and corresponding Line on Cisco Unified CM.

    Dear All
               Kindly I got that message "Failed to create the CTI Route Point and corresponding Line on Cisco Unified CM." When I am trying to create Trigger on the UCCX for an Application,
    Bye the way I create Call Control Group and it gives me OK, and I create it from Subsystem>Cisco Unified CM Telephony>Call Control Group
    and Type CTI Ports: 4 | Inbound | Starting DN : 9000 "Nothing in my route pattern report have created CTI numbers"
    So Appreciate your help to avoid that errors raised when I am trying to create new prompts 
    Thanks 
    Ahmed Samir Yosuef 
    Integration Manager

    Let me know the deployment model and Node details

  • How to create point where validate_geometry find invalid geometry element?

    Hi,
    I'm intrested in, is it possible to find the coordinates (or create point layer directly) where sdo_geom.validate_geometry is not 'True'. I want to see wich element of the polygon has error, in a point-type layer.
    Can anybody help me?
    Thanx for advandce!
    Edited by: user465421 on Sep 28, 2009 2:17 PM

    Post your questions here in Spatial

  • Oracle Spatial function to find nearest line string based on lat/long

    Hi,
    Here is my scenario. I have a table that contains geometries of type line strings (the roadway network). The line geomteries are of type Ohio state plane south (SRID 41104).
    I have a requirement - given a lat/long, find the line string that snaps to that lat/long or the nearest set of line strings within a distance of 0.02 miles.
    This is a typical example of trying to identify a crash location on our roadway network. The crashes being reported to us in lat/long thru the GPS system.
    How can i acheive this through any spatial functions?
    Thanks for the help in advance.
    thanx,
    L.

    Hi L,
    That is not the way I would do it. I would convert my road segments to LRS data, then you can do all queries on the same data.
    Or, if you do not want to modify your original data, create a copy of your road segments with the same ID's and convert the copy into LRS data. If you keep the ID's identical, you can easily use geometry from one and LRS data from the other - as long as you are sure the ID is the same.
    Which will make the workflow a bit easier:
    1. Use SDO_NN to get the closest segments
    2. Use SDO_LRS.PROJECT_PT to get the projected point
    3. Use SDO_LRS.GET_MEASURE to get the measure
    And most of these you can incorporate into one single query. Now I am writing this of the top of my head (It's been a while since I played with LRS). so this has not been tested, but something like this should work (but could probably be greatly improved - it's getting late for me :-) ):
    SELECT
    SDO_LRS.FIND_MEASURE  --//find_measure needs an LRS segment and a point
        SELECT            --//here we select the LRS segment
          r.geometry 
        FROM
          roadsegments r
        WHERE SDO_NN(r.geometry,    --//based on the given GPS point
                     sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL), 
                     'sdo_num_res=2 distance=0.02 unit=mile') = 'TRUE'
      SDO_LRS.PROJECT_PT  --//We project the point on the LRS segment
          SELECT         --//here we select the LRS segment (again, which could probably be improved!!)
            r.geometry 
          FROM
            roadsegments r
          WHERE SDO_NN(r.geometry,
                       sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL), 
                       'sdo_num_res=2 distance=0.02 unit=mile') = 'TRUE'
        sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL) --//The GPS point again
    AS milemarker from dual;So it is not as complicated as you think, it can easily be done with just one query (SQL can do a lot more than you think ;-) ).
    Good luck,
    Stefan

  • 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).

  • Error  SDO_WITHIN_DISTANCE of a line string

    I am writing a number of queries for a prototype application. All of my queries are working except for when I try to find POINTS which are a certain distance from a line string.
    select
    poi.*
    from
    point_of_interest poi
    where
    SDO_WITHIN_DISTANCE(poi.location,
    SDO_GEOMETRY(2003,8307,null,
    SDO_ELEM_INFO_ARRAY(1,2,1),
    SDO_ORDINATE_ARRAY(45.0264,32.0082,44.998,32.0027,44.9858,32.0008,44.9797,32.0001)),'distance=5 unit=KM') = 'TRUE';
    The error I receive is
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-13032: Invalid NULL SDO_GEOMETRY object
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
    The location fields in my table are points defined by
    SDO_GEOMETRY(2001,8307,SDO_POINT_TYPE(<longitude>,<latitude>,null),null,null)
    I can create a valid SDO_GEOMETRY on the line string. I only receive this error when I try to compare the points and line string with the SDO_WITHIN_DISTANCE.

    Oops, I finally see what I did wrong. My SDO_GTYPE was wrong 2003 should have been 2002.

  • TS3276 Out going mail is off line?

    I
    Help.  I can recieve mail but can not send amil.  I get an alert telling me my outgoing mail server is off line.  How do I get it back on line?
    I've tried working it out with telsu and we created a new account and today it is off line. Help please!

    Please describe in detail what happened when you took all the applicable steps in the support article that led you here. That's the starting point for any further efforts to solve the problem.

  • Reconnect with changed off-line media path

    Hi.  I've had my catalogued images on a network drive for several years.  Recently had a major failure and re-built the drive, re-loaded from backup etc. 
    Unfortunately, since the overall requirements for the drive had changed over the years, when re-building I didn't re-create exactly the same folder tree as before.  While all my images are there (30,000+) and in the same relative tree as when they were catalogued, they are one level higher in the overall tree.  As a result, the catalog (PSE7) doesn't marry up with the path to the folders and Organizer displays a red 'off-line' media icon for every single image.  (None of the images is marked as needing to be re-connected since Organizer thinks the problem is the media being off-line rather than it being on-line but with a different path.)
    With this many images, re-cataloguing the images isn't a realistic option.  What can I do to get Organizer to recognise the drive is not off-line media and that the images are all there but on a different path ?
    Thanks for any help.

    To cut a long story short ... the original network drive was a Maxtor in RAID1.  When one of its HDD died, it instantly became unbootable.  Support told me there were no user replaceable drives inside and that as it was out of warranty to throw it away !   What's the point of RAID1 if you have to do that ? 
    Instead I downloaded hacked firmware and rebuilt with two new HDDs, then re-loaded from a USB back-up drive.  Had been running fine again since.  But its NAS functionality is limited compared to modern devices and I wasn't prepared to repeat the exercise when a HDD died again.  So I bought a new NAS, moved the HDDs into it, re-formatted, and re-loaded my Catalog from the USB drive again (ie. not from the re-built drive but from a backup taken before it failed).  Downtime for the whole thing was about a fortnight which I could cope with.  But the new NAS has different reserved share-names (as well as a different volume #) so I couldn't use the original names that are in the Catalog and anyway I wanted to split the data between more than one share to exploit the additional functionality.  So when re-loading I put the images into a folder tree starting at the share-name root rather than one level lower.  I expected to have to do a lot of "re-connect missing file" operations. 
    Instead I found that Organizer doesn't think they are disconnected, but off-line, so doesn't allow you to try re-connecting them.  Starting over with the missing tree level re-inserted isn't an option because I can't create the same root share-names on the new NAS anyway, and its volume # will still be different.  What looks to be needed is a way to get Organizer to accept the folders are online and allow me to re-connect the images, as if everything had happened on a local drive, not a network drive.
    Any ideas gratefully received.

  • UCSC-C220-M3S Raid goes "off line"

    HI all,
    I have a UCSC-C220-M3S with 4 hard drives and 8gb memory, I create a raid 0, until this point is ok, but after the devices reboots, and shows the hard drives and the raid, is says 
    raid is "off line"
    Any ideas?
    Thanks.

    This is a duplicate of https://supportforums.cisco.com/discussion/12386576/ucsc-c220-m3s-raid-goes-line  please remove this one.
    -Kenny

  • 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

  • Create delivery  document for line item 5 only manually

    Hi Sap Experts,
    We have scenario, we have created sales order with 10 line items while creating delivery we don’t want to show all the 10 line item to delivery creator (creating delivery manually).
    We will send him mail saying that create delivery  document for line item 5 and we will provide him material number and delivery date and shipping point with sales order number.
    We don’t want to use partial delivery option that split the delivery and we don’t want to use VL10C tcode also.
    What are options we have and how to customize this scenario?
    Kindly suggest.
    Regards,
    Kotli

    Can you be clear in your requirement?
    One requirement is user should not select line items other than the one instructed to them
    The other requirement is delivery split should happen based on item category
    If your requirement is first one, you need to go with user exit USEREXIT_MOVE_FIELD_TO_LIPS in include MV50AFZ1 but I am not sure, on what logic, coding to be included in this exit.  If your requirement is second one, then just try in your system and share the outcome how system is functioning.  You will come to know how standard SAP works.
    G. Lakshmipathi

  • 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!

Maybe you are looking for

  • How to Modify Smartform Methods in CRM 5.0

    Hi,    I have to modify the CRM Sales Order Smartform which requires adding new fields to the existing layout,for which I will have to modify the Method .Kindly help me and provide me with a solution to populate new data in the standard layout. The C

  • Call Transaction Through RFC

    Hi , I am trying to do a call transaction through RFC call from a Middleware which is a CPIC user (only communication Non dialog User ) .  Call  transaction does gets executed without any error but it does not update any data.But when I run it throug

  • CORBA Bug?

    Hi all, I got the following error.... Can't understand what happen? I can get the interface from the server. However, I cannot invoke any method. Any thought? Thank you, edu.cmu.nat.project6.server._SupervisorInterfaceStub:IOR:000000000000003849444c3

  • Viewing issues for custom list exported from Excel

    Exported a table from Excel to use in our Sharepoint Online site.  I am a site owner.  The table/list shows up for all owners.  When a team site member tries to view the list it only shows the headers and no items.  The list is inheriting the permiss

  • Syntax small fix (video autoplay and loop)

    Hi, for the life of me I don't know where to put the autoplay and loop, here's my current attempt. the video loads but it doesnt play vid.html('<video id= "video1" style="position: absolute;bottom: 0px; right: 0px; min-width: 100%; min-height: 100%;