geospatial

Creating an abitrary, curved Well Known Text LineString for display in OpenLayers

I am dynamically generating a WKT LineString between points in a map layer being generated for display in OpenLayers. I'd like to make the lines between the points curved, and I'd like to be able to dynamically change the curvature based on various input variables. This is for a network monitoring app, and we'd like the curvature to ...

Maxmind - Latitude & Longitude from Zip Code

Hello, I'm using Maxmind's free DAT file to calculate latitude and longitudes from IP addresses - that much works fine and was very straightforward to implement. However, I've run into an issue where I would like the user to enter their zipcode and automatically calculate the latitude and longitude for that zipcode. Does anyone have an...

Why are my spatial searches slower in SQL Server than PostGIS?

I'm working on moving some spatial searching capabilities from Postgres with PostGIS to SQL Server and I'm seeing some pretty terrible performance, even with indexes. My data is around a million points, and I want to find out which of those points are within given shapes, so the query looks something like this: DECLARE @Shape GEOMETRY ...

Algorithm for measuring the Euclidean distance between pixels in an image

I have a number of images where I know the focal length, pixel count, dimensions and position (from GPS). They are all in a high oblique manner, taken on the ground with commercially available cameras. What would be the best method for calculating the euclidean distances between certain pixels within an image? If it is indeed possible...

MongoDB geo distance/radius to useful units

I'm using MongoDB geospatial queries -- $near, geoNear, etc. -- and I'd like to know how to turn the 'dis' result of the 'geoNear' command as well as the 'radius' argument for $within queries to/from readable units like miles or kilometers. ...

Given a latitude / longitude to a certain number of decimal places, how to tell the area covered (in metres)?

If i have a position specified in latitude and longitude, then it can cover a box, depending on how many digits of accuracy are in the position. For example, given a position of 55.0° N, 3.0° W (i.e. to 1 decimal place), and assuming a truncation (as opposed to rounding), this could cover anything that's 55.01° to 55.09°. This would co...

calculate centre of batch of locations

Hi, I have some code that batches addresses with 5 miles of each other. This is done by looping through a list of address and calculating the line of site distance between the first address and the remaining addresses. The first address in the list, along with any matching address are then put into another list. Once I have the addre...

How do I supply a British National Grid reference as WKT to GeoDjango?

I'm trying to insert some National Grid references into a Django PointField defined as follows: oscode = models.PointField(srid=27700, null=True, blank=True) However, I don't know how to format them correctly in WKT. This is what I get if I try simply using a basic National Grid reference, TR3241: INSERT INTO places (placeid, struct...

How to convert an ESRI Shape-file into SQL Server 2008?

I have a shapefile that I would like to upload to a spatial SQL Server 2008. I have tried using this tool: SQL Server 2008 Spatial Tools. But without luck. Does anyone know any other (free) tools for doing this? ...

SSRS Report Parameter Custom DataTypes

Hi, Our ASP.Net application connects to the a SSRS 2008 web service. The categories and reports are listed in a tree view in our application populated from a call to retrieve the list of reports from the web service. When a user selects a report the parameters of the report are retrieved and we render the appropriate control for the p...

Sort/Order Locations

Hi, I have a map with locations as shown in the image below. These locations are held in a C# Dictionary object with both Latitude/Longitude and Cartesian (x, y, z) coordinates. The area is covered by 5 teams, the first of which is in the south west of the area. What I need is to be able to order the points so that the most south w...

Open alternatives to Google-maps?

I'm looking for an alternative to Google-maps with all the richness of their API but more open. Does such a thing exist? ...

Determine whether two sectors of a given circle intersect?

Anybody know how to determine whether two sectors of the same circle intersect? Let's say I have a sector A, expressed by starting and ending angles A1 and A2, and a sector B, expressed by starting angle B1 and ending angle B2. All angles ranges from 0..2*PI radians (or 0..360 degrees). How to determine whether angle A intersects wit...

PHP MySql and geolocation

I am writing a site that basically looks for places within a 25 mile radius of a lat and long using php and mysql. I am wondering how something like this would work? I would pass a lat and long to the scrip and have it pull out only locations that are within 25 miles of the lat and long from my Database of locations. What is the best ...

Get ECEF XYZ given starting coordinates, range, azimuth, and elevation

I'm having a problem locating anything on converting RAE to XYZ. If I am on a WGS84 spheroid, at say position -742507, -5462738, 3196706 and I detect an object at a range of 30km, azimuth of 310, and elevation angle of 18 degrees how can I convert that to ECEF XYZ coordinates? Thanks. ...

PostGIS 1.3.5: where to download it from ?

I was looking for a two years old version of PostGIS because I need to import data from an existing remote database and it won't let me make an exact mirror of the database, I need to install PostGIS locally before transferring data and being able to upgrade locally. The problem is that version is no longuer available and I can't seem t...

Compute/plot statistics on a 2d grid

Suppose I have an R data frame with columns that specify location (lat/long), height, and gender of individuals: x <- data.frame( lat=c(39.5,39.51,38,38.1,38.2), long=c(86,86,87,87,87), gender=c("M","F","F","M","F"), height=c(72,60,61,70,80) ) I want to bin the data in two dimensions (e.g. into 1000m x 1000m squares) and compu...

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 can I write a GEOTIFF in Java?

I want to write a GEOTIFF, with all the geographic metadata in Java. Which library etc. works best for this purpose? ...

Is there a silverlight replacement for SqlGeography?

I'm looking for a replacement for Microsoft.SqlServer.Types.SqlGeography that will work in Silverlight. I'm primarily interested in arbitrary collection of data (point, path, or polygon) and the STBuffer, STUnion and STIntersect functionality. I need to retrieve some geography data from my database via WCF on the middle tier and return ...