Opened 14 years ago

Closed 14 years ago

#176 closed defect (fixed)

We should always use WGS84 lat/long variables in the templates.

Reported by: Kake Owned by: Kake
Priority: normal Milestone:
Component: openguides Version: svn
Severity: normal Keywords:


Suppose a guide accepts geodata as OSGB x/y. When the page is saved, we use Geography::NationalGrid::GB to convert these to lat/long, and store those in the database as well. Unfortunately these are actually OSGB lat/long, whereas most people/applications will expect WGS84 lat/long. We hacked around this for Google Maps display by using Geo::HelmertTransform to transform into WGS84 before talking to the Google API, but it would be better to do the transformation at page save time, so the lat/long is correct in the database, on the page, and in the RDF output.

This is likely an issue for OSIE guides as well.

Change History (4)

comment:1 Changed 14 years ago by Kake

Owner: changed from kake to Kake
Status: newassigned

Nick suggests we also save the OSGB lat/long in the database, as local_lat and local_long, just in case anything ever wants them. And this also works as a marker for nodes whose coordinates haven't been corrected.

comment:2 Changed 14 years ago by Kake

Decision: we're just going to make sure that we always use wgs84_lat and wgs84_long in the templates.

comment:3 Changed 14 years ago by Kake

Summary: OSGB x/y coords should be converted to WGS84 lat/long at page save time.We should always use WGS84 lat/long variables in the templates.

comment:4 Changed 14 years ago by kake

Resolution: fixed
Status: assignedclosed

(In [1051]) Finish changing from use of "latitude" and "longitude" template variables to "wgs84_lat" and "wgs84_long" (the first lot of this was accidentally committed in [1049], sorry). Fixes #176.

Note: See TracTickets for help on using tickets.