# Longitude n Latitude

I Need to findout  whether my ship is in India waters or foreign waters based on Logitude n Latitude degree, minute and Location .
if ship is 200( something don't remember exactly ) natical miles away from the Border Then it is in foreighn waters else India waters.

From Ship i get the coodinates i.e Logitude n Latitude degree, minute and Location related to where the ship is.
If i 've India border coodinates i.e Logitude n Latitude degree, minute and Location then i can calculate and decide whether My ship is in India or foreign waters..

Here my concern is how to get the all coordinates  Logitude n Latitude degree, minute and Location of India  border?

###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:

I did a quick google search, and it doesn't seem the exact vectors of the borderline at sea is easily available (I might of course be mistaken).
Author Commented:

I will try to find out ...
Commented:
You might want to be more specific as to what you are trying to accomplish so that we can help you better. Example:
1. Are you try to write a progam that automatically detects if you are in international or national waters?
2. Do you already have a program (e.g. some GIS or another application with map functionality) that you want to use to determine the location.

In any case, GIS applications and GIS programming API's typcically have functions to do the two things you are asking:
1. Buffer function: This basically creates as buffer of constant distance around a region. For example, this can add a constant 200 miles around the india map giving you a new region.
2. Intersection/Within/Contains functions: These functions can be used to test if your desired location (latitdute/longitue, or even a line or a polygon) falls within your test region.

Regarding specific maps for India, there are many web sites from which you can download (free or paid) world maps. Just use google search.  The most popular format for is called SHAPE file (.SHP extension) defined by the company ESRI, and many applications (ESRI and non ESRI ) support this format. There are also many OPENSOURCE/Free applications and SDK's that read this file. But if you already have an application that only supports specific format, you will need to search for the supported format, or get a converter.

Commented:
True, true.

However, the accuracy of such is not always very accurate.

For many applications this is okay, but for other applications the accuracy must much more specific.

Only the thread starter knows how accurate it must be.

Shapefiles for the borders of the world located at: http://mappinghacks.com/data/world_borders.zip , btw.

I also believe Googles Geocoding APIs could be of use, but I dunno if those work at sea.

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:

I can understand ur view....
If ship is in India waters for 180 days then tax redemption is  there for that ship employees ...For this i required ..

i will check with my boss how accurate they want..

Anyway thanks for help ..I will check n let u know...
Author Commented:
Already i 've a  a program (e.g.  with map functionality)  for tracking the ship....

now i 've collected longitude n latitude  of all the India border..

Now How to add 200 nautical miles to longitude latitude ?

Commented:
Teki,

You cannot just add add distance to to longitude latitude points unless these points are connected consecutively to form a polygon. Once you have a polygon, you can add a buffer of 200miles to that polygon using a GIS function called "buffer". then you can test if the ship's coordinates fall in that buffer using the contains/within/intersects functions.

If you just have the points of india, and the point of your ship, then a simppler approach might be just look at the distances between each point in both sets, and see if it is less than 200 miles.

Author Commented:
Do u suggest any formula to findout the distance between these Latitude n Longitude points ?

shall i use normal math function for distance between 2 points ?