Opened 8 years ago

Closed 8 years ago

#3588 closed defect (invalid)

Incorrect distance calculation

Reported by: przemekp Owned by: pramsey
Priority: medium Milestone: PostGIS 2.2.3
Component: postgis Version: 2.2.x
Keywords: Cc:

Description

SELECT ST_Distance(ST_GeographyFromText('SRID=4326;POINT(59.3327903748 18.0644893646)'),ST_GeographyFromText('SRID=4326;POINT(59.3362 18.0704)'))

747.17041

According to google or http://www.movable-type.co.uk/scripts/latlong.html it should be around 506 meters.

Change History (2)

comment:1 by pramsey, 8 years ago

If you put the coordinates in the correct order, that's exactly what you get

SELECT ST_Distance(
ST_GeographyFromText('SRID=4326;POINT(18.0644893646 59.3327903748)'),
ST_GeographyFromText('SRID=4326;POINT(18.0704 59.3362)')
)

  st_distance  
---------------
 507.395146393

comment:2 by pramsey, 8 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.