Bug report #655

Error Measuring Distances using projection ID 1616 - OSGB 1936

Added by Redmine Admin about 17 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:Magnus Homann
Category:Projection Support
Affected QGIS version: Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:10714

Description

I am using version 0.8.0 and I am having trouble measuring distances. My first thought was that it was a projection issue so I have checked the project projection and the layer projection and they are both set to OSBG 1936. I have checked the measurement unit and it is set to meters. When you add the scale plug-in the scale shows the correct distance and also the co-ords in the bottom right hand corner display correctly.

If this was a projection issue I would expect the distance to increase as you move away from your first point and decrease as you move towards it, however as you move away from your start point the distance seems to increase and decrease at random which leads me to suspect that this is either a software issue or a problem with the OSGB 1936 projection.

The data I am using is Mapinfo tables and these work fine within MapInfo

Any help is much appreciated.

t.zip (918 Bytes) Gavin Macaulay -, 2007-03-14 03:47 PM

Siemans_Stops.zip - Stops (126 KB) Redmine Admin, 2007-03-20 07:37 AM

History

#1 Updated by Gavin Macaulay - about 17 years ago

That symptom suggests that the wrong projection is being used by qgis.

For the measuring, qgis converts all points to lat/long and does the distance and area calculation in that space.

If qgis thinks that the projection is already lat/long, it doesn't attempt any projection, and interprets the coordinates as degrees. Because the distance calculations wrap round every 360 (for longitude) or 180 (for latitude) degrees, using the unprojected metres gives distances that increase and decrease rapidly as one moves the cursor around.

Regardless of all that, I can reproduce the problem using the 1616 projection, and I suspect that it is to do with qgis still somehow using a lat/long coordinate system for the layer. I don't have a solution though :(

#2 Updated by Magnus Homann about 17 years ago

  • Status changed from Open to In Progress

This is/should be fixed in trunk (version 0.9) No backport planned at the moment. See bugs #535 (with workaround), #518, #631 and #449.

Gavin, can you check in trunk?

#3 Updated by Gavin Macaulay - about 17 years ago

I checked in trunk and 0.8 branch - both had the same problem. I had a .prj file with appropriate coordinate system stuff in it (for 1616), but qgis ended up with a lat/long coordinate system for that layer. I tried changing it to 1616 for that layer, but it didn't change.

#4 Updated by Magnus Homann about 17 years ago

Could you attach data set, and steps to reproduce?

#5 Updated by Gavin Macaulay - about 17 years ago

Example dataset attached. Note the coordinate system in the .prj file, and note what qgis shows for the layer. Measuring lines has the original problem.

#6 Updated by Redmine Admin about 17 years ago

Hi Guys,

Thanks for your help with this. I’m no expert in these things but logic says to me that if it was a problem with the software then everyone would have had this problem. Is it possibly to do with the actual projection itself rather than the software?

Regards,

Rich

#7 Updated by Magnus Homann about 17 years ago

The dataset supplied has a GeoCS coordinate system. At least, that's what 'ogrinfo -al t.shp' thinks. Comparing with what's in the t.prj, it might be malformed?

I'm not sure the errors are related.
Richard, have you set the project co-ordinatae system to QGIS SRSID 1616?

#8 Updated by anonymous - about 17 years ago

Replying to [comment:7 homann]:

The dataset supplied has a GeoCS coordinate system. At least, that's what 'ogrinfo -al t.shp' thinks. Comparing with what's in the t.prj, it might be malformed?

I'm not sure the errors are related.
Richard, have you set the project co-ordinatae system to QGIS SRSID 1616?

Both project and table co-ordinate projections are set to 1616 which is why I dont understand whats going on.

There is a comment in the forums from someone who seems to be having the same problem.

#9 Updated by Redmine Admin about 17 years ago

Replying to [comment:9 anonymous]:

Replying to [comment:7 homann]:

The dataset supplied has a GeoCS coordinate system. At least, that's what 'ogrinfo -al t.shp' thinks. Comparing with what's in the t.prj, it might be malformed?

I'm not sure the errors are related.
Richard, have you set the project co-ordinatae system to QGIS SRSID 1616?

Both project and table co-ordinate projections are set to 1616 which is why I dont understand whats going on.

There is a comment in the forums from someone who seems to be having the same problem.

Sorry. This was me.

#10 Updated by Redmine Admin about 17 years ago

I have just found something...
If you go into QGIS options -> Map Tools -> there is an option for what unit the measure tool is measuring in. This is currently set to WGS84 Which I think is Lat/Lon. I assume this should match the map projection, however when I click on the drop down box I am limited as to which projections I can choose.

#11 Updated by Magnus Homann about 17 years ago

The setting is for what ellipsoid it should use when calculating areas/distances. Minor differecnes, shouldn't apply here. The ellips used for 1616 is 'Airy'.

Have you turned on-the-fly projection on?

It would help if you supplied the dataset.

#12 Updated by Redmine Admin about 17 years ago

I haven't enabled on the fly, as I assumed that if I supplied the correct information it would not need it (plus I wasn't sure what it did). I have now attached one of the datasets I am using. The rest of the sets are too big to up load. It is BusStop information in Essex.

#13 Updated by Redmine Admin about 17 years ago

I have saved the tables in WSG84 format now and the measure tool works fine however the scale plug in now shows incorrectly and the maps look slightly stretched horizontaly (but not much) This gives us a work around but there does appear to still be a problem with the OSGB projection.

Thanks for your help people.

#14 Updated by Magnus Homann about 17 years ago

I'm sory, but I'm unable to open the dataset in Qgis. ogrinfo can not open it either, even though it says it tries with mapinfo driver.

#15 Updated by Magnus Homann over 16 years ago

  • Resolution set to fixed
  • Status changed from In Progress to Closed

I'll set this as fixed now, please re-open if needed.

#16 Updated by Anonymous over 14 years ago

Milestone Version 0.9.2 deleted

Also available in: Atom PDF