geospatial

SQL Server 2008 spatial index and CPU utilization with MapGuide Open Source 2.1

I have a SQL Server table with hundreds of thousands of geometry type parcels. I have made indexes on them trying different combinations of density and objects per cell settings. So far I'm settiling for LOW, LOW, MEDIUM, MEDIUM and 16 objects per cell and I made a SP that sets the bounding box according to the extents of the entities in...

How can I divide the globe in to small grids such that it allows me to assign each lat/long location to a grid?

In order to calculate the nearest locations that are represented by latitude/longitude, I was considering dividing the map into small grids, approximately 100x100 meter grids. Essentially each point would be assigned to a grid. I understand that I could instead also use spatial indexes with MySQL etc, but am planning to use a non-relati...

How do I draw a mysql polygon circle, and not a square?

The function below creates a polygon square out of 4 points and I assume the last 5th point closed the squar, I need it to have at least 24 points and to make up a circle. Any ideas? function getRadius($point="POINT(-29.8368 30.9096)", $radius=2) { $km = 0.009; $center = "GeomFromText('$point')"; $radius = $radius*$km; ...

SQL 2008 geography & geometry - which to use?

I'm creating a Google map mashup and am using SQL 2008. I will have a large number of points on the earth and will want to perform various calculations on them in SQL - such as selecting all points contained within a particular polygone, or select all points within 10km of XY. I have never used and SQL spatial features before. Should I...

Is there a free .NET library to convert OSGB36 to WGS84

I need a .NET tool, preferably a library, that I can use in SSIS to convert Northing/Easting information from Collins Bartholomew (bartholomewmaps.com) into WGS84 with a ssrid of 4326 - to be used in SQL Server (Geography). Edit: In response to an answer given, the script looks interesting; do you think it would be easy to create a c# c...

Maximum length of a decimal latitude/longitude Degree?

What is the maximum length (in kilometers or miles - but please specify) that one degree of latitude and longitude can have in the Earth surface? I'm not sure if I'm being clear enough, let me rephrase that. The Earth is not a perfect circle, as we all know, and a change of 1.0 in the latitude / longitude on the equator (or in Ecuador) ...

iPhone spatial search

I want to write an iPhone app, that will need to do a distance based search (eg. find results within 100km) I'm not concerned about what storage technology is used, as long as it is stored on the device ...

Compressing GPS Points

I have a device that records GPS data. A reading is taken every 2-10 seconds. For an activity taking 2 hours there are a lot of GPS points. Does anyone know of an algorithm for compressing the dataset by removing redundant data points. i.e. If a series of data points are all in a straight line then only the start and end point are requi...

Reverse Location.distanceBetween()

I have a location with latitude and longitude and want to get a new location that has a distance of x meters from that location at an angle of d degrees. This would be the reverse of Location.distanceBetween(). Is there any Android API to do that. I know that I could program such a function myself, but I wonder if there is an API for it ...

Creating closed spatial polygons

I need to create a (large) set of spatial polygons for test purposes. Is there an algorithm that will create a randomly shaped polygon staying within a bounding envelope? I'm using OGC Simple stuff so a routine to create the well known text is the most useful, Language of choice is C# but it's not that important. ...

reading and plotting an esri shape file in R

I'm having difficulties reading in a .shp (esri shape file) into R. I have tried several options in R, and tried to convert the shape file in ArcMap to something that correctly reads in the shape file but nothing worked yet. (In ArcMap I corrected the geometry, converted from single to multipolygon, etc which was probably not necessary o...

Calculating Great-Circle Distance with SQLite

Here is my problem, I have a SQLite table with locations and latitudes / longitudes. Basically I need to: SELECT location, HAVERSINE(lat, lon) AS distance FROM location ORDER BY distance ASC; HAVERSINE() is a PHP function that should return the Great-Circle Distance (in miles or km) given a pair of latitude and longitude values. One o...

Formulas to Calculate Geo Proximity

I need to implement a Geo proximity search in my application but I'm very confused regarding the correct formula to use. After some searches in the Web and in StackOverflow I found that the solutions are: Use the Haversine Formula Use the Great-Circle Distance Formula Use a Spatial Search Engine in the Database Option #3 is really no...

Determining if a spherical triangle is obtuse

Given two points, A and B, defined by longitude and latitude I want to determine if another point C is ~between~ A and B. ~between~ is hard for me to define. I don't mean on the line - it almost certainly won't be. In this diagram, point C is ~between~ A and B because it is between the normals of points A and B and the line between th...

.Net library to handle spatial data from SQL Server

I want to create application which would display spatial data on Map. I'm thinking about using SQL Server spatial features but not sure how should I handle that data in C#. Is there a good library I could use for that? ...

How, WCF Ria Services can make a customised entity, known at client-side?

I constructed my Entity Model. One of my business objects,let's call it Store has a spatial data type. Very quickly I figured out that spatial fields aren't mapped via EF4. However I struggled my way out, by editing the xml declarations defining a query like the following: <EntitySet Name="Stores" EntityType="Eltrun.OnShelfAuditModel....

SQL2008 geography query to JPG

I'd like to take the results of a SQL geographic query, and create a JPG - something similar to what you see in the 'spatial view' tab. I'm doing this for 200+ query, so something I can automate could be nice. Does an app already exist to do this, or do I need to write it myself? ...

Generating density/heat maps like SpatialKey

SpatialKey generates some really nice looking heatmaps, and we're looking into what's involved in doing this for an internal project to visualize large amounts of points. I'm looking for feedback on some ideas on where to get started (and it's just a really interesting problem). We know that they're using Flash, and from what we can t...

GeoDjango, difference between dwithin and distance_lt?

Using geoDjango, what is the difference between myObj.objects.filter(point__dwithin(...etc.)) and myObj.objects.filter(point__distance_lt(...etc.)) ? Are they the same thing, or are they doing subtly different things? ...

GeoModel with Google App Engine - queries

I'm trying to use GeoModel python module to quickly access geospatial data for my Google App Engine app. I just have a few general questions for issues I'm running into. There's two main methods, proximity_fetch and bounding_box_fetch, that you can use to return queries. They actually return a result set, not a filtered query, which mea...