geospatial

Is it possible to find the distance between two routers?

I was thinking about making a fun project that would tell me where I am throughout my house. My idea was to put two routers in different spots of the house at the same height and then send ping requests or something and check the latency, from that it should be able to triangulate where I am in the house. I know this would only really ...

Determining whether geographic point is within X meters of a state border (using shapefile for border data)

So I'm writing a Java app, and I've got an ESRI Shapefile which contains the borders of all the U.S. states. What I need is to be able to determine whether any given lat/lon point is within a specified distance from ANY state border line - i.e., I will not be specifying a particular border line, just need to see whether the point is clo...

Geographical data encoding (standard codes for countries/regions/cities)

Hi, is there a standard way to encode the user location (country, state/region, town), so that I can ask the user to select these items upon registration and then use this data to show his location on the map? ...

How do you select Arcs inside a boundary in PostGIS?

I'm searching an answer for this question and all I found on http://postgis.refractions.net/documentation/manual-1.3/ch04.html#id2572194 is SELECT road_id, road_name FROM roads WHERE roads_geom && GeomFromText('POLYGON((...))',-1); should I put the boundary vertexes in this SQL replacing the '...' ? ...

Clustering Coordinates on Server Side

What is the most efficient way of clustering coordinates on the server side? Examples? Here is an example of exactly what I need (although I can't use third party vendors) http://www.crunchpanorama.com/ PostgreSQL, Python platform, Google Maps. ...

MySQL - Geo-Spatial Object.

I've been working in Postgis for point in poly's and i have this function: select * from table_name where st_contains(column, st_setsrid(st_makepoint(-92.095109, 46.804100),4326)); the column is a multipoly(((points))) I'm trying to find a way to do a similar exercise with MySQL, and wondered if there were similar functions to do so. ...

How to find a point in the Earth surface given an origin point, distance and direction (azimuth)

The previous question "Geoalgorithm for finding coordinates of point from a known location by distance and bearing" asks the same thing, but the solution found is a rough approximation. I want a more accurate solution. I am comparing the results with the Great Circle Distance formulas, which is one of the best Geographical Distance formu...

A reverse of Haversine formula for MySQL?

In my DB i store a center point, along with a radius (in meters). I'm looking to pass in a lat/lng, and then have the mysql values i've stored create a circle to tell me if my point i passed in is within that circle. Is there something that would allow me to do this, similar to the haversine forumla (which would assume that my point w...

What are some recommended frameworks for manipulating spatial data in C++?

What are some recommended frameworks for manipulating spatial data in C++? I'm looking for a polygon object, point object, and some operations like union, intersection, distance, and area. I need to enter coordinates in WGS84 (lon,lat) and get area in square km. I would prefer a free/open source framework, but am open to suggestion...

How do I calculate the Azimuth (angle to north) between two WGS84 coordinates in a single T-SQL query?

I found the solution for this question in C#, but I can't translate it to a single query T-SQL, since my C# implementation requires branching (if then else). I also found the following C# solution, which could be translated to a single query T-SQL but it doesn't produce the correct results public static double GetAzimuth(WGSCoord c1, W...

How to look up elevation data by lat/lng

I am planning an app that will need the ability to look up the elevation of geographic points by lat/lng. Ideally I would like something that would work worldwide, but US-only would also suffice. I have looked at using the USGS Elevation Query Web Service, however it only allows you to query for one point at a time, and I will need to lo...

Is there an API for openstreetmap?

I wonder if there is any API I could query OSM data through, for example; Are (lon_1, lat_1) at land or at sea? Or could it be possible to get an island as a well-defined polygon? The only usage I've seen so far has just been tools for rendering OSM data (generating tiles). Update: I've found a great API for reading Openstreetmap data;...

International Zip Code Search

I implemented a U.S. "find near zip code" search for somebody. The coordinates of U.S. zip codes come from a commercial zip code database. Now, they would like a similar ability for countries other than the U.S. Has anybody implemented something like this for non-U.S. searches? How about general "find close to this address" searche...

Taking altitude into account when calculating geodesic distance

hi there, i´m currently dealing with gps data combined with precise altitude measurement. I want to calculate the distance between two consecuting points. There is a lot of information out there about calculating distance between two points using the WGS84 ellipsoid and so on. however, i did not find any information that takes Altitud...

Hilbert tree: Does anyone know where to find a code implementation of this?

I'm looking for the code or even a visual demo on how this tree works. I have read this paper on Hilbert R-Trees and tried to implement the algorithms stated I get lost when I have to adjust the tree with the sets, as well as not sure on most other things. It doesn't matter what language if there is an implementation as it will be used...

MySql Geospatial bug..?

This question is for Mysql geospatial-extension experts. The following query doesn't the result that I'm expecting: create database test_db; use test_db; create table test_table (g polygon not null); insert into test_table (g) values (geomfromtext('Polygon((0 5,5 10,7 8,2 3,0 5))')); insert into test_table (g) values (geomfromtext('...

How can I find if a lat long coordinate is valid in a coordinate system?

If I have a point in latitude/longitude and I want to find out if it is a valid for use within a particular coordinate system, how can I do it? As an example. Say I am working in Swiss Grid (CH 1903, EPSG 21781) and have a point representing something in London in the UK, I want to know if that point is valid in the Swiss Grid coordinat...

Point in polygon algorithm that handles polygons that straddle the antemeridian

I have a database of polygon points as latitude, longitude pairs and I need to test if a given lat,lng point is inside any of the polygons. There are several algorithms around including these but they don't work if the polygon straddles the antemeridian (off the coast of New Zealand, where longitude flips from +180 degrees East to -180 ...

Struct for depth-curves in sea-maps

I'm trying to make a struct in F# for representing depth curves in a sea map. It has to contain a list of coordinates and a float telling what depth is represented (eg. "4.5 meters"). I have made it this way: type Coord = struct val X : float val Y : float new(x,y) = { X = x ; Y = y } end type DepthCurve...

how owa works step by step

raster1 {{0,1},{1,1}} raster2 {{1,1},{0,0}} hi can you explain me how the Ordered Weighted Average method works given the above two rasters step-by-step? thanks ...