Questions tagged [function]

A programming function is a type of procedure or routine. Some programming languages make a distinction between a function, which returns a value, and a procedure, which performs some operation but does not return a value.

Filter by
Sorted by
Tagged with
1
vote
1answer
127 views

How do I get the distances to every cell in GRASS?

I have an elevation raster map, a point, a raster map defining the viewshed from that point, and now I want to produce another raster map with the results of a function of the distance between the ...
1
vote
1answer
111 views

CartoDB adjusting the style of the layer toggle function

The layer names are cut off in the toggle layer function. Is it possible to adjsut the font size or the length of the layer function box so text is not cut off?
1
vote
2answers
2k views

Can TextSymbolizer font size be set as a function of the scale?

The standard behaviour when rendering WMS layers is to keep the text size across all scales and then filter out colliding labels so that the text remains readable, although delivering incomplete ...
2
votes
1answer
8k views

Save raster to file when using stack() in R

I'm working on a function for raster package. In the end of the function I have to use stack() to create a RasterStack. When I do this the data source is in memory. I want to have the data source on ...
2
votes
1answer
647 views

Selecting entities based on first character of field being a letter using QGIS?

I would like to select entities whose addresses are incomplete, i.e. the first character is a letter instead of being a number. Does QGIS have an "is numeric" -type function to accomplish this? Not ...
1
vote
0answers
165 views

How to fill a symbolLayer with a custom texture?

I have this code : pLayer is a QgsVectorLayer * QgsFeatureRendererV2 * lrenderer = pLayer->rendererV2(); QList<QgsSymbolV2 *> lSymbols = lrenderer->symbols(); QgsSymbolLayerV2 * ...
2
votes
0answers
178 views

Application of a Piecewise Logistic Function to Extract Seasonality Metrics

I am working with 16-day MODIS EVI (satellite) data and I want to fit a Piecewise Logistic Function through my 23 EVI data values. The following formula is for the Piecewise Logistic Function: y(t)= [...
2
votes
1answer
174 views

Calculate mean for a each object of SpatialPointsDataFrame

I have a list with several SpatialPointsDataFrame objects, and each object has certain slots. How can I calculate the mean value of a certain slot for every object in the list, and then save that ...
0
votes
0answers
260 views

Problem in running r.slope.aspect in GRASS

I am new to GRASS GIS, and have been trying to use the r.slope.aspect function to find out the slope, dx and dy rater map from an elevation map(512*512)[1]. But I am getting the following output: ||...
0
votes
1answer
111 views

Loop through table, look for word in text field, set boolean true if word exists

I want to create a function that loops through a table and checks if a specific word exists in a text field. If it does, the function should set a Boolean field true. This is what I've come up with. I ...
0
votes
1answer
466 views

Using Python function in ArcPy script?

I have an script to transform DN into Reflectance of each band of several images. The unique variable of the equation, apart of the Band itself, is the Divisor: (B1 - 1) / 508 (B2 - 1) / 254 (B3 - ...
4
votes
1answer
919 views

Reading and plotting shapefiles with a custom function in R?

I have this piece of code that want to turn into a function r <- readShapeSpatial("roads") b <- readShapeSpatial("buildings") lc <- readShapeSpatial("landcover.shp") here is the preparation ...