Tag Info

New answers tagged

0

To expand on @Chris's answer, use raster::writeRaster to write to any of a large variety of raster formats. Depending on whether your build of GDAL, you should be able to write to these (and possibly more) filetypes (returned by raster::writeFormats()): # name long_name # 1 raster ...


1

Matt Hansen's team has a paper published on forest cover change in Eastern Europe that goes back to 1985 - see Eastern Europe's forest cover dynamics from 1985 to 2012 quantified from the full Landsat archive http://www.sciencedirect.com/science/article/pii/S0034425714004817 I'm also checking with colleagues on whether Matt Hansen's algorithm is available ...


2

It is very unlikely that this problem follows parametric assumptions. I would recommend exploring nonparametric group tests, available in R, such as: Mann-Whitney (wilcox.test), Wilcoxon Signed Rank (wilcox.test), Kruskal Wallis (kruskal.test), Friedman Test (friedman.test). You could also apply a Monte Carlo sampling approach, lbl_test in coin or ...


0

You can solve this using R. The below code produces a scatter plot with linear regression and a Pearson correlation value. Because you're solving in R you have access to a massive range of statistical tools. install.packages(raster) library(raster) # read rasters r1 = raster("/dir/dir/file1.tif") r2 = raster("/dir/dir/file2.tif") # Resample r2 to r1 ...


0

You are almost right: NODATA is set to -32768 for oceans. Additionally, -997 is set for great lakes that are not excluded by the coastline. Since the pixel content (growing period) makes no sense on lakes, you can safely treat -997 as NODATA too.


-2

EDIT Should have been posted as a comment...Didn't want to delete the other comments to this comment...but the selection of tests should be directed towards the nature of the data itself, even @MikeRSpenser suggests in the second last line that the t-test is unlikely the best test...hopefully the OP read the comment ORIGINAL bearing in mind that landuse is ...


0

Well sadly I just had to work around it. I mosaiced them in a 3rd party image editing program and brought them back into Arcmap and geo-referenced them on top of the originals.


1

The R software is a good solution. You can read your rasters, extract values for the sub areas and then run an ANOVA, t-test or whatever else you might fancy. Remember to check whether your data are normally distributed so you can pick your test. Here are the basics: # read rasters slope = raster("~/dir/dir/file.tif") land = raster("~/dir/dir/file.tif") # ...


0

You can do this using GRASS, providing your DEMs are integer (a restrictive limitation). You need the r.statistics tool and also r.mapcalc (for RMSE).


1

You can do this in R. Here's a script that reads in your DEMs, calculates your stats, plots your results and then writes to csv (if you really want to plot in a spreadsheet). Remember to add your own file locations and you may need to tweak the RMSE, I didn't check that. install.packages("raster") install.packages("e1071") library(raster) library(e1071) # ...


0

I know this isn't an ArcMap solution but it has a bit more flexibility. Use the Composite Band tool under Data Management->Raster->Raster Processing. Open the tool dialog and expand your raster in catalog tree (showing the individual raster bands). Now drag whatever bands you want into the Input Rasters box and name the output whatever you like. This tool ...


0

Yes you can however; if you resample from smaller cell size to a larger cell size can result in the loss of data. If you resample from larger cell size to a smaller does not increase the resolution, it just creates more cells.


0

Try both and compare. Either will be a compromise on your higher resolution dataset. Hence, there is not 'proper' solution. Just be sure to detail the process you undertook so your work is repeatable.


1

Check to see if you have scale dependent visibility on in the layer properties general tab.


1

If you have a statistically sufficient number of survey data points you could use the elevation values in those points to calculate the RSME using the code below. The survey data table would need to have some existing fields including the surveyed elevation, and the interpolated elevations (from the add surface information tool in the 3d analyst toolbox). ...


1

I'll suggest that you run the WaterShed Tool on the data. It will give a raster which indicates each watershed in that area, and then you can see whether each cell in your study area drains in the same creek or Sink.


1

It would be best to resample the DEM and then create the slope layer. Take a look at this thread (particularly post 2) from the ESRI forums. You might end up saving yourself some time this way as well. Resampling a DEM will reduce it's size (in terms of disk space), and should allow the slope tool to process in a shorter amount of time.


3

You can download Landsat imagery via EarthExplorer. That is quite low resolution. Another global dataset is BlueMarble, which is very nice, and is low res too, but globally that makes for a gigantic dataset. More locally, you could contact your municipal government, or state government, and see if they'll allow you to download an image, which could be high ...


2

In QGIS 2.6.1, go to menu Database->DB Manager->DB Manager, set the database connection and you will see the raster table. You can drag and drop it or right click and select Add to canvas. From your description of the problem, you are using the regular "Add PostGIS Layers", which will not show your raster table, since it is for vectors and ...


0

The Rasmover plugin should do what you want. You have to allow for experimental plugins to get it in the plugin list. The result is a virtual raster file, which you can edit with a text editor to adjust the parameters if needed.


1

The Rasmover plugin should do what you want. You have to allow for experimental plugins to get it in the plugin list. The result is a virtual raster file, which you can edit with a text editor to adjust the parameters if needed.


1

Similar problem right now (QGIS 2.6.1). But shapefile has some issues (topologic issues). I guess that shapefile has to be repaired before being used as crop mask. Topological issues in shapefiles can be repaired using GRASS GIS. Here's a really simple guide of how to repair a bad polygon. You only need to know how to use GRASS GIS. ...


0

This is how you can do this with R: library(raster) r <- raster('your file name') tab <- cbind(0:9 * 1000, c(1:9,Inf)*1000, 1:10) x <- reclassify(r, tab, filename='output.tif', datatype='INT2S')


1

QGIS doesn't change the cell size for rasters did you check if the project coordinate reference system is the same as the layers you might have the "reproject on the fly" option set; right click on the layer and select "set project by layer" projection. QGIS defaults to range clip of 2% (ie 2-98) of the full range of values. Right click on the layer and ...


1

jbaums solution is good, but in cases where you cannot make a stack you can do something like the below. Just a single loop (not three or four!). Pau's solution (first making a table) is needlessly complex, and involves too much manual labor, and cannot be easily applied to other datasets. # read files setwd("D:/Data/LANDSAT") library(raster) library(rgdal) ...


2

The problem is that something in the stack (QGIS, GDAL, or the operating system) doesn't appear to be handling the ã character in the directory name (so Portimão becomes Portimo). That looks like a bug, which you should check isn't already filed at http://hub.qgis.org/projects/quantum-gis/issues, and if not already filed, add details. In the mean time, I'd ...


0

From you comment I can see that you want to hide part of the raster and not need to clip the raster file. Have a look at the Mask tool created by Egge-Jan Pollé. You can find the tool here on the Community Download site: http://communitydownloads.pbinsight.com/code-exchange/download/mask


0

Orion, I just noticed you mentioned in your response to msi_g that even after installing 64-bit Background Geoprocessing that your tool is still running in the foreground. By default, all models and script tools run in the foreground, which means by default they all run in a 32-bit environment. Have you unchecked the "Always run in foreground" checkbox on ...


0

Make sure you have the script tool set to run in-process. http://resources.arcgis.com/en/help/main/10.2/index.html#//00150000000r000000


1

In fact ArcGIS is geo(spatial) data processing software. By the way, overlaying one over another depends on the image dimension of the images(s) is being imported in arc map.If images with same dimensions are imported then these images overlay one over another.In this case arc map creates two files (.xml and .ovr)for each image. You need to just drag and ...


1

raster2pgsql uses VRTs for the overviews, which only supports NearestNeighbor. raster2pgsql does not support the consumption of existing overviews in files (mostly due to the scale factors used to generate those overviews). There are plans to remove the usage of VRTs in raster2pgsql due to the NearestNeighbor limitation and consume existing overviews but I ...


1

If you were able to import your ascii file as an image, you already have a raster file. You should then check if the spatial reference is OK by adding another layer (e.g. open street map). If it is not well georeference, please provide the first lines of your ascii file otherwise there are too many possibilities for automatic or semi-automated ...


0

This step-by-step solution works (and it is not so complicated that it seems to be...): First, convert yor raster into polygons by ArcToolbox -> Conversion Tools -> From Raster -> Raster To Polygon. Once new polygons created, identify their coordinates of centroids by Add Geometry Attributes - it creates new culomns in your polygon attribute ...


1

Run the Raster to Polygon conversion tool, then run the Feature to Point tool on the result. This should give you centroid point features for the rasters.


0

I would first start by checking my environment settings to see what my raster cell based settings are currently Geoprocessing -> Environments -> Raster Analysis Maybe try setting this value to 'Minimum of inputs' If that doesn't work, see if the input data is projected into a coordinate system that uses meters. There might be an issues with the 0.038km ...


0

Forgot to answer this question: The GDAL geotransform matrix lacks the possibility to shift x/y directions (only scaling and rotation can be done). The solution was to create a custom geomtransform in ArcObjects, which adds additional transformation parameters to the aux.xml file. The grid then rotated/shifted/scaled as dersired. Unfortunately I don't ...


1

gdal_translate is able to extract single bands: gdal_translate -b 1 in.tif out1.tif gdal_translate -b 2 in.tif out2.tif gdal_translate -b 3 in.tif out3.tif gdal_translate -b 4 in.tif out4.tif Raster -> Conversion -> Translate will create a gdal_translate command line, which you can edit to specify the band you want.


0

When you say you want to cut your raster with a vector layer, I assume you want to clip it? This is not possible in core MapInfo. You will need an extension such as Discover, Engage or Vertical Mapper. Not only can you clip, but you can save as different raster formats. However, there are several free solutions that will do this for you, the most popular ...


1

MapInfo .TAB files are merely pointers to another data source - be it native .DAT or ECW or GeoTiff or Excel etc. What is the native format the grid is in? If it's a MIG or if you have the original data used to create the grid you can use the clip tool in the thematic map options: You can save out raster images by using the Save Window As option under the ...


1

Use postgresql/postgis for tiled raster storage. You can do a fair amount of band math directly with raster functions, esp. if you want to constrain these to feature delineated subsets (e.g. a polygon for a particular land class). You can parse postgis raster selections into python (using gdal) and integrate with opencv if you need to do more complex image ...


0

Have you checked out GeoTrellis? http://geotrellis.io Doing Map Algebra on the server is what it's designed for. We've implemented local, focal, zonal summary, global operations, vector -> raster, raster -> vector. For large data, it can parallize on one machine with Akka and we're working towards full Spark support for cluster computing. It's a Scala ...


1

This is almost a duplicate of this post, but you have an additional cropping step, so I'll post a new solution. Given your .img files all have identical extent and resolution, you can save a lot of hassle by stacking them from the start (you can pass a vector of file names to raster::stack). You can then crop the stack in one shot, and write them all out ...


1

I think I know what this is about. First, it is not really an EDIT of the raster that is performed; it is probably just a change in the rendering (changing visualisation style in the raster properties). For example moving from a "single-band grey" towards a "single-band pseudocolor" and thus obtaining a color visualisation. After doing so, you would like ...


0

with the raster calculator, you can use conditions to get exactly what you need : Con("Model10a_bin.tif" == 0, Con("Model10a_yr2050_bin.tif" == 0, 0, 3), Con("Model10a_yr2050_bin.tif" == 0, 1, 2)) another single line algebra, shorter to write, is the sum of the first with the double of the second. But 2 and 3 are then inverted "Model10a_bin.tif" + ...


0

to perform raster algebra in an automated way, I would either use gdal or OTB. With gdal, you have gdal_calc.py and with OTB you have the application called otbcli_BandMath. Both are command line application that you can launch in a batch script.


2

Assuming ArcGIS use combine, e.g. Combine (["a.tif","b.tif"]) Combines multiple rasters so that a unique output value is assigned to each unique combination of input values


1

You could reclass one of the rasters so that your binary values are: |Raster |Yes Value |No Value | +------------------------+-----------+-----------+ |Model10a_bin.tif |1 |0 | +------------------------+-----------+-----------+ |Model10a_yr2050_bin.tif |2 |0 | Then simply add the two together ...


2

I suppose you did these 2 steps correctly: 1- calculate the statistics of the .asc file. 2- set the spatial reference of the .asc file. I don't think you have to import your .asc files into a geodatabase except you need to do special analysis that is not possible in ArcGIS with asc file. "when I do this to the original file and then import it will not ...


0

Change your last line to: layer = QgsRasterLayer(file, baseName) file contains the full path to your raster file (e.g., /home/user/geodata/mypic.tif), while fileName, which you are passing as argument right now, only contains the name of the file (e.g., mypic.tif).


0

I recommend you create a table (excel, txt, csv, etc) with the name of the raster you want to process and the folder where you want to save the output raster in different columns. You can use this script: #load library library(raster) library(rgdal) # #read table TABLE=as.data.frame(read.table("D:/table.csv", sep=";", header=T)) #initial value id=0 ...



Top 50 recent answers are included