New answers tagged

0

I have done it this way: UPDATE data_tiled t SET raw_data = f.raw_data_tile FROM ( SELECT data_time, data_type, ST_Tile(raw_data, 250, 250) As raw_data_tile FROM data_full WHERE data_time = '2015-12-06 00:00:00' AND data_type = 'a' ) as f WHERE t.data_time = f.data_time AND t.data_type = f.data_type AND ST_UpperLeftX(t.raw_data) = ...


1

At first, as you did not tell, you want to create a raster form the points. A similar question about this can be found here: How can I create an DEM from Point-Data Second, I think there are tools in grass, callable from qgis, to make a depressionless dem, like the r.fill.dir tool. Other GIS-people tend to use saga gis functions, as described here: ...


1

Once you did your analysis you can Copy your output with arcpy.CopyRaster_management. Where you can specify bit depth through the pixel_type arg. For example - arcpy.CopyRaster_management("inrast","outrast","","","-9999", "","","8_BIT") You can then delete the earlier output to cleanup.


2

I don't do a lot of raster work with FME so this might not be entirely correct, but these are the general steps I would use: Use a RasterResampler to change the Cell Sizing of Raster B. You could extract this from Raster A first and feed it into the X/Y spacing. Or, just type it in manually if you know it. Feed the results of the above along with Raster ...


2

PDAL can do this for you, and the easiest way to use PDAL is to install Docker Toolbox and then follow the PDAL Docker Tutorial to verify you have the basics working. Once you're confident things are good, run the following command on the data: docker run -v //c/Users/Howard:/data \ pdal/master \ pdal translate //data/point_cloud_classified.las ...


3

Extend both the rasters and the weights to grids covering the entire area of analysis. It is essential that every NoData raster value be converted to a numeric value and that the weight in its NoData region be set to zero. These operations are best performed with Con and IsNull operations. The weighted mean is then computed exactly as in the question: it ...


1

Depending on the size of your area you could convert your contour lines into polygons and then colour them using a patterned fill. This might be very slow on a large area with lots of contours. I've tested it using a simple fill on a small area: Because the polygons will overlap each other you would have to use symbol levels to stack them correctly (See ...


0

I recreated your query to see where it goes wrong. The last error you came across is because of the faulty reference of px instead of geom (partly my mistake because I gave the hint of aliasing with geom) but there would likely have been more errors after that. Here's the query I created out of it, as you can see the sensordata has been replaced with just ...


2

A solution, only for display purpose: change the the style of your boundary box to "Inverted polygons" (top left box in Properties > Style), then change the color of the box to white or whatever, without transparency. Note that it won't make QGIS display your area faster, since all of your raster will still be rendered "behind" the bounding box.


2

You have to change 2 things in your query: add an alias 'geom' right after 1, 1, NULL))


3

Raster data does not have an attribute table. Shapefiles (vector layers) have attribute tables. If you want to transform a raster file to a shapefile you can use the function "vectorize" in QGIS. If you are interested in questions like "which value is represented how often" then you need "Zonal Statistics" or do some raster calculations. (both of them you ...


0

Here are two approaches to compute correlation coefficients with Raster objects (notwithstanding the comments on your question about utility; that I concur with). # generate some data library(raster) set.seed(89) b <- brick(system.file("external/rlogo.grd", package="raster")) d[] <- runif(ncell(b)*nlayers(b)) s <- stack(b[[1:2]], d[[1:2]], b[[3]], ...


1

The solution to the problem is to use the RGB rendering by setting the property below. rle2.Force2RGB = true; For some reason the exported raster file has to be RGB. The second thing - once I imported the produced raster to ArcMap the colors where wrong. This is because ArcMap applies some default renderer properties to the raster. To overcome this ...


2

I have tried an equivalent syntax for my raster (200 x 200 and random values between 1 and 102): "random_raster@1" = 1 OR "random_raster@1" = 42 OR "random_raster@1" = 102 and it works; as it could be see at the next image ('Zoom In' in a reduced area of output raster out3.tif to verify, with 'Value Tool' plugin, the values obtained). In your case, it ...


0

I've come up with a solution which works: SELECT x.bufid, (ST_SummaryStatsAgg(x.intersectx,1,true)).* FROM (SELECT bufid, ST_Intersection(rast,1,ST_AsRaster(geom, rast),1) as intersectx FROM rasttable, buftable WHERE ST_Intersects(geom, rast)) as x WHERE x.intersectx IS NOT NULL GROUP BY bufid I think the issue was with the ...


1

I'm not an Arc user, but the function you're interested is a statistics calculator for your raster file. Depending on the output you need, you could either use an ArcMap/Catalog tool to view a histogram of your raster data, or you could perform some functions to export several statistical fields determined from your raster. The ArcGIS website has several ...


0

You may want to look at ArcScan: ArcScan provides tools that allow you to convert scanned images into vector-based feature layers. The process of converting raster data to vector features is known as vectorization. Vectorization can be performed manually by interactively tracing raster cells or automatically using the automatic mode. The ...


3

Hm, I don't really see the problem. overlay works just fine on my machine. Here's the code. # (Q)=AnnPrec/[(Tmax+Tmin)*(Tmax-Tmin)]*1000 Q <- overlay(AnnPrec, Tmax, Tmin, fun = function(x, y, z) { x / ((y + z) * (y - z)) * 1000 }, filename = "q", overwrite = TRUE) And here's the resulting image including the range of values. range(Q[], na.rm = TRUE) ...


2

Your goal/question is a bit vague but as long as the mis-alignment is on the order of cm and not meters use @jbchurchill's answer. His method might be easier for you. However it will incorporate a systematic shift in your final result. Given the resolution of the DEM (30 meters) a shift of centimeters or (perhaps) even a few meters may not be important to ...


3

If the raster has the right cell values but is just off in the alignment I would ... convert the raster to a point file go into an edit session and move the points so they line up in the center of the fishnet do a spatial join to assign the values from the point layer to the (polygon) fishnet convert the fishnet to a raster. Another thing to consider if ...


1

I solved this via ENVI using the Seamless Mosaic tool. The specific field within the tool was "Data Value Ignored" which I input the null value (0) from my dataset.


5

There are 2 main reasons why a two raster with the same extent and the same pixel size have different size : 1) the pixel depth 2) the compression in your case, dividing by 2 might produce a float while your input is integer (e.g. unsigned 8bit). Furthermore, the input could be compressed while the output is not. For full control on the output type, you ...


2

Add all your imagery to one Map Document. ( I have used Mosaic Datasets in this image - but there will be no difference in how your imagery acts in this process) Share your Map Document to your Server via File>Share As>Service. Setup all the requirements in terms of name, location, settings and cache. - Wait for the cache to complete and then ...


1

Try this version (modified from gene's response): vl = QgsVectorLayer("Point?crs=", "temporary_points2", "memory") vl.dataProvider().addAttributes([ QgsField("X_coord", QVariant.Int), QgsField("Y_coord", QVariant.Int), QgsField("Azimuth", QVariant.Int) ]) new_features = [] for row in range(0,rows): for col in range(0,cols): rspnt = ...


2

I am curious as to why you are not approaching this problem using a point pattern analysis? It is apparent that you are after a multiscale comparision but, it is not clear as to what end or what type of supported inference would be made. The type of standardization that your are attempting is hinting that a PPA would be a more supported methodology. ...


3

If you have ERDAS, this will work Black edge (NoData pixels) in Landsat 8 color correction in ERDAS For ENVI, you should be able to do that. My currently job I don't have here with me but I have use that software in the past with NRCS. If I remember correctly, there is a wizard that can allow you to use to perform it but since you are not experience with ...


2

It depends it your image has nodata (or null) value set up correctly. If you look at the image properties in ArcMap, in the Source tab a NoData Value should be defined. If your NoData Value is not defined, try the "set null" command, where you can have cells converted to null acording to some query rule. But be aware that this tool will be applied to the ...


2

The problem probably could be here: . . . out_rst.SetGeoTransform(g_x_min, g_pixelWidth, 0, g_y_max, 0, -g_pixelHeight) . . . because 'SetGeoTransform' method needs a list as parameter. Try out this: . . . out_rst.SetGeoTransform( [ g_x_min, g_pixelWidth, 0, g_y_max, 0, -g_pixelHeight ] ) . . . I hope that it helps Editing Note: I tried to ...


0

This is just my thoughts as I think about the problem. Unless you are georeferencing to a very high level of accuracy (I don't just mean zooming really far into ArcMap because even your GPS co-ordinates will have error etc), in order to fit that extra point on the co-linear line the data will be warped by a more complex algorithm that can't fit exactly ...


1

Script it with ArcPy! You can create a script which loops through the gdb and publishes each raster it finds. Here is an example of a update feature service on AGOL script which you can edit for your needs. https://blogs.esri.com/esri/arcgis/2013/04/23/updating-arcgis-com-hosted-feature-services-with-python/ You can find more information over here: ...


1

If you want to stick with spplot, you could e.g. use layer from latticeExtra to add 'Spatial*' objects to an existing plot. Based on the code provided by @Spacedman, this would look as follows. ## load package library(latticeExtra) ## plot raster and add polygons spplot(r, scales = list(draw = TRUE), col.regions = terrain.colors(100), at = seq(0, ...


1

The reason for this mosaiked appearance is that each single image is drawn with gray scale stretched from image min to image max, and NOT across the global min/max. When you merge all images into one, well, there is only one min/max. Same is true for VRT, since VRT treats all images as one (when you have a look into the VRT file you will see the common ...


0

Perhaps this topic might help: Transferring large raster datasets where it describes breaking the a large raster image into volumes using the following command: sdeexport –X option creates volumes Although you may have to note the following passage (quoted from link) in terms of creating temporary storage: The sdeexport command requires a large amount ...


3

It's been most of a decade since storing rasters inside an ArcSDE-enabled database was best practice, but if your geodatabase is old enough (though not too old), there may be a simple solution: The sde2raster and raster2sde utilities of se_toolkit were written for exactly this purpose. To export an image, use sde2raster -o export with the split=... option ...


2

Copy the images to an external disk drive and send it via DHL.


3

You can do this quite easily with base graphics, I don't see a real need for spplot or ggplot: Sample data: Spain and a random raster: require(raster) es = getData("GADM", country="ESP",level=1) es =es[-14,] # drop canary islands r = raster(extent(es),ncol=200,nrow=200) r[]=runif(200*200) Plot the raster and add the polygons - the alternative clips the ...


1

You can pass a simple function, using "which" to return the desired julian day index, to the raster "calc" or "overlay" function. This will return a single raster layer with the first julian day of rain. He we create some example data that approximates your problem with 20 raster layers in the stack. library(raster) r <- raster( xmn=10, xmx=21, ymn=6, ...


2

There is 6.25km ice concentration data from passive microwave remote sensing in two parts: 2002-2011 http://icdc.zmaw.de/1/daten/cryosphere/seaiceconcentration-asi-amsre.html 2012- present http://www.iup.uni-bremen.de:8084/amsr2/ Also, there is 25km data from NSIDC since 1978, with very few gaps Archived: http://nsidc.org/data/nsidc-0051.html Near ...


1

The result, however it happens to be stored or presented to you, evidently will be the equivalent of one raster for each class: a raster showing the counts of type "A", another showing the counts of type "B", and so on. Compute these count grids by taking focal statistics of the indicator grids. Recall that the indicator for any class is a grid having ones ...


0

I was having the same issue with the package installed following the Kyngchaos website. I installed GIS 2.8 via Homebrew following this tutorial and now I'm able to import GeoTiff files. Summary of the installation process: brew install postgresql brew install python export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH pip install numpy ...


2

No, do not load the imagery into PostGIS. You want to load the image catalogue into PostGIS and use the JDBC image mosaicking support in GeoServer to read the mosaics using the database catalogue. That was you can easily update which images participate in your mosaics via the catalogue in the database, while not incurring the performance penalties of storing ...


1

zonalstats = qgis.analysis.QgsZonalStatistics(vectorlayer,rasterfile) zonalstats.calculateStatistics(None) calculates by default just Count, Sum and Mean (as you can tell from Raster -> Zonal Statistics in QGIS Desktop, it can do a lot more). If you, for instance, want to compute just the Mean you have to use: zonalstats = ...


4

Sounds like ArcMap is applying a "Stretch" to your images. In your raster layer properties, on the symbology tab, try adjusting through the Stretch drop-down options until you find one that looks right. I suspect turning off the Stretch altogether (select None) will give you the closest to what you see in MapWindow. You may also be able to apply ...


3

Taking multiple questions out of order: The size of a raster is just the product of bit-depth/8, bands, rows, and columns plus header metadata (statistics, etc.) 32/8 x 1 x 32225 x 13417 = 173079300 bytes ~= 1710Mb 8/8 x 1 x 32225 x 13417 = 43269825 bytes ~= 438Mb ArcGIS does not report the compressed file size. Compression tools are very sensitive ...


4

1) If your pnt shapefile has only one element, use the iterator method next(): feat = pnt.getFeatures().next() pntxy = feat.geometry().asPoint() If the shapefile has many elements, use list comprehensions pntxy = [feat.geometry().asPoint() for feat in pnt.getFeatures()] # select pntxy[0] or pntxy[1] or... 2) instead of GDAL, why don't you use directly ...


1

GRASS GIS has made it very easy to calculate both spatial as well as temporal descriptive statistical summaries. To get the statistical summaries such as mean, median, standard deviation etc. for each raster layer saved within GRASS t.ras one can use t.rast.univar This function creates statistical summaries for each of the layer. By checking the advance ...


0

One solution would be to convert each of your polygons to rasters. Then take the portion of cell counts in each landcover class by the total cell count from the clip. Here is an example function: PortionClassInPoly <- function(MySingleShape, MainRaster) { # Start with one shape from your list # Rasterize this shape according to the ...


0

This may not be sufficient, but to compute the density of cells that are '1' you can do x <- extract(r, line2_buff) y <- sapply(x, table) density: y[2]/y[1]


2

I want to step back to your original intend of combining rasters. When you have both rasters loaded, then open Raster -> Raster Calculator from the menu. In the next dialog you will see a list of currently available raster dataset. You can define an algebraic formula by simple clicking of raster bands from the upper left list, and operators. In the example ...


9

You could try merging the rasters into one: From the toolbar: Raster > Miscellaneous> Merge From the Processing Toolbox: GDAL/OGR > Miscellaneous > Merge From the GDAL console: gdal_merge.py -o merged.tif input1.tif input2.tif Or build a virtual raster: Raster > Miscellaneous> Build Virtual Raster



Top 50 recent answers are included