latitude-longitude

Postcode distance calculation

Hey, I have just been developing a postcode distance calculator for my Dads company, where all our customers are kept on file and every time a new potential customer makes an enquiry the system will check against all other customers' postcodes. The problem is that it doesn't yet do the distance calculation. Typing in a DT1 postcode with...

RESTful URL structure for displaying local data

I am developing a web app which displays sales from local stores around the United States. The sales and stores listed vary by location. Is there a RESTful URL scheme for describing this information while avoiding duplicate content? Specifically, the app needs to list local stores, and list items sold at a particular store. Zip (postal)...

Determine center of bins when using meshm

I am using meshm to plot densities. How do I calculate the center point for each of the bins? I want to associate the data in m with the centerpoints I have looked at the source code of meshm and believe the solution will be a modified version of meshm that returns the latitude and longitudes of each bin's center point. meshm calls th...

Calculating distance between two points, using latitude longitude, what am I doing wrong?

I'm trying to solve this assignment and it's taking too much time: Here's my try, it's just a snippet of my code: final double RADIUS = 6371.01; double temp = Math.cos(Math.toRadians(latA)) * Math.cos(Math.toRadians(latB)) * Math.cos(Math.toRadians((latB) - (latA))) + Math.sin(Math.toRadians(latA)) ...

How to determine which images of the earth's surface overlap with an arbitrary given image?

Suppose you are given an image of the earth's surface and that it is stored in the database as a polygon defined by the latitude/longitude pairs of its corners. Now suppose there are millions of images covering the earth's surface that are also stored similarly. What is a good strategy to find those images which intersect with your give...

How do I plot latitude/longitude coordinates on the screen?

I am trying to figure out how to plot WGS84 latitude/longitude points on a bitmap but cannot figure out the math required to turn lat/lon points into coordinates that would be plottable. Could anyone give me some pointers or examples on how to do this? thanks Colin ...

lat long intersection

I have two sets of "lines" drawn using a mapping API in the form of (lat,long) pairs. Given 2 of these lines, how can I compute the (lat, long) of their intersection (assuming they intersect)? ...

Using Matlab Google-Earth Toolbox to plot Latitude and Longitude

I am trying to plot some waypoints using the Google-Earth toolbox. The documentation for it is pretty poor, so I figured this would be a good Stack Overflow question. I have a matrix, wypts that has pairs of latitude and longitude coordinates in decimal format (If anyone is wondering this over the State College Airport (SCE) in Pennsylv...

GeoTools - How to do Dead Reckoning and course calculations using GeoTools classes

I'm currently using the GeoTools toolkit to do calculations on marine vessel data, such as calculating the Great Circle distance between two lon/lat points. I have two other requirements that I need to satisfy, but I'm not sure where to look in GeoTools to find classes to do these kind of calculations. REQUIREMENT #1: Calculate a Dead R...

Way to improve performance in MySQL on POINT(lat, long)

I have an application that needs to query a table with latitude and longitude coordinates, which are stored using MYSQL's POINT datatype. I have a stored function that finds nearby lats and longs within a given radius of a given GPS location. However, my table will contain hundreds of thousands of entries, so performance needs to be opt...

What's the fastest C++ class or C library to convert latitude and longitude from decimal degrees to string and back

I'm looking for the best C or C++ code to encode and decode decimal latitude and longitude values from/to double/char. I'd prefer the code convert from double to char[] and vice-versa rather than c++ strings. If you have a code snippet that would be great too. To clarify: I need to convert from a string Degrees/Minutes/Seconds to doub...

How can I calculate the latitude and longitude of each pixel of an image in a kml file using Python?

I am using .kml file which points to an overlay image (presumably in UTM projection?). The KML file provides the latitudes and longitudes of the bounding box using the "LatLonBox" tag. I need to calculate the latitudes and longitudes of each pixel in this image. Are there any pre-existing libraries in Python that would do this for m...

Google Maps user location

I wanna set up a way in which users can place a marker on the map to tell their address and i should be able to extract the lat and long and store it in the database. Is there somekinda plugin which i can modify and use ? ...