tproduit / pic2map

QGIS plugin for camera orientation and interaction between a picture and the map (monoplotting).
22 stars 5 forks source link

How do I size the Monoplotter Orthographic -> Save Raster to match input image size? #14

Open apiszcz opened 4 years ago

apiszcz commented 4 years ago

Is it possible to set the size the ortho.tif output to match the dimensions (in pixel space) of the input image/picture? (e.g. input PNG picture is 720x480, output image is 720x480 as a GEOTIFF)

This code block in drapping.py appears to be where these choices are 'decided for the user, ..

            meterPerPixel = self.ui.spinBox.value()
            totPixN = (old_div(self.l_nord,meterPerPixel))*self.viewOrtho.resolution
            totPixE = (old_div(self.l_est,meterPerPixel))*self.viewOrtho.resolution
            self.viewOrtho.getViewPortZoom()
            orthoSavedParam = [totPixN, totPixE, self.viewOrtho.ParamViewport]
            a = self.viewOrtho.getMaxBufferSize()

            maxX = -self.viewOrtho.boxRightDown[0]
            minY = self.viewOrtho.boxRightDown[1]

            minX = -self.viewOrtho.boxLeftUp[0]
            maxY = self.viewOrtho.boxLeftUp[1]