TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shri Sawarkar
NA
9
48.4k
finding the city by Easting/Nothing
Jan 19 2011 8:10 AM
Hi all...
I am having a question for finding the city by x/y i.e. Easting/Nothing coordinates.
I have a database table for city,easting,northing,zipcode columns.
I want to search the city within particular radius from given city. I got the solution for finding by longitude/latitude as
creating a function in database :-
ALTER FUNCTION [dbo].[GetCityByRadius](@Radius INT,@CityID INT)
RETURNS @RTN TABLE (SVALUE INT)
AS
BEGIN
INSERT INTO @RTN
SELECT t1.ID AS ID
FROM tbl_City t1
JOIN tbl_City t2 ON (3963.0*acos(sin(t1.Latitude/(180/PI())) * sin(t2.Latitude/(180/PI())) + cos(t1.Latitude/(180/PI())) * cos(t2.Latitude/(180/PI())) * cos(t2.Longitude/(180/PI())-t1.Longitude/(180/PI())))<@Radius)
WHERE t2.City= (SELECT City FROM tbl_City WHERE ID = @CityID)
RETURN
END
this is for longitude/latitude......the same I want for easting/northing.....Please suggest me for the solution.
Thanks in advance.
Reply
Answers (
0
)
Page refresh to update data
C# Simulated click doesn't work when clicking on Flash