|
It's simple math, but you have to know some basic information about the map. Assuming it's in a straight up is North orientation, you have to know the Lat and Long of each corner of the map. This gives also gives you the scale of the map. Once you have that, it's simple math (Scaled X = Original X * ScaleFactor).
|
|
|
|
|
But the latitude and longitude are not a stright line in my map it is circular. so if i use this formulae i am not getting the correct latitude and longitude
|
|
|
|
|
Thank you very much for your reply. On my map the latitude and logitude lines are not straight. For example the top most x coordinates are not the same and extreme left y cordinates are not the same
|
|
|
|
|
Then you've got two choices. Either get a version of the map that is projected with straight lines, or change the math to map the mouse coordinates to a curved map. Straight or curved, it still comes down to math.
|
|
|
|
|
Could you please give me the formula for finding the latitude and longitude of a stright line map and curved map. I am not familier with math function.
Could you please explain how can we find the latitude and longitude from x,y coordinates
When I move the mouse it might populate the latitude and longitude of the mouse point in a label.
|
|
|
|
|
Could you please give me the formula for finding latitude and longitude from x,y cordinates
|
|
|
|
|
Hello All,
I am trying to write a screen saver program that shuts off and display what ever the security camera sees as soon as someone or something gets close to the camera. Normally a screen saver program is temporarily deactivated when a mouse is clicked. I am wondering if I could use the camera to sense how close something is from it, then based on that info the screen saver program can decide what to do next. Is something like that possible? Thank you in advance for your response.
|
|
|
|
|
With a single camera, you can only determine range to a target if you know the dimensions of the target. Either that, or you'll need some kind of sensor, perhaps laser or ultrasonic, to determine the range. Another option is to use the same mechanism you use to determine range - stereo vision. You have to compare the differences between two images, just like your own eyes, to calcuate the range. This is, by far, the hardest method to use.
modified on Thursday, November 20, 2008 9:18 AM
|
|
|
|
|
LOL. You are truly a sick, sick, sick person Dave.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Why? He pretty much laid it out to the OP.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Dave's knowledge is pretty impressive..........def not questioning it.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Perhaps another approach could be that if the camera isn't moving, you can say if the picture is static (of course this depends on the quality of the camera feed). Then, if the picture changes, you could calculate the dimensions for the region that's changed. If the dimensions are above some threshold (5% or whatever is applicable), then leave the screen saver.
The calculation itself could be done by splitting the picture into smaller portions (like a matrix above the picture).
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
I am writing a program in .Net where the code gets a XML document from a URL( like the code below)and reads the XML document.But I dont know how to make the program keep on polling so that I can get the XML document continuosly or at some intervals . Any links or suggestions?
Code:-
Dim reader As XmlTextReader = New XmlTextReader("http://192.168.10.12/cgi-bin/dataProxy?oper=queryTags&map=1")
While reader.Read()
{
....
}
|
|
|
|
|
You'll have to use a Timer control to poll for the data. You'll find one in the ToolBox. You can Google for "System.Windows.Forms.Timer" for more information.
|
|
|
|
|
Like Dave said you can use a timer that fires repeatedly at the interval you specify. Another option would be to create a file watcher service (go a google search on it). Lots of examples of how to implement one.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi all!
I'm populating a DataGridView with generic lists of my interfaces and I got this issue:
I have two interfaces and to concrete implementations of them:
Public Interface IMyBaseClass
Property Name() As String
End Interface
Public MustInherit Class MyBaseClass
Implements IMyBaseClass
Private _name As String
Public Property Name() As String Implements IMyBaseClass.Name
Get
Return _name
End Get
Set(ByVal value As String)
_name = value
End Set
End Property
End Class
Public Interface IMyConcreteClass
Inherits IMyBaseClass
Property Description() As String
End Interface
Public Class MyConcreteClass
Inherits MyBaseClass
Implements IMyConcreteClass
Private _description As String
Public Property Description() As String Implements IMyConcreteClass.Description
Get
Return _description
End Get
Set(ByVal value As String)
_description = value
End Set
End Property
End Class
If I bind my grid with a generic list of IMyConcreteClass, the grid just loads the concrete interface propertys (Description) but doesn't loads the base interface propertys (Name).
Here is an example of what i'm doing:
Public Sub LoadTheGride()
'load some data ont mylist
Dim classOne As New MyConcreteClass
Dim classTwo As New MyConcreteClass
classOne.Name = "class one"
classOne.Description = "the class one"
classTwo.Name = "class two"
classTwo.Description = "the class two"
Dim myList As List(Of IMyConcreteClass) = New List(Of IMyConcreteClass)
myList.Add(classOne)
myList.Add(classTwo)
'add respective columns
Dim someGrid As New DataGridView 'actually the grid is in my form but this is just an example
Dim column1 As New DataGridViewTextBoxColumn()
Dim column2 As New DataGridViewTextBoxColumn()
column1.DataPropertyName = "Name"
column1.Name = "The name"
column2.DataPropertyName = "Description"
column2.Name = "The description"
someGrid.Columns.Add(column1)
someGrid.Columns.Add(column2)
'bind
Dim bs As New BindingSource()
someGrid.AutoGenerateColumns = False
someGrid.DataSource = bs
bs.DataSource = myList
End Sub
At the end i just got this on the screen:
http://img140.imageshack.us/img140/6060/clipboard01au4.png (screencap)
Some one knows what I'm doing wrong?
modified on Thursday, November 20, 2008 8:30 PM
|
|
|
|
|
Tried to look at the screen cap, but the link didn't work for me.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
fixed :P
http://img140.imageshack.us/img140/6060/clipboard01au4.png
|
|
|
|
|
Not sure what exactly is going on. What appears to be happening is when adding the desc and name to the mylist, the intelli-sense correctly picks up the properties.
When putting a breakpoint on the last line (binding the bs.dataSource = mylist) and viewing the mylist items, the name property is nested. Guessing that databinding isn't picking up the nested property under AppName_Interfaces.MyConcreteClass
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
I'm having performance problems with the VS 2005 GUI (using VB). I am converting a .dll which has a very short module and a class file. The class file has 8125 lines. Initially, the AutoRecover functionality was def. creating havoc, so I disabled that and restarted the solution.
Now when editing the source code, periodically the GUI will lock up for about 15-20 seconds. If I do a save, the save delay occurs. Very annoying and def. slows progress down.
Has any one run into this? Is it just do to the # of lines in this particular file?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
No, there's no limit on the nuimber of lines in a file.
This sounds like your machine is having other problems, such a mapped drives not being accessible.
|
|
|
|
|
My VB solutions isn't stored nor referencing anything on a mapped drive. Running VS 2005 SP 1.
Positive I don't have anything dumb like spyware, etc going on as well. System resources show I have 1.2 gig of free memory. I can open another .Net solution at the same time, and the second solution responds in a timely manner. Not running any add-ins. Rebooted. All other apps run as expected.
Did some Google searches. Found people with similar complaints. If there is a very large number of checkpoints, that could slow performance (I don't have any). Found this MS article and doesn't apply (using VB and already have SP1 installed). Installed hotfix anyways, no diff.
Totally baffled at what the heck is going on. Guess I'll try splitting the source out into multiple class files to see if that helps.
<curses at="" the="" vs="" gods.="">
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
kissdznuts wrote: My VB solutions isn't stored nor referencing anything on a mapped drive.
Yeah, but I didn't say anything about the project doing so. I asked if youre MACHINE was. A mapped drive that suddenly isn't available anymore can make your machine hang for a bit, with no apparent cause.
Does the problem occur at all if your doing other things outside of Visual Studio?
|
|
|
|
|
Sorry Dave, I misconstrued what you were saying in your previous post. Mapped drive is working correctly, or at least appears to be. I can access files without delay.
I restarted again after installing the hotfix listed above and everything appears to be working much faster with this particular solution. The hotfix was supposed to be in SP 1, so I'm not sure why Visual studio is working so much faster now with this solution.
The speed isn't blistering, but it's much more tolerable now.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hmm... I only asked, because the very same thing happened to me yesterday. I found out that the network guys were screwing with a couple of switches between me and the 10 servers I normally attach to.
|
|
|
|