New answers tagged

1

Your source data is in GDA94, supposed to be Vicgrid94 covering Philip Island. gdalwarp transforms correctly to a target CRS of epsg:3857, but gdal_translate will not do that. -a_srs has a different purpose: just assign a CRS, no reprojection. So you have to use: gdalwarp -of GTiff -s_srs epsg:3111 -a_srs epsg:3857 test.vrt 25k.tif BTW I used this ...


0

Set one image to the values you want, copy the full file name of said raster, insert full file name into script below, and drop this script in Python box. Hit enter+enter and sit back and relax. mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "")[0] refLayer = arcpy.mapping.ListLayers(mxd, "ReplaceWithNameofRaster.tif", ...


1

You should understand that when you save the file from the QgsRenderer as in your code: piperenderer = pipelayer.renderer() pipe.set(piperenderer.clone()) file_writer.writeRaster(pipe... You are not saving the raster styled, instead you are saving the actual RGB file that represents that visualization, so it is not classified or styled, but it is like you'...


1

I'm a little late to the party, but this may help others. Photoshop has the ability to read/write 'raw' format files. On opening the file you have to tell it how large the header is, if there is one, plus the dimensions, number of bands, and band layout (interleaved or no). GDAL can read/write the ENVI file format, which is essentially a raw file with a ...


2

Provide the source DEM no data value as well in the command line. Try the following command: gdalwarp -t_srs EPSG:4326 -srcnodata {source no data value} -dstnodata -90909 -of GTiff Source.tif DestWGS84.tif This should help in fixing the zero elevation issue you have.


4

GeoTransform is an array that contains six numbers: X origin Pixel width Angle (with vertical axis) Y origin Pixel height Angle (with horizontal axis) X and Y are coordinates of the top left corner of your raster image. Each pixel has size, width and height and it is a value in meters or degrees (depends on your CRS) - this value is constant, not ...


1

Unfortunately, it turns out at this time, GDAL does NOT support OPENCL speed up on orthorectification. In fact, the only speedup I have been able to find is that compiling with OpenCL does speed up resampling slightly. This would be a good feature for GDAL to implement at a future date.


1

I would try to add a low resolution DEM (e.g. SRTM 30m) to fill the gaps where your high resolution DEM is not available. The problem with a crop before orthorectification is that the RPC link image coordinates with ground, so if your image is not georeferenced and you crop it, this relationship will be detroyed.


2

It is preferable to use gdal_translate command. The syntax is: gdal_translate -projwin xmin ymax xmax ymin input_raster output_raster where -projwin parameter guarantees complete alignment. To test my approach I used the raster and the clipper polygon of next image; where it can be observed that there is a complete misalignment between both layers. From ...


1

Unless your cutline lines up perfectly with cell edges, the output raster will always be shifted/resampled to align with the polygon when that option is selected. If you leave the -crop_to_cutline option out, cells outside the masking layer just get converted to no-data in the output instead of being removed. I'm sure there's a way to get rid of those no-...


5

Here's a quick script I put together to correct the cell size of a folder of GeoTiff rasters: import os, sys from osgeo import gdal from osgeo import gdalconst WorkingFolder = sys.argv[1] # first command line argument # change to a hard path like r'c:\your\path' or 'c:\\your\\path' # without the r if it suits your purposes.. for f in os.listdir(...


1

I suppose that your image is some of the the 4-band products by Airbus DS: http://www.intelligence-airbusds.com/en/4951-which-spectral-mode-do-i-choose Gdal2tiles is made for splitting common, visual images into png tiles. Such images use 8 bits per band and they have one band (greyscale), 3 bands (red-green-blue) of 4 bands (reg-green-blue + alpha). I ...


2

I think all you need to do is reproject it using: gdalwarp -co TILED=YES -co COMPRESS=DEFLATE -t_srs EPSG:3857 newImage.tif image.tif and then tile it: gdal2tiles.py newImage.tif If your file is very large it make take a while.



Top 50 recent answers are included