Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have the problem that when I create a new point (in a point layer) or a new line (in a line layer of course) and I save the changes to the layer (so NOT the project save) then QGIS rounds up the coordinates of the new element to six decimals. I can see that in the "identify results" window by clicking on "(Derived"). So as a result, I don't get the required position of the new element. The layers are DB tables that I received and I just open them in QGIS. I don't know the source of the layers. The CRS of the project is the same as the CRS of the layer. The thing is, if I create a new shapefile-layer myself (point for example), the new element remains in the wanted location even after saving layer changes. So it has something to do with the layer I received. But I don't know what that is. I am trying for 3 days to find a solution and can't seem to solve the problem. Does anyone have a hint for me?

Bevore saving the layer changes: bevore save

After saving the layer changes: after save

share|improve this question
    
What is the format of the layer that you have? Shape? –  Nathan W Feb 19 '13 at 9:34
    
That's the problem. I don't know. I access the layer from a network database (MSSQL/dbo) and can't see any extension of the file. I suspect it is not a shapefile. Heard these is data translated somehow in osm format. Unfortunately i can not find out more today about the source of the layer. Any idea? –  Tudor Feb 19 '13 at 9:43
    
Well I guess it's just a database layer. –  Nathan W Feb 19 '13 at 10:47
    
@Nathan W that sounds plausible. But still, why does QGIS round up? –  Tudor Feb 19 '13 at 11:09
3  
If the geometries are stored in a database, database settings might limit the number of digits. –  underdark Feb 22 '13 at 15:44
show 2 more comments

1 Answer

This is a bug in QGIS. I've created a bug report here.

It relates to the MS SQL data provider using WKT by default to save and update records. The QgsGeometry::exportToWkt() method rounds coordinates to 6 decimal places. In more recent versions, this has been increased to 8, but it is still rounding.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.