- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsHi
I'm developing a system that takes a users address and gets the GPS coordinates.
When I have the GPS coordinates I want to register this user to a 3km*3km pre-described block.
I need to build this grid.
Each block on this grid would have a GPS coordinate on every corner.
These blocks would be recorded on a database as follow.
BlockID - KDP001
NorthLat - x
NorthLong - y
EastLat - x
EastLong - y
SouthLat - x
SouthLong - y
WestLat - x
WestLong - y
I will then take the coordinates that I get from the users address and just do > < calculations to determine the block ID a user falls under.
My question is - how can I get all the coordinates of the blocks ??
I can calculte the distance between 2 GPS points.
So a possible solution would be that if I enter a point then I should calculate the GPS point 3km horizontaly away from that point and also vertically.
But this is where I'm getting stuck!
Any help please?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: CHRISCOMBPosted on 2009-10-20 at 02:28:42ID: 25612232
Guess the experts are very busy!
For anyone wanting this answer - I figured it out.
This is done in java!
This code will draw a grid block on a map. the blocks are 3km * 3km.
the folloing variables set the size of the grid blocks
double d1 = - 0.027099; // Vertical size = 0.009033 per KM
double d2 = 0.030000; //Horizontal size = 0.010000 per KM
Combine coordinates North & West to get top left corner of the block.
Combine North & east to get right top corner of block
Combine South & WEst to get bottom left coordinates of block
Combine South & East coordinates to get bottom right corner of a block.
the first 'for statent gives the mount of blocks on a horizontal line.
for(int b = 1; b<10 ; b++)
The second gives the amount of vertical blocks
for(int i = 1; i<=10 ; i++)
Sorry, the code isn't very clean , but this would give you the basics.
Hope this helps someone!
Select allOpen in new window