[QGIS-trac] Re: [Quantum GIS] #1540: "Save as Image" georeference
is off up to 1 cell
Quantum GIS
qgis at qgis.org
Wed Apr 15 22:23:27 EDT 2009
#1540: "Save as Image" georeference is off up to 1 cell
--------------------------------------------------------------+-------------
Reporter: msieczka | Owner: nobody
Type: bug | Status: new
Priority: critical: causes crash or data corruption | Milestone: Version 1.0.2
Component: Rasters | Version: HEAD
Resolution: | Keywords:
Platform_version: | Platform: Debian
Must_fix: Yes | Status_info: 0
--------------------------------------------------------------+-------------
Comment (by smizuno):
Replying to [comment:2 mhugent]:
I don't notice any offsets when I use the procedure you list. This is
exactly what I was doing to determine the problem and test my changes. I
have also tried at different scales - no difference between map and image.
As long as the extent isn't changed the image saved exactly overlays the
original map.
I am using rasters in UTM zone 15, NAD83.
I have considered what would happen with other CRS and believe that there
shouldn't be any problem. I did test with a raster in a local county
coordinate system in the same general area and found that the saved image
exactly overlays the map as expected.
Here are some Python statements I used to get the values for the world
file, which I modified by hand at first. These were just executed in the
Python console.
The results should be the same as written to the world file for the saved
image.
Cell size:
iface.mapCanvas().mapUnitsPerPixel()
Coordinates of center of Upper Left cell:
iface.mapCanvas().extent().xMinimum()+(iface.mapCanvas().mapUnitsPerPixel()/2),iface.mapCanvas().extent().yMaximum()-(iface.mapCanvas().mapUnitsPerPixel()/2)
I am interested in any further information as I do want to get this
correct.
Regards, Steve
--
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1540#comment:3>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list