How can i calculate distance on Image in a pictureBox ?

This is a screenshot of what i mean:
In the screenshot i have a cone. The cone is moving around 360 degrees.
In the form1 top i have this:
private float distanceFromCenterKm = 200F; //in kilometers
private float distanceFromCenterPixels; //in pixels 183pixels = 200Km
Now in the constructor i did:
numericUpDown1.Value = 260.5M;
So now the distance is 300km
Then:
//initialize distanceFromCenterPixels
distanceFromCenterPixels = (float)(/*183d*/ (double)numericUpDown1.Value * (double)distanceFromCenterKm / 200d);
The numericupdown1 in the designer set the minimum value to 50 and maximum to 300 in jumps of 50.
But now what i don't know is how to calculate the distance for example from the center to where the shadow start you can see in the screenshot that the shadow i mean just a bit before the 300km start. So i want that the cone will get untill the start of
the shadow border. I'm close and i could keep playing with the values but how can i make that the numericupdown1 values will jump not by 50 but by some value/s so i can calculate easy any distance to any point ?
Or something else maybe something like i'm using my mouse cursor when i make a click on a point some where in the image the cone will get to this distance(radius).
So if i clicked with the mouse on the 300km on the image the value of the numericupdown will change to 260.5
And if i clicked on the shadow border(will be hard to click exactly on the border) the cone will get to this distance.
But my main question/problem is how to calculate any distance for example to this shadow border ?

You simply should not go this way.
Get a Map SDK and go on. 
Microsoft has one. Probably for you is the best one the WPF one. AFAIK has it classes which you probably also can incorporate in your Windows Forms solution to get the Geo Information.
https://msdn.microsoft.com/en-us/library/hh750210.aspx
Success
Cor

Similar Messages

  • How can I calculate 3D distance with OS10g

    Hi,
    How can i calculate 3D distance between two objects using OS 10g?
    Thanks,

    If you have two 3d points you can:
    Make them into a line string
    Linear reference the 3d line string
    The length of the 3d line string is the distance between the points
    3d linear referencing is not supported for geodetic (non-cartesian) data.
    In 11g of course the story changes drastically.
    Here is a simple example:
    create or replace function points3dDistance(geom1 sdo_geometry,geom2 sdo_geometry)
    return number deterministic as
    geom sdo_geometry;
    length number;
    begin
    -- creating a 3d line segment
      geom := sdo_geometry(3002,null,null,sdo_elem_info_array(),sdo_ordinate_array());
    -- not checking, but should be cartesian coordinate system
    -- also geom1 and geom2 coordinate systems must match
      geom.sdo_srid := geom1.sdo_srid;
    -- creating a line segment from two points
      geom.sdo_elem_info.extend(3);
      geom.sdo_elem_info := sdo_elem_info_array(1,2,1);
      geom.sdo_ordinates.extend(6);
    -- if production i would check first for sdo_ordinates/elem info
    -- and make sure point data with the right number or ordinates
    -- since only demo assume input data comes from sdo_point in geom1 and geom2
      geom.sdo_ordinates(1) := geom1.sdo_point.x;
      geom.sdo_ordinates(2) := geom1.sdo_point.y;
      geom.sdo_ordinates(3) := geom1.sdo_point.z;
      geom.sdo_ordinates(4) := geom2.sdo_point.x;
      geom.sdo_ordinates(5) := geom2.sdo_point.y;
      geom.sdo_ordinates(6) := geom2.sdo_point.z;
    -- Now convert to lrs3d and get the length
      return sdo_lrs.measure_range_3d(sdo_lrs.convert_to_lrs_geom_3d(geom));
    end;
    select points3dDistance(
      sdo_geometry(3001,41048,sdo_point_type(5000,5000,0),null,null),
      sdo_geometry(3001,41048,sdo_point_type(5000,6000,1000),null,null))
    from dual;

  • How can I restore a single image from an aperture time machine backup, do I have to restore the entire library? that does not make sense

    I hope there has been found a more efficiant solution for this,  how can I restore a single image from an aperture time machine backup, I really hope I don't have to restore the entire library? that does not make sense
    any suggestions?

    Did you try browsing your backups in the Finder ?  That is, do not go and "Enter Time Machine".  Instead, navigate to your Time Machine backup via Finder and then manually go to the time period (by folder name) you are looking for ... when you find your Aperture library you can then "Show Package Contents" and find the Master you are looking for.

  • How can I keep a photo image from fading away on my tv using apple tv.

    How can I keep a photo image from fading away on my tv using apple tv?

    Thanks for you reply.  When I paint, I bring up the photo as you suggested.  I begin painting.  After about 10 minutes or so, the photo goes blank.  And, I have to start the process over again to get that same photo.  It interrupts the painting process.  I think it goes blank due to a sleep function.  I have gone into the Apple TV settings and turned off the sleep function.  But, this does not seem to work.  What can I do to keep the image on the TV screen permanently?

  • How can i calculate tempsize and logdir size ?

    Hello:
    I have one database on a primary server and its replica on a replica server.
    Since one week to now, Mexican Exchange have had a considerable growth on transactions.
    My database works in line, every night all data is cleaned waiting for new data on next day.
    From last Thursday (29 april 2010) my replicas have had problems on drop all data using delete from.
    I use delete from because those tables are Oracle cache groups defined.
    Looking for error on tterrors logs (yesterday I got this error) I could see that replica was ran out of temporal memory.
    On line database and replica database I have defined same temporal memory size, on this case 512Mb. But primary database did not send any error about this parameter, so if I checked “monitor” columns on database, my temp_in_use size is too less than temp_allocate_size.
    My problem is, how can I calculate temp_allocate_size ?
    So I have had close to 3,000,000 record on a simple table, I mean, I could have 2 or 3 tables with same number of rows.
    If I have this parameter (may be 9,000,000) rows to be deleted, is there any way to calculate temp_allocate_size ?
    But now, I suppose that I need enogh space on “LogDir”, my high_water_mark for permanent memory is 10GB, I have defined 16 gb for LogDir, but if I stopped replication since the operation starts, I had 100% space used at middle of my operation, so 5Gb on real database used, it is using close to 16 gb on LogDir.
    My second doubt … is there any way to calculate LogDir size having the maximum database size ??
    Thanks a lot for your help.
    Regards.

    I think that approaching this from the perspective of increasing temporary space and log space is not the best way.
    Firstly, there are better ways to delete all rows from a table instead of using delete...
    1. For regular tables (ones that are not part of a cache group) you can use TRUNCATE TABLE ... This operation is replicated but the voilume of replicated data is vastly smaller than if you delete all rows individually. Also, it should take a lot less Temp space on both the source and target system.
    2. For cache tables, you could use UNLOAD CACHE GROUP ... This is similar to TRUNCATE but for cache tables. Again, this operation is replicated. Note that if you are using AWT or SWT cache groups and you DELETE in TimesTen then the data is also deleted from Oracle... is that wjhat is desired?
    If you have to use DELETE then it is very important that you delete the rows in small batches rather than as one huge transaction. Trying to replicate a delete of 3M rows will cause huge problems for replication. A much better solution is to delete in smaller batches using some application logic as follows:
    loop:
    commit;
    DELETE FIRST 1000 FROM sometable;
    If rowcount > 0 then goto loop;
    commit;
    This approach has 5 benefits:
    1. Much less Temp space will be needed.
    2. Replication will be able to process the delets as they occur rather than waiting until all 3M rows have been deleted and then trying to tepliate a single transaction of 3M deletes. This will greatly improve replication performance and also prevent excessive log file buildup.
    3. Checkpointing will be able to purge log files as the delete progresses rather than having to wait until all rowsw have been deleted. This will prevent excessive log file buildup.
    4. The overall time required will be much reduced compared to deleting all rows in a single delete.
    You should not stop replication while the delete s are being done as this just causes log file accumulation.
    To answer your original question. it is not possible ot 'calculate' the required temp space pof log space; rather one must use observed data from when the system is running to determine the necessary size. For Temp size, you can look at the Temp high water mark to see the maximum space used and then set TempSize to somewhat more than that value. For log space, you need enough to sustain the maximum amount of log data generated with some contingency. Running our of log space is a very bad idea...
    If you adopt my suggestions above then you can avoid these issues and also complete the cleanup of data in a shorter time.
    Chris

  • How can we calculate no.of leave used by the employee except sunday.

    Dear Friends,
    i have query how can we calculate no.of leave taken by the employee except sunday & government holiday.
    Example: A person take a sick leave From 13/02/2008 to 20/02/2008 with in that period 17th was sunday.
    when we calculate absence day for that person,Total value is 8 days but exact output is 7days only.How can i get exact result,any function module is avilable for this issue .
    Thanks & Regards,
    Rajkumar.A

    Hi,
    you have to consider SL leave as in holiday's So you can check with clinet if client says consider you can otherwise you con't
    its depend client requirement
    and you can go to controlls inSAP and change absence controlls for SL with holidays
    Regards
    Suresh

  • How can I create a disk image of snow leopard installer disk from my Imac which runs it?

    how can I create a disk image of snow leopard installer disk from my Imac which runs it? It came without DVD installer, and I want to make a copy of it's OS installer but can't find out how.

    You need to have the disc in order to create disk image of snow leopard installer disc. What did your machine ship with? If something later than SL, then why? If earlier, then you can buy the SL installer disc and make the disk image.

  • How can I exchange all the images in a slide show with new ones

    I have 18 slide shows each is a different competition for our camera club. How can I exchange all the images from each slide show with new images as our club competitions commence? I am reluctant to just delete the slide show because I will have set it all back up. I want to leave the size shape and format of the show as is, but just exchange all of the current images with new ones. I am hoping there is a quick way to delete and replace all images for each show? Each slide show has around 40 images and I have 18 shows
    thank you for your help

    1. Activate "thumbnails" in the configuration panel
    2. Select one Thumbnail.
    3. Rightclick and choose "Select same"
    4. Press "backspace"
    5. Open the configuration panel and load the new images.

  • How can we calculate no. of instances in a java program ?

    Hi,
    I want to know that
    How can we calculate no. of instances in a java program ?
    Actually I just want to calculate number of live instances in a program at any time...
    Thanx in Advance
    Vijay

    Been asked a few times in this forum.
    Try having a search.
    One way, in brief, is to instrument your classes so that constructors update a per-type counter, and enqueue a PhantomReference for the instance.
    When you pop from an associated ReferenceQueue, decrement the counter for the no longer reachable type.
    Once you have this, you can query instance counts per type, or globably etc.
    We maintain a model which can be remotely queried - and display results over time using JGraph. Gives a fairly non-intrusive way to spot and narrow down the cause of memory leaks in a large application.

  • How can I improve quality of image when burning a movie to a DVD

    How can I improve quality of image when burning a movie to a DVD?

    What resolution are you using?  If the DVD is to be playable on an ordinary DVD player, only ordinary TV resolution is supported.  You need Blue ray for HD.
    Geoff.

  • How can you get a mirror image of a photo on iPhoto?

    How can you get a mirror image of a photo on iPhoto?

    By using an external editor. Preview is already on your Mac. It's called 'Flip Horizontal'
    In order of price here are some other suggestions:
    Seashore (free)
    The Gimp (free)
    Graphic Coverter ($45 approx)
    Acorn ($50 approx)
    Pixelmator ($50 approx)
    Photoshop Elements ($75 approx)
    There are many, many other options. Search on MacUpdate or the App Store.
    You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.

  • How can I turn off the images of avatars that post...

    how can I turn off the images of avatars that post in this forum? they are annoying.

    I think the avatar pictures help a lot to visually tell apart the different users participating. Pictures are way quicker to discern than user names are.
    Do you want them removed because they distract you or you find certain ones disturbing (You can easily flag those to the moderation team)?
    Follow the latest Skype Community News
    ↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓

  • How can i retrieve my wallpaper image?  It is not in my photos.  I deleted the picture from my photo's because i had the original file on my desktop.  Then mydesktop was stolen and this is my only chance of recovery.

    How can I retreive my wallpaper image?  It is not in my photos.  I deleted it from my iphone because i had a copy on my desktop.  Then my desktop was stolen and now the only image i have is on the iphone wallpaper.

    My problem is the backup is lost too, because the computer that contain the backup was lost with the original photo.  It seems to me that the image is stored on the phone in some type of memory.  I'm willing to destroy the phone in order to retrieve the image.  Any thoughts on where or how the wallpaper is stored on the phone itself?

  • How can I create clearer, sharper images and buttons in Muse?

    How can I create buttons and images that have a vector like clarity? When I upload images (buttons, jpegs and pngs) a lot of the time they seem to have a slightly fuzzy quality to them. I have read previous posts on this matter and none have helped. Any feedback on this will be greatly appreciated. Thanks

    When you place your images in exactly the size you saved them in Photoshop or whatever, Muse doesn’t touch it.
    The quality in this case is the quality you saved the image.
    The best way is, to examine in Muse the available pixel size of the image and then use Photoshop to obtain this size
    A helpful widget to examine the potential size of an image in advance, is the "lore ipsum"-Muse-widget, that you find in the free widget collection "Andrew’s Prototypes":
    Andrew Prototypes | Exchange | Adobe Muse CC

  • How can I set the desktop image for client computers?

    How can I set the desktop image for client computers using ARD or terminal?

    How can I set the desktop image for client computers using ARD or terminal?

Maybe you are looking for

  • Adding new element to BPEL for use in PL SQL type, has binding errors

    Figured I might as well post this here since I haven't gotten a single reply in 3 days anywhere else :/ I have a BPEL service that calls a PL SQL procedure. I have added a new element to the BPEL called quote_cart_line. All I had to the BPEL to accom

  • Connecting AirPort Express to AirPort Extreme 802.11n

    The following steps helped me set up an AirPort Express base station connected to a set of wireless speakers with my new AirPort Extreme 802.11n base station. I’m posting this because the process was not entirely intuitive, at least not to me. I’ll a

  • Need help in Applying QOS to an ISP on ASR 1002

    Hi i want to ask  if someone gave me CIR with 900Mbps internet upload & download the question is being asked is. when the congestion occurs ( when my bw is full) where does the congestion occur ?? on my router ? or ISP router ? or the internet ? or o

  • How to: export 4:2:0 MPEG2 for Visual Circuits Firefly MC

    I am trying to make a series of videos for a multi-channel media player called FireFly MC by Visual Circuits. It plays on 3 monitors and I am trying to make a multi screen presentation to give the illusion that it spans all 3 at times and the goes ba

  • JNI call to find stability of file

    We receive files from third-party servers and these files are written to the disk in a windows machine. I am trying to find out how I can find out if the file is completely written to disk. I don't know the size of the file. Once the file is written