Tag Info

New answers tagged

4

you can make some computation using the report designer. Open a report in the Report Designer. From the Design Elements list, click TextBox and drag the element into position on the report layout. Enter an expression in the Data Field area in the Element Properties grid. Expressions always begin with an equals (=) sign In you case, the ...


0

Solved this using a combination of everyone's suggestions: Code Block - rec=0 def autoIncrement(): global rec pStart = 1 #adjust start value, if req'd pInterval = 1 #adjust interval value, if req'd if (rec == 0): rec = pStart else: rec = rec + pInterval return str(rec).zfill(3) In the Field Expression - 'Object' + str(autoIncrement())


1

We can adjust the Field Calculator Code Block to achieve the effect you are looking for. The following assumes that your target field is a Text Field, and has enough length to hold the value produced by the Field Calculation. For example, if we want to prefix our incremental count with the word "Object": Expression: autoIncrement("Object") Expression Type: ...


4

Excellent answers provided by @ChrisW and @CAccesible, both describe techniques which should do what you want. Just to add on what @ChrisW mentioned, a spatial join tool called Join by location would provide your points layer with another attribute column containing the names of the polygon it resides in, regardless of how many points there are in a polygon. ...


0

Using two string functions in the QGIS calculator on version 2.6 Mac OS X I was able to accomplish this. Here are the steps: Using the field calculator create a new field that is a string type with a relevant width. Run the following expression to set the value of the field: concat( format_number( "Field_name" , 0) , '\'') This created a column with a ...


1

In QGIS, the function "format_number" under the string menu in field calculator reformats numbers to locale specific separators and decimal places.


1

Is there more than one point in any given polygon? That relationship will affect available methods. A simple Intersect will get the polygon names on the points, regardless of the number of points in a polygon. To get the point attributes on the polygons will likely require a Spatial Join. If there is more than one point in a polygon, you have to decide ...


1

SAGA GEOALGORITHMS>SHAPES-POINTS> Add polygon attributes to point With this tool you must select the points.shp, the polygon.shp and the attribute (column) that you want to extract to the points.shp. Hope this may help you.


3

In QGIS there is a toolbox, you will need to open this. Go to Processing menu and select toolbox. It is really good to have a unique attribute on the polygons to allow attribute joining at the last step, to do this if you don't already have one, add a field and field calculate to $rownum: To convert polyogns to centroids use the polygon centroids tool: ...


1

As the comment notes to transfer data between datasets cleanly you need a one to one relationship which you'll have to evaluate the best geoprocessing method (ie clip/join/etc) once you have that figured out the best method will likely be converting whichever dataset you want to sample from using zonal statistics to extract the value from the raster into the ...



Top 50 recent answers are included