coordinates

How to convert the coordinate between pixel and physical (vtkImageReslice)?

久未见 提交于 2019-12-11 15:51:28
问题 I reslice a 2D image from a 3D volume image by vtkImageReslice. Then, I convert the image (matrix) from vtkImageReslice.GetOutput(). My question is: for one pixel (x, y) in image, what's the coordinate in 3D volume? I have found a solution to convert the coordinate from vtkImageReslice to 3D volume: vtkImageReslice.GetResliceAxes().MultiplyPoint(). However, how to convert the coordinate from pixel to vtkImageReslice? The vtkImageReslice need two inputs: the axes and center point. However, I

Get countries within range of LAT/LONG coordinates

久未见 提交于 2019-12-11 14:55:12
问题 Trouble! I'm looking for a way to find the countries within a given range of LAT/LONG coordinates. E.g.: When viewing an area in Africa using Google Maps, I get out which countries that are in my current view. This is a bit ambitious, and I think the main problem will be dealing with accuracy of the needed polygons. The accuracy of these don't need to be all that great, the borders can probably be tens of miles off, or even more. This will be needed for the entire world. 回答1: You can solve

How to get the position of a Coordinate with respect to Mouse position?

孤人 提交于 2019-12-11 14:28:09
问题 I am on Wpf and I have a list of coordinates where I draw them on a Bitmap Image. My Bitmap file is 1000 * 1000 and it gets filled in a 680 * 440 Image control. Now what I am trying to accomplish is to highlight the coordinates that are near the mouse cursor, when mouse is hoovering my Image. on MouseMove() event handler, I call this function and pass to it my mouse position with respect to the Image control: public void HighLightNearbyDots(Point MousePosition) { int Distance; CoordPoint temp

How to sort through a list of observable coordinates?

岁酱吖の 提交于 2019-12-11 14:10:59
问题 I am struggling to find the best way of removing unwanted targets from a list of coordinates. My coordinates (Ra, Dec) are formed using astropy.coordinates.SkyCoord but I have a large number of un-observable targets that are too low in declination, so what I want to do is sort through my list and remove all targets with a declination lower than -10 degrees for example (as my telescope is in the northern hemisphere). This is the line of my code that produces the list, its called radecs for

MouseListener for HeatMap in Java HeatMap Panel

白昼怎懂夜的黑 提交于 2019-12-11 13:45:32
问题 I am using the Java class HeatMap (by: http://www.mbeckler.org/heatMap/) to generate a heatmap for my matrix. I want to implement a mouselistener which will display the coordinate position (x,y) when the mouse is at some position on the image (heatmap). I have implemented a basic mouse listener for the moment, which shows a message when the mouse pointer is in the HeatMap panel and when it is outside it. But, the problem is, the actual heatmap in the HeatMap panel is smaller than the heatmap

Draw an ellipse on a figure and get coordinates_Python

偶尔善良 提交于 2019-12-11 13:39:31
问题 I'm working on Python 2.7. I have to define some Areas of Interest (AoI) on a picture. Basically, I'm trying to do this drawing an ellipse (or more) on a specific part of the picture and to get the coordinates (x; y) of its contour. I want to save these coordinates on a file, in order to use them later to see whether (or not) my data are inside this area. This is my code: import matplotlib.pyplot as plt import numpy as np from matplotlib.patches import Ellipse, Circle from matplotlib.path

draw imaginary path between two points and print image along that path?

六眼飞鱼酱① 提交于 2019-12-11 13:34:35
问题 Is there a way with Javascript (or jQuery) to draw lines between coordinates (not necessarily showing those lines) and then repeat an image or a letter along those "paths"? I am talking straight lines here, no bezier curves or anything. I would think it doesn't seem like a big deal and will give it a go, but I'd like to have others' opinion on this... something like (imaginary code): path = point1[x,y], point2[x,y], point3[x,y]; every20pixels-->renderimage('path/to/image') or letter('letter')

Convert from British coordinates to standard WGS84 nmea

自闭症网瘾萝莉.ら 提交于 2019-12-11 13:14:14
问题 I was posting similar post already. And I did get an answer in theory but I really need somone to help me. So I am using this EXAMPLE for testing my GPS. What I want to do is how to get standard decimal values like 56,322415 for latitude and longitude. Because now I am getting 5304,254 value. I need it in this form because I will use this for Google maps. Can you check code and tell me what should I left out or how to convert it to WGS84 format. Thank you. EDIT: Here is the picture that is

org.json.JSONException: Value 10.07526 at 0 of type java.lang.Double cannot be converted to JSONObject

情到浓时终转凉″ 提交于 2019-12-11 12:19:55
问题 I want to parse coordinates from JSON. My problem is: org.json.JSONException: Value 10.07526 at 0 of type java.lang.Double cannot be converted to JSONObject. Thank you for help. My JSON Objects: "placemarks": [{ "address": "xxxstreet 170, 43023 City", "coordinates": [ 10.07526, 53.59301, 0 ], "engineType": "CE", "exterior": "UNACCEPTABLE", "fuel": 42, "interior": "UNACCEPTABLE", "name": "xxx", "vin": "xxx" }, My Activity: public class MainActivity extends Activity { ListView lvCars; @Override

Optimizing a Geo-Distance Related MySQL Query

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 12:05:27
问题 I have the following MySQL query: SELECT a.*, ( 3959 * acos( cos( radians('47.3909') ) * cos( radians( a.lat ) ) * cos( radians( a.lng ) - radians('-122.2637') ) + sin( radians('47.3909') ) * sin( radians( a.lat ) ) ) ) AS distance FROM zip_codes AS a ORDER BY distance ASC LIMIT 1; This will get me the zip code in my zip_codes table that is nearest to the coordinates I have specified. However, this is running pretty slow! Around 1 second. All similar queries run around 1 second as well. I am