Questions tagged [geography]

Geography is the science that deals with the study of the Earth and its lands, features, inhabitants, and phenomena.

The use of traditional spatial techniques used in cartography and topography and their application to computers is called geomatics, which encompasses a large area of fields involved with analysis, such as , Geographic information systems (), Remote sensing, and Global positioning systems ().

The above excerpt is quoted from Wikipedia.

There is a Stack Exchange site devoted to Geographic Information Systems.

498 questions
436
votes
31 answers

Calculate distance between 2 GPS coordinates

How do I calculate distance between two GPS coordinates (using latitude and longitude)?
nicudotro
  • 7,129
  • 6
  • 25
  • 17
277
votes
12 answers

Getting distance between two points based on latitude/longitude

I tried implementing the formula in Finding distances based on Latitude and Longitude. The applet does good for the two points I am testing: Yet my code is not working. from math import sin, cos, sqrt, atan2 R = 6373.0 lat1 = 52.2296756 lon1 =…
gwaramadze
  • 4,523
  • 5
  • 30
  • 42
40
votes
2 answers

SQL Server 2008 GEOGRAPHY STDistance() value

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…
Chris
  • 1,197
  • 4
  • 13
  • 25
37
votes
4 answers

Geographical boundaries of states/provinces -> Google Maps Polygon

I'm building a web application that is going to dynamically highlight certain U.S. states and Canadian provinces on a Google Map, based on buttons and click events. Plan A) Polygons My primary idea for this was to draw Polygons. For this I need…
motto
  • 1,305
  • 3
  • 16
  • 30
35
votes
1 answer

Positive/Negative Latitude and Longitude values vs. Cardinal Directions

As I've been taught, lat and long are of following types: Latitude North Longitude West Latitude South Longitude East During software development, if I receive two numeric values for lat and log, how can I translate those values into the cardinal…
Deepak
  • 1,055
  • 4
  • 13
  • 22
29
votes
5 answers

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.
Steve Kuo
  • 61,876
  • 75
  • 195
  • 257
26
votes
6 answers

Calculating area enclosed by arbitrary polygon on Earth's surface

Say I have an arbitrary set of latitude and longitude pairs representing points on some simple, closed curve. In Cartesian space I could easily calculate the area enclosed by such a curve using Green's Theorem. What is the analogous approach to…
Paul A. Hoadley
  • 1,518
  • 1
  • 13
  • 17
25
votes
12 answers

How to find distance from the latitude and longitude of two locations?

I have a set of latitudes and longitudes of locations. How to find distance from one location in the set to another? Is there a formula ?
ArK
  • 20,698
  • 67
  • 109
  • 136
22
votes
5 answers

NHibernate.Spatial and Sql 2008 Geography type - How to configure

I am trying to use Nhibernate with the Sql 2008 Geography type and am having difficulty. I am using Fluent Nhibernate to configure which I am fairly new to so that may be the problem as well. First, the class I am trying to persist looks something…
Luke Foust
  • 2,234
  • 5
  • 29
  • 36
20
votes
7 answers

world map without rivers with matplotlib / Basemap?

Would there be a way to plot the borders of the continents with Basemap (or without Basemap, if there is some other way), without those annoying rivers coming along? Especially that piece of Kongo River, not even reaching the ocean, is…
Sampo Smolander
  • 1,605
  • 2
  • 15
  • 33
19
votes
3 answers

Why don't all the provinces of Pakistan get colored green?

I want to include all the provinces of Pakistan using google geochart. But only 3 are picked up. My code is setting the names of provinces in the script and then the provinces should get picked up by the library. var data =…
Niklas Rosencrantz
  • 25,640
  • 75
  • 229
  • 424
17
votes
5 answers

How to find which points intersect with a polygon in geopandas?

I've been trying to use the "intersects" feature on a geodataframe, looking to see which points lie inside a polygon. However, only the first feature in the frame will return as true. What am I doing wrong? from geopandas.geoseries import * p1 =…
Thomas Pingel
  • 211
  • 1
  • 2
  • 6
16
votes
7 answers

Clustering Lat/Longs in a Database

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…
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647
16
votes
14 answers

Calculating Distance Between 2 Cities

How do you calculate the distance between 2 cities?
Krishna Kumar
  • 4,834
  • 13
  • 46
  • 46
16
votes
1 answer

How to read / write geography data using C#, Entity Framework and SQL Server 2008?

I have a form from which the user will be able to enter the latitude and longitude of a certain point on the map. The data will be input as string values. I did some research and found out from various sources that the Entity Framework doesn't…
Filip Filipovic
  • 354
  • 3
  • 7
  • 20
1
2 3
33 34