New answers tagged

1

This is an ongoing problem, and has been for over a decade. A simple solution might be to include "attribute table" within the "Windows" drop-down menu in ArcMap. It is not uncommon for users to not have Admin rights, so editing the registry is not a viable solution. Similarly, for users who migrate between multiple work stations (some with multiple monitors,...


1

With a virtual layer, you can tricky make another table. The following query is for 4 fields, adjust-it as you want : WITH t1(c1, c2, c3, c4) AS ( -- add as much as you want of field aliases SELECT ID, FIELD_NAME1, FIELD_NAME2, FIELD_NAME3 -- list here all the fields you want FROM YOUR_LAYER -- change with your layer name ) SELECT c1 AS "My Pretty ...


5

No way to pivot the inserted attribute table as of version 3.10. You would have to do it in a label. Simply just with the values: Or if you need to maintain a table like look you can use HTML: HTML table: https://www.w3schools.com/html/html_tables.asp


0

Assuming that you have one point layer for the poles and one for the houses, you should be able to get this done using the NNJoin plugin (If your QGIS version is recent you can also use the Join attributes by nearest algorithm). 1) Use NNJoinJoin, with your line layer as Input vector layer, the pole layer as Join vector layer and pole_ as Join prefix. The ...


3

You can use replace replace("path",'C:/Users/Adam/Desktop','D:/GIS')


6

Turn off Qualified Field Names before joining. arcpy.env.qualifiedFieldNames = False Tools that honor the Qualified Field Names environment use this setting to distinguish between qualified or unqualified field names. Qualified field names are the names of fields in a feature class or table that have the name of the origin feature class or table ...


1

You are asking just the case that is given as an example of the regexp_substr() function: regexp_substr("Name", '(\\d+)') About your second question: You can create a Regular Expression to group each first, second and "third" word (the "third" word will be all that follows the second space), and put each group in a matrix, with a regexp_matches() funtion....


2

You're able to display not the original column but a virtual field based on your original colum and then use something like the following : round(my_column[,places=0])


0

I have created a work around with this issue. I think it will be beneficial to others trying to establish an open data site through hub. In Model Builder I have brought in each feature class that I plan to put on our Open Data Site. Each layer I have ran 'feature class to feature class' and created a new FGDB that this will populate. The model will also ...


2

This solution works using the Attribute Editor, but does not work through the Attribute Table. Select the records you want to update to NULL Open the Attribute Editor from the Editor toolbar If you have more than one feature you want to update, select the top row (this makes any attributes you edit update all selected records) In the field you want to ...


1

You could replace any empty strings with another string from the field calculator. Using python, where STATE_NAME is the field: !STATE_NAME!.replace("", "thisisareplacement") If you mean Null not as a string you could try using a codeblock: def replace(x): if x =="": return None else: return x Under field, replace(!STATE_NAME!) Beyond ...


1

I've sorted this out using a different method. I saved my dataset into a Geopackage, and has automatically created a fid field. Row 1 now has 1 in the fid field such as in the picture below:


2

you could use a plugin for auto updating the color field, then use an expression that evaluates your 'type' field values and returns the colors. ie. this plugin http://plugins.qgis.org/plugins/AutoFields/ and the expression on the 'color' field could be something like: CASE WHEN "type" = 'long' THEN 'red' WHEN "type" = 'short' THEN 'white' ELSE '...


4

I totally agree that a good start is crucial for successful working with QGIS. First of all, select your line layer in the layer tree: Then you can either: use the Identify tool ...and click on your desired line. It will turn red, and a window with the features attributes (ok, few in this example...) appears: with one of the Select features tools you ...


1

DXF doesn't have attributes as such. You can save some information is some specific fields that will be kept in the DXF. For example a "layer" field will be kept. So if you rename the attribute you want to keep to "layer" then export the dxf, then that will be saved. If you want attributes you shouldn't be using a CAD format. You can read a bit more on ...


2

Use the "Sample Raster Values" QGIS Processing Algorithm. The help for the tool states: Sample raster values This algorithm creates a new vector layer with the same attributes of the input layer and the raster values corresponding on the point location. If the raster layer has more than one band, all the band values are sampled. ...


1

If you are in an attribute table in print layout then you can use the Expression editor (Epsilon button by the new row) and use the round function round("no2", 2) Where "no2" is the name of the attribute you would like to use.


3

Given decimal values in a double precision column (or other), you can use an expression to: multiply the value by 100 round the value to 0 decimal places concatenate the % sign at the end of the value In a label expression, this is what I would do: (my percent column is called "rating") round(("rating"*100), 0) || '%' I use the label expression rather ...


2

To concat two strings you can use '||'. So the expression would look like this: to_string("column with numbers to be changed in percentage" ) || '%'


3

you need to use to_string expression, when use numbers in concat, like this: concat(to_string("column with numbers to be changed in percentage"), ' %') I hope, this will be helpful for you. Results:


2

The following script writes all fields from vector layers into a CSV file. Perhaps you have to make some changes, it is just a quick idea how to start: import csv group = QgsProject.instance().layerTreeRoot().children() layers = [ item.layer() for item in group ] #list of all layers for layer in layers: if layer.type()==0: #check if layertype is vector ...


1

Open the attribute table. Right click the column headings in the attribute table. Select "Organize columns" in drop down menu. Then, just drag the heading to the position you want it to be in (See image of the "organize table columns" box below). Click OK. Headings should have rearranged the way you want it to be arranged in the attribute table.


0

If you want to keep the 10 largest polygons, I'd recommend executing a SQL sentence on your original data source and then copying the result to a new data source. import ogr ds = ogr.Open('some_file.shp') lyr = ds.GetLayer() name = lyr.GetName() n = 10 # features to keep sql = f'SELECT * FROM {name} ORDER BY OGR_GEOM_AREA DESC LIMIT {n}' # this query ...


Top 50 recent answers are included