Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#655 closed defect (fixed)

Error Measuring Distances using projection ID 1616 - OSGB 1936

Reported by: richard.denman@… Owned by: homann
Priority: major: does not work as expected Milestone:
Component: Projection Support Version: 0.8
Keywords: distance tool Cc:
Must Fix for Release: No Platform: Windows
Platform Version: Awaiting user input: no

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.

Attachments (2)

t.zip (918 bytes ) - added by g_j_m 17 years ago.
Siemans_Stops.zip (126.4 KB ) - added by richard.denman@… 17 years ago.
Stops

Download all attachments as: .zip

Change History (19)

comment:1 by g_j_m, 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 :(

comment:2 by homann, 17 years ago

Milestone: Version 0.9
Owner: changed from nobody to homann
Status: newassigned

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?

comment:3 by g_j_m, 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.

comment:4 by homann, 17 years ago

Could you attach data set, and steps to reproduce?

comment:5 by g_j_m, 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.

by g_j_m, 17 years ago

Attachment: t.zip added

comment:6 by richard.denman@…, 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

comment:7 by homann, 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?

comment:8 by homann, 17 years ago

Awaiting user input: set

in reply to:  7 ; comment:9 by anonymous, 17 years ago

Replying to 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.

in reply to:  9 comment:10 by richard.denman@…, 17 years ago

Replying to anonymous:

Replying to 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.

comment:11 by richard.denman@…, 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.

comment:12 by homann, 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.

by richard.denman@…, 17 years ago

Attachment: Siemans_Stops.zip added

Stops

comment:13 by richard.denman@…, 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.

comment:14 by richard.denman@…, 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.

comment:15 by homann, 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.

comment:16 by homann, 16 years ago

Awaiting user input: unset
Resolution: fixed
Status: assignedclosed

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

comment:17 by (none), 15 years ago

Milestone: Version 0.9.2

Milestone Version 0.9.2 deleted

Note: See TracTickets for help on using tickets.