You can do that in Python Console of QGIS by using a QgsRasterPipe object (pipe) for setting a renderer clone of the image employed as active layer before to use the 'writeRaster' method of QgsRasterFileWriter class (you don't need gdal_translate).
I used the following code:
layer = iface.activeLayer()
extent = layer.extent()
width, height = layer.width()...
I found this good discussion at http://www.cartotalk.com/index.php?showtopic=7109 and thought it would be useful to add to GIS.stackexchange for posterity.
in ArcMap 10.2, choose > Windows > Image Analysis
in the top panel, select the input image
in the Processing section, choose the first tool (Clip)
this adds a new temporary raster to the TOC
GDAL's ENVI driver can be used to write headerless binary data files. The default data interleave is band sequential (BSQ), but BIP or BIL interleave options can be specified as a creation option.
For example, to convert a GeoTIFF file foo.tif to a headerless file foo.bin:
gdal_translate -of ENVI foo.tif foo.bin
The ASCII file foo.bin.hdr will also be ...
The reason for this is that while you see yellow pixels, or pink pixels, QGIS sees thousands of discrete colours
Zoom in really close to scanned map you'll see lots of noise - neighbouring pixels have very similar, but not identical, colours. When there are two pixels with rgb values of (128,128,0) and (127,127,1), they will look identical, but be treated ...
From a cartographic point of view, it is commonly assumed that the human perception of a line position is around 0.3 mm. For a given map scale of 1:20,000 or smaller, the USGS’ NMAS has established that 90% of all the points tested must fall within 1/50 of an inch (0.5 mm) (as measured on the map) to their known positions on the planet (see here).
This can ...
There are several ways to incorporate raster properties into a conditional statement. Here are three methods:
import arcpy, os, numpy
ras = r"C:\path\to\raster.tif"
# Method 1 Using Spatial Analyst
if arcpy.sa.Raster(ras).maximum > 0:
arcpy.RasterToPoint_conversion(ras, r"C:\temp\out.shp", "VALUE")
# Method 2 using the raster properties
You probably don't need to convert a GeoTiff to a Tiff.
As a GeoTiff your image will not only be readable by any GIS package but probably can also be read by any image manipulation package too (e.g. Photoshop, GIMP etc) baring some exceptions. Image editing packages simply ignore the bits in the Tiff header that make it a GeoTiff - either that or they ...
I have done a LOT of work in this field and I strongly suggest that you DON'T pursue your current plan. It will completely lack credibility with developers, the community and planners alike. You need to do a proper Zones of Theoretical Visibility (ZTV) analysis rather than fudge the issue. I also strongly doubt that your turbines are 200m tall, so your ...
For flat roofs:
You could manually create a height attribute in the shapefile if you're just doing this for one building. Otherwise, you need to import the OSM and then export the Topology and select Polygons. There is a guide for this kind of thing here:
Export the polygons to a Shapefile and then use ...
Suggestion from Stephen Lead is sufficient for grayscaled rasters but not for coloured rasters (e.g. DOF). If you want to preserve the colours (conversion is quite good) then use Copy Raster tool and select RGB to Colormap option (by default is unselected). Your result will be a single band coloured image. The output will be quite good approximation of the ...
This is not as complicated as it seems. Factors in R are ordered in the object. If you use levels() to look at the contents of the factor the order corresponds to the factor index (i.e., first class is 1, second 2, ect...). Because of this you can deal with the character component of a factor indirectly and never have to muck with the actual attribute value. ...
Ok, there is a way to do this but it's nasty.
Using your ranges (in a table or ASCII file) reclassify the data, this will turn your ranges into values (like 23.6-24.4 becomes 1). Then you can apply a colourmap to the file to get the same colours, this is the nasty part. The colourmap file looks like this:
1 255 255 0
2 64 0 128
3 255 32 32
4 0 255 0
5 0 0 ...
In ENVI 5x (the procedure is similar in ENVI 4x or ENVI 5 Classic), use the File > Save As menu to save your TIFF to ENVI format which is a flat binary file. This should default to BSQ, but if it doesn't you can convert using the Convert Interleave tool. You also get header (.hdr) and pyramid (*.enp) files, but you can delete those.
If you have SAGA installed under QGIS, you can use Victorising grid classes tool located in Processing Toolbox -> SAGA -> Shapes - Grid -> Victorising grid classes. As you can see in the image below, you need to change the Class Selection from All Classes to One single class specified by the class identifier, Then Choose the class pixel value (in ...
This can be achieved by applying a mask as the second argument in the Polygonize function, as stated in the GDAL documentation. The mask needs to be a separate raster layer, that has 0 where you don't want the algorithm to polygonize.
With your data, follow these steps to implement:
1) Run raster calculator on your original raster ("select3.tif") with ...
If you are after a network, I suggest that you use "raster to polyline" instead of raster to polygon. Once the lines are created, you can still create buffer around those lines in order to recover the polygons. The raster can be clean using "thin" before you convert it.
EDIT: feature to line gives you the connectivity. Then you can create a small buffer (1/...
This is what zonal raster functions are for. You can obtain zonal variance by using the ArcGIS "Zonal Statistics as Table" tool and then taking the square-root of the standard deviation. Variance is a simple and common measure of roughness.
Your polygon feature-class of countries would be your zone data and your elevation raster would be the value raster. ...
your objects seem to be very small. If you don't have a conversion for all of them, this is probably because they do not include any cell center. As you seem to look for a "one polygon<-> one pixel" relationship, you should try converting your polygons to centroids, then use "point to raster" instead of "feature to raster".
Look up the RasterToPoint_conversion tool in the ArcGIS Help:
This page is for 10.0, other versions might be slightly different.
Lets have a close look at statistics about scene enclosed by you:
C:\Program Files\QGIS Chugiak\bin>gdalinfo C:\Users\Janek\Desktop\LC819402420142
STATISTICS_MAXIMUM=65535 - this especially!
STATISTICS_MINIMUM=0 - and this one
This problem is addressed in part by http://blog.hexagongeospatial.com/help-ecw-speckled-edges/
The only way to achieve consistent background color values after compression is by using an AllOpacity band which doesn't appear to be supported by the version of ECWJP2 SDK used in FME.
This doesn't answer your question, but your real need : you should download Corine Land cover in an ESRI geodatabase or SQLite format. You'll find your polygonal entities inside ! Job is already done...
Download Corine Land Cover 2012
This seems to be a bug in QGIS, utilizing some odd behaviour of the gdalwarp utility. If gdalwarp does not like the input raster (in this case due to the y axis positive down), it creates a new raster with a square cell size by default.
On the command line, you can override this with
gdalwarp -tr 0.125 0.5 -s_srs EPSG:4326 -t_srs EPSG:4258 import_test_data....
I read points from a shapefile and burn in a png,
also with a color classification.
The recipe is in python, you need in java
but the structure is the same, only must to learn the
image java api:
from osgeo import gdal, ogr
from PIL import Image, ...
Try reclassifying your raster (Spatial Analyst > Reclass > Reclassify) so that every pixel that used to have a value (forested) gets a value of 1, and everything that didn't becomes 0.
Then, you could use Zonal Statistics with Sum to calculate how many forested pixels are in each zone (add up all the ones). Divide by the total number of pixels per zone ...