Gimp-Forum.net
coordinates appear to change - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: coordinates appear to change (/Thread-coordinates-appear-to-change)



coordinates appear to change - whburling - 02-08-2023

PROBLEM STATEMENT
The coordinates of a fixed point in a drawing change after i use the move tool to move the drawing around so i can see other features and then return to the fixed point. The error is on the order of 300 on the x axis and 50 on the y axis and varies for each test. If I measure and move a short distance and return, I am within user error of about +- 2 units. 

CONTEXT
The image in GIMP is a scanned image of an architecture drawing.

ASSUMPTION
1) when an image is loaded into GIMP, the coordinate system of GIMP is aligned with the scanned data of the image. Hence The coordinates of any one
    point in the image should always be the same.
2) Using the GIMP Move tool, the tool moves only the viewer, not the drawing and its cooordinate system.
3) If i quit the drawing without making any changes in it, the coordinates of a fixed point within the image should have the exact same coordinates when
    the image is opened up once again. By exact i mean as exact as the user can replicate where he is measuring. I find +- 5 units acceptable variation.
    My errors are at least 300 units.

Please straighten out my misconceptions so that i can change what i am doing so that i can scan and extract coordinates with reliability and repeatability.

thank you
bil


RE: coordinates appear to change - rich2005 - 02-08-2023

Well, Gimp is a raster (bitmap) editor not a CAD program and is not really meant for such purpose, although sometimes can be used.

Quote:The coordinates of a fixed point in a drawing change after i use the move tool to move the drawing around so i can see other features and then return to the fixed point.

Does this mean that that there is more than one layer coming from the scan, such as a multi-page PDF or Tif ?
..or have you added the scan to an existing image. Always better if you can give a screenshot of the problem.

If it is a layer over some other layer, no need to move it. Turn the layer visibility off. The layer eye icon in the layer dock.


Quote:1) when an image is loaded into GIMP, the coordinate system of GIMP is aligned with the scanned data of the image.

Very-very unlikely, Although you can set a CAD origin anywhere in a drawing it is usually bottom and left so that co-ordinates remain positive.
Gimp on the other hand being a raster graphic program uses top left for the canvas origin. You can move layers and selections outside the canvas area and increase canvas size to accommodate the change but then the canvas origin is reassigned to top left

Quote:2) Using the GIMP Move tool, the tool moves only the viewer, not the drawing and its coordinate system.

The Gimp move tool will move the active layer to a new position on the Gimp canvas The canvas still has 0, 0 top-left

Quote:3) If i quit the drawing without making any changes in it, the coordinates of a fixed point within the image should have the exact same coordinates when the image is opened up once again.

Gimp does not make automatic Saves, if you do not Save as .xcf (or export in other format) then obviously no changes.


RE: coordinates appear to change - whburling - 02-08-2023

(02-08-2023, 05:48 PM)rich2005 Wrote: Well, Gimp is a raster (bitmap) editor not a CAD program and is not really meant for such purpose, although sometimes can be used.

Quote:The coordinates of a fixed point in a drawing change after i use the move tool to move the drawing around so i can see other features and then return to the fixed point.

Does this mean that that there is more than one layer coming from the scan, such as a multi-page PDF or Tif ?
..or have you added the scan to an existing image. Always better if you can give a screenshot of the problem.

If it is a layer over some other layer, no need to move it. Turn the layer visibility off. The layer eye icon in the layer dock.


Quote:1) when an image is loaded into GIMP, the coordinate system of GIMP is aligned with the scanned data of the image.

Very-very unlikely, Although you can set a CAD origin anywhere in a drawing it is usually bottom and left so that co-ordinates remain positive.
Gimp on the other hand being a raster graphic program uses top left for the canvas origin. You can move layers and selections outside the canvas area and increase canvas size to accommodate the change but then the canvas origin is reassigned to top left

Quote:2) Using the GIMP Move tool, the tool moves only the viewer, not the drawing and its coordinate system.

The Gimp move tool will move the active layer to a new position on the Gimp canvas The canvas still has 0, 0 top-left

Quote:3) If i quit the drawing without making any changes in it, the coordinates of a fixed point within the image should have the exact same coordinates when the image is opened up once again.

Gimp does not make automatic Saves, if you do not Save as .xcf  (or export in other format) then obviously no changes.
Rich,

First, Thank you  for responding.

I experimented more carefully.

Here is what I found. If i open and close a file, the coordinates are maintained between each cycle. The fifth opening results in coordinates
of a point that are exactly the same as the first opening.

Secondly,
If i scale the entire image, so that i do not have to move the image in order to measure two points far apart in the image, then the measurements
are repeatable and the only error is user error, not GIMP error.

Thirdly
If i use scrolling, the measurements are repeatable within user error (+- 2 units).

Forthly
If i use the move tool, in order to measure an image point off the screen, the measurements are not repeatable. 
This suggests that the coordinate system is tied to the layer and not to the image. it also suggests that when i use the move tool
it moves the entire image within the layer; hence the coordinates change for a given image feature.

Conclusion:
move tool is NOT the same as scrolling. scrolling moves the viewer and not the image within the layer.
move tool moves the image within the layer and not the viewer's view

am i understanding the above?


RE: coordinates appear to change - rich2005 - 02-08-2023

I suppose so..obviously the move tool is not the same as scrolling, where did you get that idea.

You probably need to experiment with other ways of manipulating the views on a large image and avoid using the move tool. If you go straight into the measure tool then you can not change the image in any way.

I use linux so it might be a little different from Windows.
Using the mouse scroll wheel as a middle button, hold that down to pan in the view window
Ctrl and the scroll wheel zooms in-and-out
Ctrl and middle button zooms in-and-out focused on the cursor point.

Then for measuring, Are you using the Gimp measure tool ? You can set intersecting guides far apart and measure between when zoomed out. Either drag guides in from the rulers or the measure tool can set a pair see: https://docs.gimp.org/2.2/en/gimp-tool-measure.html (6.4.3. Key modifiers) The measure tool snaps to the guides.

quick example: https://i.imgur.com/txmmdd2.mp4

Otherwise maybe someone else has some ideas.


RE: coordinates appear to change - Ofnuts - 02-09-2023

Not much to add, but making measurements on a scanned image is fraught with peril. Scanners can have a transversal distortion(*)
that can amount to around 1% along the right edge. You should scan a sheet of squared paper and check that all the transverse spacing is as regular in your image (once loaded in Gimp)  as your original paper.

The whole story.

A possible fix.

(*) Because the sensor isn't physically as wide as the scan bed. So there is the equivalent of a wide angle lens in front of it. The other direction (scan head travel) is usually fine.


RE: coordinates appear to change - PixLab - 02-09-2023

To add to @rich2005 comments, If you do not have a "Middle Click" mouse, or don't feel comfortable with this method, to navigate in and around the canvas, you can hold the space bar then move your mouse while holding the space bar.
The move tool Move is to move something (a layer, a selection, a path, whatever), thus changing coordinates of what you are moving, you will not be able to navigate with it.