geography

Calculating Distance Between 2 Cities

How do you calculate the distance between 2 cities? ...

How can I find a user's location based on their IP address? (free and not free services)

If you need to locate a user based on their IP address, what services are available? p.s. I understand that some users use proxies etc, that mean the result is not 100% accurate. That's ok. ...

Java, convert lat/lon to UTM

Does anyone know of a way, in Java, to convert an earth surface position from lat, lon to UTM (say in WGS84)? I'm currently looking at Geotools but unfortunately the solution is not obvious. ...

using entity framework/nhibernate with sql2008 geography datatype

I am using sql express 2008 and vs2008, writing in c#. I have a db table with a Geography column in it, into which I need to put gps data I collected. When I tried creating an Entity-Framework mapping for this table, it just ignored the column with some warning about not being able to map such column types. I then looked at nHibernate.S...

Simple Geographic Data Sources for a Web App

For a web app I'm working on, I need to know the lat/lon of about 300 US cities. I also need to know the lat/lon for every US zip code. Does anyone know of a free source to get this information? ...

How can I convert Geometry data into a Geography data in MS SQL Server 2008?

How can I convert some Geometry data into Geography data in MS SQL Server 2008? ...

Best way to export/import MS Sql 2008 Geography data

(ANSWER) How to export some Geography data from a Microsoft Sql Server 2008. You'll need to use the command line argument BCP to dump the data in it's original (native) format to a binary file. Then on the other server you can bulk insert this binary data back into a table of the same strucutre. here's some code. Export Command Line:...

How can I show some shapefile / Well-Known-Text data on Google Maps / MS Virtual Earth?

Hi Folks, I have some shapefile (demographic/heat map data in the USA, such as crime in New York) data imported into a sql server 2008 database, field data type: Geography. How can i get this data, from a select query, in a format which i can then display on google maps or microsoft virtual earth? thanks! Edit 1: So far, the best sol...

Sql 2008 query problem - which LatLong's exists in a geography polygon?

Hi folks, i have the following two tables:- GeoShapes GeoShapeId INT IDENTITY Name VARCHAR(100) ShapeFile GEOGRAPHY [ this is a closed Polygon of Lat/Longs ] CrimeLocations CrimeLocationId INT IDENTITY LatLong GEOGRAPHY [ this is a Lat/Long Point ] Now, i have around 10K GeoShape results and around 500CrimeLocations. I'm t...

Using Variables in SQL 2008 to return more than one record

I'm pretty sure this is not the right way to do this so I'm looking for some suggestions. I don't think my problem so much is that I'm trying to solve a spatial problem. I'm just not sure of a good way to take the latitude and longitude and return a geography data type in a select statement. I have successfully created a geography col...

Getting all zip codes within an n mile radius

What's the best way to get a function like the following to work: def getNearest(zipCode, miles): That is, given a zipcode (07024) and a radius, return all zipcodes which are within that radius? ...

Clustering Lat/Longs in a Database

Hi folks, I'm trying to see if anyone knows how to cluster some Lat/Long results, using a database, to reduce the number of results sent over the wire to the application. There are a number of resources about how to cluster, either on the client side OR in the server (application) side .. but not in the database side :( This is a simi...

calculate distance between 2 gps coordinates

How do I calculate distance between two gps coordinates (lang,long) ...

NHibernate.Spatial and Sql 2008 Geography type

hi there, i'm currently working on a project where i have to deal with sql server 2008 geography types. As big parts of the projects uses NHibernate as ORM i wonder how much work it will be to use/extend NHibernate.Spatial with this type (as far as i can see Nh Spatial only supports the geometry type yet). Btw. are there any other .net ...

Geospatial coordinates and distance in kilometers... (updated again)

This is a followup to this question. I seem to be stuck on this. Basically, I need to be able to convert back and forth to referring to coordinates either in the standard degree system OR by measuring a distance north from the south pole along the international date line, and then a distance east starting from that point on the date li...

How to show Google Maps tile overlays of Google Earth's Old-world maps (or a blank / physical world map)?

I am trying to build a Google Maps-driven web application that can display a map of the whole world in one or all of the following configurations: A continent-outline map, only differentiating between land and water (like this, but without the country borders/names, and without showing any additional detail as you zoom in) A physical g...

How can I extract x, y and z coordinates from geographical data by Python?

I have geographical data which has 14 variables. The data is in the following format: QUADNAME: rockport_colony_SD RESOLUTION: 10 ULLAT: 43.625 ULLON: -97.87527466 LRLAT: 43.5 LRLON: -97.75027466 HDATUM: 27 ZMIN: 361.58401489 ZMAX: 413.38400269 ZMEAN: 396.1293335 ZSIGMA: 12.36359215 PME...

MS SQL Server 2008 Spatial Indexing - Does it work?

Has anyone tried using it and can say if it's well implemented? -- Assaf (who spent the last few weeks getting increasingly frustrated with MySQL's deficient implementation of OpenGIS functions and is now considering switching to MSSQL) ...

How can I do efficient range searching + counting with latitude/longitude data?

I'm working with a large set of points represented by latitude/longitude pairs (the points are not necessarily unique, there could be several points in the set that are at the same location). The points are stored in a database. What I need to do is figure out a way to efficiently perform a search to get the number of points that lie wi...

Selecting geographical points within area

I have a SQL Server 2008 table with a column of the geography datatype. The value is a point (latitude and longitude). How do I query the table to return all rows where the location is within a 10 kilometer radius of a given coordinate? ...