Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 946355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:54:04+00:00 2026-05-15T22:54:04+00:00

I am using geography.STDistance() to return the distance between two single point locations. I’m

  • 0

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 locations(i.e. they no longer exist) so I can’t just do a quick lookup.

declare @p1 geography

declare @p2 geography

SELECT @p1 = Location from tblLocations where Id = 1
SELECT @p2 = Location from tblLocations where Id = 2

select @p1.STDistance(@p2)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:54:04+00:00Added an answer on May 15, 2026 at 10:54 pm

    I think the return measurement depends upon the Spatial Reference Identifiers (SRIDs)
    of your geography data type. The default is 4326 which is in meters. There’ a table in the DB you can check Select * from sys.spatial_reference_systems

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I create a table using geodjango with a column location = models.PointField(geography=True). class Point(models.Model):
I'm working with a geographic point using lat/long and need to find other points
I'm developing an application in C# that will use and store geographic locations using
I am using SQL 2008 Geography datatype for a project that deals with mapping
Using SQL Server 2008: assuming I have a valid geography object geog1 , converting
I'm using Geoserver and SQL Server 2008. I have a table which has a
I have a column in my database of data type Geography which I want
I have two tables one called Point and other called Poly i have around
I would like to save a circle in a sql-server 2008 geography field, using
I'm using SQL Server and creating a script which will get the workers geographical

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.