Create two point line
Hello.
I started using Oracle Spatial and must create a view get points of two associates and show a line connecting.
I found many articles showing how to create lines of an array of points, but none explaining how to get a geometry of one table and one from table b and create a line between them.
The tables change with some frequency, so it is out of the question to create lines in a GIS and download.
Thank you
E. Barbara
E,
It's quite simple, especially if you have simple points. The sql below should help you get started:
create table t1 (pk number, geom sdo_geometry); create table t2 (pk number, geom sdo_geometry); insert into t1 values(1, sdo_geometry(2001,4326,SDO_POINT_TYPE(11,11,NULL),NULL,NULL)); insert into t1 values(2, sdo_geometry(2001,4326,SDO_POINT_TYPE(12,12,NULL),NULL,NULL)); insert into t2 values(1, sdo_geometry(2001,4326,SDO_POINT_TYPE(21,21,NULL),NULL,NULL)); insert into t2 values(2, sdo_geometry(2001,4326,SDO_POINT_TYPE(22,22,NULL),NULL,NULL)); commit; SELECT sdo_geometry (2002, 4326, NULL, sdo_elem_info_array (1, 2, 1), sdo_ordinate_array (a.geom.sdo_point.x, a.geom.sdo_point.y, b.geom.sdo_point.x, b.geom.sdo_point.y)) FROM t1 a, t2 b where a.pk = b.pk;
Kind regards
Bryan
Tags: Database
Similar Questions
-
b/w two points/lines of angle
Hello
I am referring my Qs to suite of thread.
How to find the ANGLE b/w two edges in Oracle Spatial
I have needed to find b/w corner of two points, but in the following code uses 3 points.
G1: = point (50, 7); -A
G2: = point (51, 7); -Point B
G3: = point (50.10); -Point C
1: = atan2 (g2.sdo_point.x - g1.sdo_point.x,)
G2. SDO_POINT.y - g1.sdo_point.y);
angle2: = atan2 (g3.sdo_point.x - g1.sdo_point.x,)
G3. SDO_POINT.y - g1.sdo_point.y);
any average easir is greatly appreciated.
AlHere is my simple routine retrieves a package for the angles remotely without equal x / y coordinate for relatively short distances systems. If you use a different coordinate system, replace 8307 with what you use:
FUNCTION get_angle_lat_lon (x1 IN number, y1 IN number, x2 IN number, y2 IN number) RETURN number AS x_dist number; y_dist number; avgy number; correction number; dist_eq number; dist_loc number; BEGIN -- Find average (center) latitude value avgy := (y1 + y2) / 2; -- Get the distance of at the equator in meters dist_eq := sdo_geom.sdo_distance (sdo_geometry (2001, 8307, sdo_point_type (x1, 0, NULL), NULL, NULL), sdo_geometry (2001, 8307, sdo_point_type (x2, 0, NULL), NULL, NULL), 0.05); -- Get the distance at the location dist_loc := sdo_geom.sdo_distance (sdo_geometry (2001, 8307, sdo_point_type (x1, avgy, NULL), NULL, NULL), sdo_geometry (2001, 8307, sdo_point_type (x2, avgy, NULL), NULL, NULL), 0.05); IF (dist_eq = 0 OR dist_loc = 0) THEN -- Set correction to 1 for non-optimized point types or zero or near-zero width objects correction := 1; ELSE -- Compute the MBR correction factors correction := dist_eq / dist_loc; END IF; x_dist := (x2 - x1) / correction; y_dist := (y2 - y1); RETURN sdo_util_plus.abs_angle (to_degrees (ATAN2 (x_dist, y_dist))); END get_angle_lat_lon; FUNCTION abs_angle (angle_deg IN number) RETURN number DETERMINISTIC AS angle number; BEGIN angle := angle_deg; IF angle < 0 THEN -- make it bigger WHILE angle < 0 LOOP angle := angle + 360; END LOOP; END IF; IF angle >= 360 THEN -- make is smaller WHILE angle >= 360 LOOP angle := angle - 360; END LOOP; END IF; RETURN angle; END abs_angle;
-- Stand alone function: CREATE OR REPLACE FUNCTION "TO_DEGREES" ( radians IN NUMBER ) RETURN NUMBER IS BEGIN RETURN radians * 57.295779513082320876798154814105; END to_degrees; /
-
Oracle 11g: cut a line string in a set of two points-lines
Hello
I have database RDBMS Oracle 11 GR 2 EE n.
I have a linestring unique 2D with about 100 points.
Does anyone know a technique of "divide" this line adajacent all lines consisting of only 2 points?
Thank you in advance for advice.
Kind regards
Hello
As John explains, this book is highly recommended, well written and comes with many examples.
In addition, a simple example of SQL, I used 6 years ago:
SELECT id,
sdo_geometry (2002, NULL, NULL,)
SDO_ELEM_INFO_ARRAY (1,2,1),
SDO_ORDINATE_ARRAY (startx, starty, endx, endy)
)
Of
(
Select
startp.strtcnt_id, startp.x startx, starty endx, endy endp.y endp.x, startp.v_id, startp.y, endp.v_id
Of
(
Select strtcnt_id, v_id t.id, t.x, t.y
of s YOUR_TABLE_NAME, table (sdo_util.getvertices (geometry)) t
) startp
,
(
Select strtcnt_id, v_id t.id, t.x, t.y
of s YOUR_TABLE_NAME, table (sdo_util.getvertices (geometry)) t
) endp
where startp.id = endp.id
and startp.v_id = endp.v_id - 1
);
The Interior selects can be simpler and more efficient in my opinion, by using the with clause, but it should work.
Luke
-
Draw a line connecting two points in the WPF chart
I'm trying to understand the best way to draw a line between two existing points on my graph in WPF. At first, I thought I had it works fine; I just added another parcel to my graph then given exactly two points for rendering. But I quickly noticed that the app has become surprisingly slow and CPU was quite high (adding other plots does not affect the use of the CPU as long as they have a complete set of points (?)). He wants me if I looked at using the DataToScreen method on the chart but I can't know what the parameters are. The second parameter is simply an IList that tells me a lot. This seems to be the method I want to use for the coordinates of a point on the graph screen.
No one knows what the second parameter is supposed to be for the DataToScreen method? Everything I tried throws an Exception of Argument.
Thank you
DanDataToScreen
will return a screen coordinate in the plot area of a chart of the value of the raw data horizontal and vertical in the given list. The parameter value is aIList
for compatibility with other methods of graphical query such asFindNearestValue
, returnIList
values containing raw data.A concrete example, say you had a graphical configuration with a wide horizontal axis ranging from 0 to 100 and a vertical axis double precision ranging from 10 to 20:
To get the screen coordinates of the value at the center of the two axes, you can call:
graph.DataToScreen(plot, new object[] { 50, 15.0 })
Note that the raw data values corresponding to the type of axes (horizontal
AxisInt32
returns the integer50
and verticalAxisDouble
Gets the value15.0
).You also mentioned a performance issue where "adding other plots does not affect the CPU so that they have a complete set of points". I did a simple test app that adds an array of two points of a chart on each key (for example
graph.Data.Add(new[] { new Point(x1, y1), new Point(x2, y2) });
), but could not reproduce the problem you saw. Could you share the code, you use to draw the connection line? -
When I create two keyframes at the same position between keyframes at different positions this way adds a loop. How can I get rid of the loop? I was just by dragging the handles on the vertex point, but I want to get rid of the loop together.
Focus on the Bezier handles on the motion path in the Composition window. You can select the tool pen (g) and hold down the Alt/Option key to select the tool convert Vertex (it looks like a V on the side) and then fix the handle manually or click on the top of the trajectory to change it to a straight line. You can also play with spatial interpretation Keyframe.
To avoid this, you can change the interpolation of keyframes in space to linear preferences. Most of the time I don't like straight so I keep my default value of Bézier.
-
Horizontal menu on two separate lines
Hi I have a question about the menu horizontal navigation for desktop widget. I want to access the 12 pages, but there is not enough space through page 12 menu items, it is possible to have the menu widget to have 2 lines instead of one menu items.
Hello
You can try to create two Menus by hand with 6 menu items.
To create a menu manual you need to go into Menu widget and must select the type of menu as "manual."
Then the moment where you select 'manual', it will show you a menu option > click and '+' sign will appear > click the '+' to create menu items 5.
Once done link these small objects with related pages using the hyperlink Panel
Similarly, you can create menus for the other 6 points. (Make sure to place them in a master page to avoid extra work)
Concerning
Vivek
-
Combining the two points - CS4
When you join two points, it creates a line between them, is it possible to merge them together?
Use the direct Selection for the points of the box tool and then use the shortcut Cmd (Ctrl) - shift - Opt (Alt)-J to merge the points (at least in CS4 and below).
-
Rectangular ROI defined by two points
Hello
I am creating a return on investment rectangular based on two points A(x1,y1) and B(x2,y2). A and B change between the images, so I need the rectangle to move with them. Is it possible to fix this uncomplicated? From now on, it seems I need to calculate the angle between them and continually updated to date with the 'left', 'right', 'top' and 'bottom' coordinated. Any suggestions?
Just to clarify, the idea is that A and B are circles on the short sides of the rectangle (respectively).
Thank you
Thanks but the rotated rectangle did not actually form me. I ended up using some trigonometry to do. It works fine now. I calculated essentially the 4 corners of my rectangle and how they move with my mobile KING then then used the VI Tetragon extract for my KING.
-
On the two latest updates of definitions soundcards Defender, the usual announcement 'create restore point' is missing. Update history confirms successful downloads, but I wonder if something essential has been omitted.
JW
To store restore points, you need at least 300 megabytes (MB) of free space on each hard disk with the system on Protection.
System Restore can use up to 15 percent of the space on each disk.
As the amount of space fills up with restore points, System Restore deletes older restore points to make room for the new.
System Restore: frequently asked questions
http://windowshelp.Microsoft.com/Windows/en-us/help/517d3b8e-3379-46C1-B479-05b30d6fb3f01033.mspx>
UTC/GMT is 13:46 19 October 2012 -
Close Internet Explorer creates two elements of rundll32.exe * 32 on the list of the task manager that trigger the physical memory to 90-100%
You have IE set to 'delete browsing history leaving? " Rundll32 (with a command line incorporating something in the sense of a call to a function ClearMyTracksByProcess in inetcpl.cpl) is generated to perform this action.
-
How to create a horizontal line in the region of html
Hello
How can I create the html elements, including a horizontal line in an html area filled with items. I want to use this horizontal line to part elements optically. Moreover, my solution for now is to group the elements belonging together in a separate html area. So I have now 3 parts of html, each filled with 5 columns of elements. Is it possible to align the elements in the 3 regions (together)? Cause at the present time, only the items in each region are aligned.
I use oracle 11 g 2 with apex 4.1
wucis wrote:
Apex version is 4.1
Theme: Sapphire 17
Page: Two level Tabs - right Sidebar (optional / based on a table)
The region is HTML
Main question is, how to create a horizontal line as visible separator between items.
My personal preference would be to group the items according to the needs in the subregions and use CSS to display the Visual borders and uniform spacing of control over formatting tables.
If however you want using HTML single region, is to create elements of the only view to the agenda of the positions of the sequence in the region where you want the jumps to appear, with the following parameters:
Name: PX_HR_1 / / substitute suffix number and an increment of page as required
Display in the form: Display only
Save Session State: NO.
Start on a new line: Yes
Start the new field: Yes
ColSpan: number of columns in your layout
Label: leave blank
Horizontal/Vertical alignment: Above
Model: --choose a model--
Type of source: Static assignment
Source of value or expression:
-
Does anyone know a shortcut for create/exit points exactly 1 second (or no preset amount) in the source monitor apart?
For example, I want to choose a second clip sections of 5 minutes, but do not want to move the points of entry/exit with the mouse in the hand. Would also be useful to several clips where 1 s/exit points have not been established
Thanks for all the answers!
Go to preferences and on the set of forward/reverse reading pane, for the number of images you want to move the read head (in this case 60, two seconds):
And click OK.
Then put your first marker, then type shift + right arrow to move the playback cursor, the number of images that you entered.
If you type shift + left arrow , it will move the playback cursor backward the number of images.
MtD
-
Is it possible to create two-way multiselect tables? Help.
Hey everyone (once again since you're indeed great to help me to).
I was wondering if it would be possible to create two-way multiselect tables to interact with each other, as qlikview behavior have, because that's my goal.
Imagine that I have 3 tables in my schema/database:
Departments (of an HR diagram), with the following attributes: department_id (primary key), department_name, manager_id, location_id;
Salary_by_job (created for this purpose), with the following attributes: job_id (primary key), department_id, salary, min_salary, max_salary;
Employees (from HR diagram), with the following attributes: employe_id,..., job_id, salary, manager_id, department_id
Would it be possible to creat multiselect two-way tables?
Like the following:
-I click on a Department, it shows the data relevant to this Department in the table salary_by_job and the employees table.
And after having clicked on that, I could click on a single employee and the department table would be the same (because it's an employee in the same Department), but the salary_by_job would show only the information about the argument job_id for this employee.
I'll try to show some text here:
Department (selected line = 1) = Department of Public Information (which has 3 employees)
Employees = X (with the job_id = adminargument), are (with the job_id = managerargument) and Z (with the job_id = Internargument)
Salary_by_job = Admin, with data blah blah blah, Manager, with data blah blah blah and trainee, with data blah blah blah
And then I have to click on the X of the employee and the result would be:
Department (selected line = 1) = Department of Public Information (which has 3 employees)
Employees = X (with job_id = adminargument)
Salary_by_job = Admin, with data blah blah blah
Can do something like this? If so, how?
I think attached with fasteners at each table and have links to move forward and backward.
If anyone has an idea how to do this, please respond, it may be useful.
Thanks a lot for all the help. Have a beautiful day!
Kind regards
Frederico Barracha.
BTW, I use jdeveloper 12.1.2.0.0
Mensagem editada por: FredericoSB
Have you tried to add a setPropertyListener for tables and change the collectionModel to the 3rd table accordingly?
Ex: Suppose you have three tables, Parent (VL)-> child (VL)-> grandchild. There is a relationship between the (VL) Parent-> child.
Now, you can have links to tree for both the GrandChilds (for example GrandChildViaParent and GrandChildViaChild).
Your jspx could be something like
If all your tables are read-only, then you can change it to something like
This is just a sample. You could implement the same for all properties in the table of a grandchild as EL to make editable as well.
It comes without coding. If you care to code a little, you could use a dynamic array in place and tie the value accordingly in each of the selectionListener in the table (that would be a neat approach)
Arun-
-
Create two-sided business cards
Nice day
I design my card in PS (even though I know I should do it in Illinois, but not the point here).
Now my business card has a front and back... In illustrator, I would create two work plans. What would I do in Photoshop? Extend the canvas to double the size? Or can I create a separate for the back file?
What is the correct way to print a point of view?
Thank you
I recommend the creation of two files.
And please keep the purge necessary in mind in the case where the background is not white or elements cross the edge.
-
Create a new line, the prior editing lock
LCD display 9, Acrobat 9, Windows 7
Gurus-
I'm doing a table of observations, and when you create a new line the prior is locked for editing.
To add a line, I put a button in the table with this code:
_Row1.addInstance (true);
xfa.for.Recalculate (true);I'm not familiar with the code to browse an index of the table, so don't have no idea how to put in place so that in addition to these two lines above, code goes something along the lines of access = 'protected' to every cell in the previous row.
Ideas?
Hello
First of all, my script was incorrect. ReadOnly must be enclosed in quotes, for example: = "readOnly";
In addition, you must remove the Row1 readOnly lines and it should work. This is because the reference to Row1 is included in the variable of the bow.
For example:
pRow.comment.access = "readOnly";
Hope that helps,
Niall
Maybe you are looking for
-
Help get rid of the old AppleID on iPhone 6 and iPad 2
I recently changed my AppleID, but my old ID is always on my iPhone and iPad - I can't update anything. I know I have to sign out of all my devices using iCloud to update. However, my iPhone and iPad still use my old ID and ask for my old password si
-
That recently started having problems streaming to my TV via Apple TV Air Display iMac. Started getting the msg "Unable to connect to Apple TV". After a repair all imaginable possibilities, the only solution is to restart Apple TV by unplugging / p
-
How to install blur, once the phone is in use?
I just bought my backflip last night. The seller got my husband phone works fine, but I can't get mine to sync any email or load applications. It seems that she got my blur account set up when he started first, and now I can't get anything to work on
-
80242614 error code when you perform Windows updates
Original title: error code 80242614 My computer did a restart on an update, then went black, and had to do a system restore to get back to normal.
-
Cameras Xperia double Z5 (E6633) off center
Hello; I just got my new Z5 double and noticed that the front and rear cameras are slightly off-centered beeing more noticed in the front camera. The problem doesn´t affect the photos at all (as far as I've noticed) and I thik is just aesthetic. I ju