coordinates

Get midpoint of SDO.GEOMETRY polyline

China☆狼群 提交于 2020-01-24 12:05:28
问题 I have a table in Oracle 18c that has an SDO_GEOMETRY column with polylines. I want to query the X and Y coordinates of the polyline midpoints using SQL. Is there a way to do this with Oracle Spatial? 回答1: Oracle Spatial has a linear referencing package called SDO_LRS. It can be used to find the midpoint coordinates of a polyline. --In this case, 'sdo' is the name of the sdo_geometry column. sdo_lrs.convert_to_std_geom(sdo_lrs.locate_pt(sdo_lrs.convert_to_lrs_geom(sdo,3) ,sdo_geom.sdo_length

How to know coordinates in a real image from a scaled image

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-24 09:25:13
问题 First of all thanks for your time reading my question :-) I have an original image (w': 2124, h': 3204) and the same image scaled (w: 512, h: 768). The ratio for width is 4.14 (rw) and the ratio for height is 4.17 (rh). I'm trying to know the coordinates (x', y') in the original image when I receive the coordinates in the scaled image (x, y). I'm using the formula: x' = x * rw and y' = y * rh . But when I'm painting a line, or a rectangle always appears a shift that is incremented when x or y

Calculate coordinates of a point with given distances to two other points

匆匆过客 提交于 2020-01-23 18:37:29
问题 If I have three points A, B, C and I know the distances between them and A is at 2D coordinates {0,0} and B is at {ab,0}, then what would be the formula to find the coordinates of the point C? 回答1: The point {cx, cy} has to solve two equations: cx^2+cy^2==ac^2 && (cx-ab)^2+cy^2==bc^2 => cx^2-(cx-ab)^2==ac^2-bc^2 => 2*cx*ab==ac^2-bc^2+ab^2 => cx = (ac^2-bc^2+ab^2)/(2*ab) => cy = +/- sqrt(ac^2-cx^2) iff ac^2-cx^2 > 0 => cy = 0 iff ac^2-cx^2 = 0 => no solution else There are either two points

Confused between logical coordinates and device coordinates in Windows API

感情迁移 提交于 2020-01-23 05:41:07
问题 I have been looking into a Visual Studio C++ Windows application project which used two functions SetWindowExt (...) and SetViewportExt (...) . I am confused about what these two functions do and why they are necessary. Searching about these functions, I came to the concept of logical coordinates and device coordinates. Can anyone please explain what is the importance of these two concepts? 回答1: Device coordinates are the simplest to understand. They are directly related to the device that

How to format GPS latitude and longitude?

倾然丶 夕夏残阳落幕 提交于 2020-01-22 17:42:23
问题 In android(java) when you get the current latitude and longitude using the function getlatitude() etc you get the coordinates in decimal format: latitude: 24.3454523 longitude: 10.123450 I want to get this into degrees and decimal minutes to look something like this: Latitude: 40°42′51″ N Longitude: 74°00′21″ W 回答1: to conver from decimals to degrees you can do as follow String strLongitude = Location.convert(location.getLongitude(), Location.FORMAT_DEGREES); String strLatitude = Location

Bearing between two points

别来无恙 提交于 2020-01-22 12:43:29
问题 Ive been using the geopy package , which does a great job, however some of the results i get are inconsistant or come with a relatively large displacement, i suspect that the problem resides with my bearing calculation: def gb(x,y,center_x,center_y): dx=x-center_x dy=y-center_y if ((dy>=0)and((dx>0)or(dx<0))): return math.degrees(math.atan2(dy,dx)) elif (dy<=0)and((dx>0)or (dx<0)): return (math.degrees(math.atan2(dy,dx))+360) else: return (math.degrees(math.atan2(dy,dx))+360)%360 I need to

Bearing between two points

只愿长相守 提交于 2020-01-22 12:43:26
问题 Ive been using the geopy package , which does a great job, however some of the results i get are inconsistant or come with a relatively large displacement, i suspect that the problem resides with my bearing calculation: def gb(x,y,center_x,center_y): dx=x-center_x dy=y-center_y if ((dy>=0)and((dx>0)or(dx<0))): return math.degrees(math.atan2(dy,dx)) elif (dy<=0)and((dx>0)or (dx<0)): return (math.degrees(math.atan2(dy,dx))+360) else: return (math.degrees(math.atan2(dy,dx))+360)%360 I need to

Kinect - Map (x, y) pixel coordinates to “real world” coordinates using depth

萝らか妹 提交于 2020-01-21 02:26:45
问题 I'm working on a project that uses the Kinect and OpenCV to export fintertip coordinates to Flash for use in games and other programs. Currently, our setup works based on color and exports fingertip points to Flash in (x, y, z) format where x and y are in Pixels and z is in Millimeters. But, we want map those (x, y) coordinates to "real world" values, like Millimeters, using that z depth value from within Flash. As I understand, the Kinect 3D depth is obtained via projecting the X-axis along

Turtle line intersection, coordinates

被刻印的时光 ゝ 提交于 2020-01-17 05:20:11
问题 I need to make a small program that draws three circles, a line between the first two, and then determines if the third touches or intersects the line. I have done everything but the last part. I am trying to use the points to determine if the area is 0, which would mean that the third point is, in fact, intersecting the line. Right? Or I could use another way. Technically the third circle can be within 3 pixels of the line. The problem is near the bottom at the hashtag. I would appreciate

Finding top-level X Window x/y coordinates of CTRL-F text in Firefox

你离开我真会死。 提交于 2020-01-16 19:29:32
问题 I need to programmatically determine the top-level X window coordinates of the text that is found by using CTRL-f in Firefox. For example, starting with this sequence: Open up Firefox on Linux (MS Windows is not involved here). Browse to some web page. Type CTRL-f to start finding text "foo" that exists in the page. Firefox then highlights the text as expected. Type Escape key which eliminates the find toolbar at the bottom of the page. Now, at this point, I want to open up the Scratchpad