New answers tagged

0

Just saw this ability, but I think it's only for ArcSDE: https://desktop.arcgis.com/en/arcmap/10.3/manage-data/using-sql-with-gdbs/install-st-raster-sqlserver.htm


0

This looks indeed like some sort of missing value (as suggested by @Spacedman). Anyway, as a straightforward alternative to subsetting your data (as suggested by @nebi), you could simply use the zcol argument inside spplot to display only a desired range of values. Here is a reproducible example. library(raster) rst <- raster(volcano) ## no 'zlim' ...


0

QGIS has ability to connect to GRASS.Follow the below links to integrate GRASS plugin with QGIS.Add GRASS vector data to QGIS and export into shapefile or any other format. https://docs.qgis.org/2.6/en/docs/user_manual/grass_integration/grass_integration.html http://qgis.spatialthoughts.com/2012/01/setting-up-working-grass-environment-in.html


0

You may export to Shapefile with v.out.ogr Example from the doc: v.out.ogr input=lines type=line output=lines.shp


1

As per @IvanSanchez' suggestion I'm going g to have web-ready 8-bit rasters with accompanying json metadata files. The metadata files have max and min values from the original 32-bit rasters which we use to interpolate the 0-255 values from the 8bit rasters so we can explore the values in real time.


0

Here is a auto color script based on AndreJ's code: ================================================================================ Usage: ------------- Custom color: python gdaldem.py input_tif.tif color.txt output_color.tif Auto color: python gdaldem.py input_tif.tif auto output_color.tif """ import subprocess import sys import os import tempfile import ...


1

Euclidean Distance is an ArcGis tool but can also be an operation in GRASS, QGIS or other software package... If I assume ArcGis I would say have a look at your environment settings especially Output Extent, CellSize and Snap Raster and set all three to your constant raster, but that would only be if you were using ArcGis. – Michael Miles-Stimson


0

To realize classification on raster data, import the raster, righ clic in the layer name and go to "Style" section. - Select "Singleband pseudocolor" - Select at the right the "Spectral" color with your favorites parameters - Clic on "Classify" and change classe in the white zone at the left - Clic Ok More datails on the process documentation in the Qgis ...


0

Spacedman ist probably right but you could subset your dataframe before plotting like: df <- df[df$Z < 300,] spplot(df, "Z")


1

If you edit the image in Photoshop you can use the magic eraser tool to remove the white background. Any white space will become transparent so make sure you use the paint bucket tool in photoshop to color any white space you want to show as white as a slightly off-white color that won't be noticeable. Save the Image as a BMP. Insert the image as a marker. ...


1

If those lines are vector lines (and not graphic lines as well) and you want to places those pictures onto them you can just add a point layer and put points where you need the symbol. Then you use your picture as a picture-marker-symbol where you can set the background or transparent-color to no-color. If you need special rotations you can put the angle ...


5

This is a known issue with ESRI. Their Page suggests these following workarounds (quoted from ESRI): Use one of the following two solutions to solve this issue. It is highly recommended to download and use ArcGIS Pro to perform all printing and exporting functions. ArcGIS Pro is not limited by the graphical device interface (GDI) ...


0

-make sure you are adding the file extension in the .txt file (e.g .img, .rst) -make sure your files are in the right format accepted by TIMESAT as suggested in the links below http://web.nateko.lu.se/timesat/docs/Getting%20image%20data%20into%20TIMESAT.pdf) http://web.nateko.lu.se/timesat/timesat.asp?cat=5


2

the test yields either 1 (true) or 0 (false). So you can make an "and" by multiplying the results, and the othe cases using 1-(condition). Here ismy suggestion B*(A==212)*(B==20) + A*(1-(A==212)*(B==20))


2

You can use an adaptation of the next code (by using the path of your particular raster): from osgeo import gdal import numpy as np raster = "/home/zeito/pyqgis_data/utah_demUTM2.tif" dataset = gdal.Open(raster) band = dataset.GetRasterBand(1) print "rows = %d columns = %d" % (band.YSize, band.XSize) BandType = gdal.GetDataTypeName(band.DataType) print ...


1

What you want is not possible. The info or id tool you use to get a single value for the point you clicked on the map is sending a GetFeatureInfo Request for this coordinate to the server and the server sends back an xml/html file(which is in general optional, as well as the "elevation-awareness" of this wms from ESRI). But only for this single point. Even ...


4

The resampling method 'near' or 'nearest' is generally to be considered only for succinct/classified data, it attempts to assign a cell value based on the closest source pixel: This is most commonly integer (int8, int32, int64) types but can be of type float (float32, float64) where each cell represnts classified values and generally values appear more ...


2

When you use QgsZonalStatistics, the results are are automatically added to the shapefile (look at Problem with calculating QGIS Zonal Statistics MEAN or Estadística zonal con PyQGIS: clase QgsZonalStatistics) vLayer = QgsVectorLayer("a_polygon.shp","a_polygon.shp","ogr") path = "test.tif" zoneStat = QgsZonalStatistics(vLayer, path,"", 1, ...


1

If your projection of your points are the same as the raster then you can just pull the proj4string slot from the raster and assign it to the raster. Reading the data, coercing the csv to a SpatialPointsDataFrame and assigning the projection from the raster, would look something like this (not tested): library(sp) library(raster) r <- ...


0

Not for analysis, but our BI team uses BLOB format to store raster pictures for maps.


2

In ArcGIS you can use batch processing to run the re-projection tool on a large dataset. If it doesn't work on rasters than you can use the model builder to achieve the same thing by using iterators as shown here. QGIS also has a batch processing interface but I haven't used it myself, so I'm not sure how effective that is. Your best bet might be to just ...


-3

There are some new tools located at LIDARWidgets The tools there will batch convert LAS to ArcInfo grids, AutoCAD DXF mesh files, DXF point clouds, or QwtPlot3D viewable meshes. There are also tools that will convert standard XYZ files to the same format mentioned above.


1

I think what you need to do is to clip raster by the polygon, to do that go to Data management toolbox -> Raster tools -> Raster Processing toolbox -> use the Clip tool found in the Analysis toolbox. You have the ability to use the selected features as the clipping extent. If a feature within the feature class is selected, and confirm that Use Input Features ...


1

Did you mean to use the equivalent of Python's log1p instead? (So the inverse function)? I think in Arcgis this is the Ln() function e to the power of 871361.0 is a very large number, and too big to fit in 32bit float, so arc will convert it to nodata. The same thing happens for negative values less than -745, which are too small to represent in a float. ...


2

The next code only select the number 3 band (blue band) in a RGB raster and write it as blueband.tif. from osgeo import gdal, osr import os, struct import numpy as np layer = iface.activeLayer() provider = layer.dataProvider() path = provider.dataSourceUri() fmttypes = {'Byte':'B', 'UInt16':'H', 'Int16':'h', 'UInt32':'I', 'Int32':'i', 'Float32':'f', ...


0

Based on How to reproject raster from 0 360 to -180 180 with cutting 180 meridian, a possible solution using GDAL is: gdalwarp -t_srs WGS84 bluemarble.tif 180.tif -wo SOURCE_EXTRA=1000 --config CENTER_LONG 180


2

I got it: ##RED=raster ##a=number 0.0 ##XXX=output raster import numpy from qgis.analysis import QgsRasterCalculator, QgsRasterCalculatorEntry # Get layer object layer1 = processing.getObject(RED) # Get number number1 = a def xxx (RED,a,output): entries=[] #define raster 1 ("RED") raster1=QgsRasterCalculatorEntry() raster1.ref='RED@1' ...


1

If you download the GDAL source, you'll have the source for gdal_translate.cpp. Just peruse the code and duplicate it in C#. The translation is straight-forward.


0

this would be a great feature. In my dreams, I could also double-click on a raster cell and set its value... SAGA GIS can render cells like this. These instructions are for SAGA GIS 2.2.6 . There have been a few menu changes in recent versions of SAGA, but this is also possible in older versions. Import your raster using Geoprocessing > File > Grid > ...


1

Converting one State Plane to the adjacent system is always on the safe side, unless you need sub-meter accuracy. Alternatively, you can use EPSG:102004 USA_Contiguous_Lambert_Conformal_Conic +proj=lcc +lat_1=33 +lat_2=45 +lat_0=39 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs which is valid for the most of the United States.


0

The number of cores would not cause the crash (it would only make the process slower - also dependent on how good the processors are respectively), the amount of RAM usually causes the crash. I would think that your 4 core computer would also have more RAM on it. You also cannot estimate the exact amount of time it will take, but if you really want to, it ...


0

There may be a few ways to do this and it depends on the specifics. Are you applying this random value to every raster cell? Does the value change for each cell/are random cells chosen for the random number? I would either: Generate a random number using something like the python random module or a random number generator online and then apply it to each ...


1

Why don't you take a sampling approach? Using sampleRandom or sampleRegular with sp = TRUE, you could draw samples from each raster and then just use table. If you used two different sample sizes with sampleRegular you can unalign the sampling grid to revel potential error at representing different scale variation or anisotropy. You could also use spsample ...


0

actually, i worked something out; following the line; rc.d <- disaggregate(ras.coarse,fact=2) do not create any rasters of disagreement or that sort of thing but stack the base raster and the disaggregated raster and extract the raster cell values in the stack as a data frame, and then shrink this new data frame by counting each unique row; st <- ...


1

Since You have ArcGIS, You could make a mosaic dataset with the rasters, and use the mosaic dataset as input to FME. This solution works well for me with large datasets. Ed: ArcGIS has the ability to reproject the mosaic dataset on fly. That means that You have the option of choosing if the reprojection should be done by ArcGIS or FME. With a large ...


2

Can't add image to comment, so I'll add here how I were able to succeed with Jochen Schwarzes help. I tested this with 11 rasters, which went through fine. The result of this reprojection in Arcmap looks good.


5

Agree to the comment of @FelixIP, one possible solution is to first create a whole raster using RasterMosaicker transformer, then reproject and re-tile the Raster with RasterTiler transformer. This can be a ressource consuming approach, if you have many input tiles. Another approach is to apply nodata values with the RasterBandNodataSetter (Value = 0) or ...


0

The National Snow and Ice Data Center has a dataset along these lines. NSIDC Dataset The problem now becomes, how do you convert a .dat into a usable raster. I tried writeRaster but this wont work for me. Any suggestions?


1

Don't use EPSG:2039 for the project CRS. As you can see, I've managed to reproduce your result. Here are possible ways to solve the issue: Set the project CRS to EPSG:3857 (WGS 84 Psuedo Mercator). This is the CRS that the Google satellite imagery is by default. It goes without saying that you should make sure it is defined that way. Setting the CRS to ...


1

The issue is that you are using: r.region map=dem n=32:13:51N s=32:13:34N e=110:56:46W w=110:57:13W and the correct format is: r.region map=dem n=32:13:51N s=32:13:34S e=110:56:46E w=110:57:13W In my particular case, I tried out with: r.region map=palma.blue n=09:30:00N s=09:27:00S w=84:07:30W e=84:07:01E and it works perfectly; as it can be ...


0

There is a much simpler solution to writing code and that is to use the Join Field tool. This is like @FelixIP approach in that it adds a field to the input table and passes over the values. So no need for an export step. This tool can pass over multiple fields and works at all license levels.


0

Most likely your location has a projected coordinate system (meaning coordinates in the format X-Y not Lat/Long). What does g.region -p give you? If that is the case, you can use an online converter such as this one to find the Lat/Long values for the region you want to set. I would have written this as a comment but unfortunately reputation is too low...


2

Your code doesn't work because you're not doing anything in your for loop (except setting a file name). Saving a raster is a bit tedious, afaik. Here is a sample code I gathered from varied sources; I didn't test it, so it might need some adjustments. It relies on the QgsRasterPipe and QgsRasterFileWriter classes. layers = ...


0

It seems that you'd like to create new raster from yours with a column added to it's table. I also don't know how to export raster layer to a new raster. This is why I suggest to create new field in original raster and populate it by matching values from table: import arcpy from arcpy import env env.workspace = "D:/scratch" inFeatures = "InRaster.tif" ...


1

Try something like this: import arcpy Set the workspace to the folder where you have your data arcpy.env.workspace="Path:\to\your\data\" for raster in arcpy.ListRasters(): Create an object storing the st. dev. for the raster file: stdev_object=arcpy.GetRasterProperties_management(raster, "STD") Store the numeric value of st. dev. in the ...


1

I'll give it a go. Begin by loading your raster. rast = arcpy.sa.Raster(pathtorasterfile) Find the mean, standard deviations, minimum and maximum: meanValue = rast.mean std = rast.standardDeviation minR = rast.minimum - .1 #just a little buffer room maxR = rast.maximum + .1 #just a little buffer room Setup the bounds: target = meanValue + (2*std) ...


0

"On the fly" reprojection has caused me huge problems with several raster processes. You might try turning off "on the fly" reprojection and make sure that if you are using multiple grids or any masks that they are in the same projection. On the other hand, this sounds similar to the QGIS raster calculator problem I posted yesterday. Raster calculator ...


1

Load your files into Qgis. ( via add layer - raster ). Merge your rasters with the raster function "Merge" (menue raster). Use the function "Clipper" from the raster menue. Within Clipper you can set the extend to your bounding box coordinates.


0

qgis module has no attribute path, I guess you wanted to do sys.path.insert() So it should be: sys.path.insert(0, 'C:\Program Files\QGIS Essen\apps\qgis\python') Remember to pass your path as a string with " ".


0

Depends, what was the resolution on the dem when you generated it from your contour lines and how much do you trust thoses? Since you can set yourself the resolution and scr of your data (either when you interpolated it OR by resampling the whole thing afterwards) i'd say it all depends on how much you trust the sources you used to create it. From what i ...



Top 50 recent answers are included