geography

Radius of multiple latitude/longitude points

I have a program that takes as input an array of lat/long points. I need to perform a check on that array to ensure that all of the points are within a certain radius. So, for example, the maximum radius I will allow is 100 miles. Given an array of lat/long (coming from a MySQL database, could be 10 points could be 10000) I need to fi...

Query points using SQL Server 2008 geography type

I have a table with the geography type and I want to run a query to find all rows within 25 miles of a specific lat/long. What would the query look like to accomplish this? ...

How can I transform latitude and longitude to x,y in Java?

Hello, I am working on a geographic project in Java. The input are coordinates : 24.4444 N etc Output: a PLAIN map (not round) showing the point of the coordinates. I don't know the algorithm to transform from coordinates to x,y on a JComponent, can somebody help me? The map looks like this: http://upload.wikimedia.org/wikipedia/c...

Geographical ontologies ready to use?

Hi all, I'm looking for an ontology containing geographical knowledge. In particular I'd like to have these types of information: political states / regions / cities / city areas geographical regions (e.g. continents, name of mountains, lakes, etc) For example, starting from the node "New York" I'd like to be able to find parents li...

Is it possible to use SqlGeography with Linq to Sql?

I've been having quite a few problems trying to use Microsoft.SqlServer.Types.SqlGeography. I know full well that support for this in Ling to Sql is not great. I've tried numerous ways, beginning with what would the expected way (Database type of geography, CLR type of SqlGeography). This produces the NotSupportedException, which is wide...

How to implement geo-based data store and computation?

Well, let me explain this briefly: 1.I want to build a website that provides location based services, like http://fireeagle.yahoo.net/ . 2.I guess most of these services have something do with longitude and latitude. 3.Is there any particular database/datastore/data structures fit well for such apps? I mean easy to store longitude, la...

SQL Server 2008 - Get Geography From Record

Hello, I am new to using the geography types in SQL Server 2008. I have a table in my database called "Location". "Location" has the following columns and types: Location -------- City nvarchar(256) State nvarchar(256) PostalCode nvarchar(25) Latitude decimal(9, 6) Longitude decimal(9, 6) Each Location is related to a Store record in...

geo name database (city, points of interest)

Hi,I am building a travel website with django. When a user is typing in the destination city name (or points of interest, like yellow stone), I want to do ajax auto suggestion. The question is how I could get the suggestion database? Is there any web service? Best if it could also support foreign cities. Thanks a lot. ...

How can I convert a shapefile from AGD66 to GDA94 from a script, using open source libraries

How can I convert a shapefile from AGD66 to GDA94 programmatically, using open source libraries? I don't want to use arcgisscripting because I don't have a licence. This needs to be automatable. A bash or python script would be acceptable. This is a little more complicated than a normal reprojection, because a different ellipsoid is ...

SQL Server 2008 Geography .STBuffer() distance measurement units

I'm working with a geographic point using lat/long and need to find other points in our database within a 5 mile radius of that point. However, I can't seem to find out what the "units" are for STBuffer, it doesn't seem to conform to feet, miles, meters, kilometers, etc. The documentation only refers to them as "units", any suggestions? ...

Google maps Street View with custom view

I'm curious whether it's possible to use Google Maps Street View as a platform along with custom views. To be more clear, I'd like to build a seating chart for a venue, where seats would have uniques views. As the user scrolls around or clicks on different seats, they'd be taken around the venue, just like in a Street View on Google Ma...

How to convert latitude and longitude to world coordinates à la Google Maps

I am designing an application in C++ to view and edit a map of a fictional planet. How it works will be similar to Google Maps. I would like the user to be able to see their current position in latitude/longitude and world coordinates on the GUI. How can I convert a latitude and longitude values to "world coordinates" and back, as in Go...

Moving a camera along a path in KML

Hi, I'm trying to generate KML(using JAK) that will contain first person perspective animation from my GPS data. So I have collection of points (long, lat) sorted by timestamps and I would like to iterate over it and crate series of <gx:FlyTo> nodes. Unfortunately camera doesn't move as I expected :(. My current algorithm: find beari...

Geographic grid search algorithm

Many of the location based services provide APIs for finding places/venues/spots around a given latitude longitude pair. I'm looking into how I can search for these places across an entire city. I can build a grid for a city by getting its bounds from the Google Maps Geocoder and then incrementing the lat/longs to lay down points to fo...

Does this mySQL "spatial" query work in SQL Server 2008 as well?

Before I embark on a a pretty decent overhaul of my web app to use a spatial query, I'd like to know if this MySQL query works in SQL Server 2008: SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin( radians( lat ) ) ) ) AS distance FR...

SQL Server 2008 GEOGRAPHY STDistance() value

Hi, I am using geography.STDistance() to return the distance between two single point locations. I'm curious as to which measurement is used for the return value? Is it in KM's, miles or perhaps some other? I'm getting results back upwards of 250k but i've no idea if im doing something wrong with my TSQL as these are historical location...

SQLite : finding a function's minimum values

Hi folks ! I have those tables Node (#id, route_id, lat, lng) Route(#id) And I have four input values : $lat1, $lng1, $lat2, $lng2, which represent 2 GPS coordinates GPS1 and GPS2. I also have a distance function that I added to the database : distance( lat1, lng1, lat2, lng2) What I am looking for is the request that will give me ...

Merge two gridded data layers

i have two difrent sets of xyz data of different resolution for eadh i have used GMT's pscontour i would like to merge these data frames(add them up an counter the, together) does any body know a good utility to do this ...

Unions of polygons (ST_UNION for Geography type)

Hi everyone, I am looking for a function that will return the intersection of 2 or more polygons (geography type). I am aware of ST_UNION, ST_COLLECT but it works only for geometry type. Any tip will be really appreciated ...

Can subsonic handle spatial data. If so how?

Hi, I've been using subsonic for quite a while now and I seem pretty confident about using it in my thesis. What I'm not sure about is how will it handle geometry data types. Anyone has an idea?? ...