Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a feature to calculate field values in attribut tables #10302

Closed
qgib opened this issue Aug 21, 2006 · 17 comments
Closed

Add a feature to calculate field values in attribut tables #10302

qgib opened this issue Aug 21, 2006 · 17 comments
Labels
Data Provider Related to specific vector, raster or mesh data providers Feature Request
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Aug 21, 2006

Author Name: Redmine Admin (Redmine Admin)
Original Redmine Issue: 243

Redmine category:data_provider
Assignee: Gary Sherman


Add a feature to calculate field values in attribut tables


@qgib
Copy link
Contributor Author

qgib commented Aug 21, 2006

Author Name: Gavin Macaulay - (Gavin Macaulay -)


Can you provide some more details on what you mean?

@qgib
Copy link
Contributor Author

qgib commented Aug 21, 2006

Author Name: Redmine Admin (Redmine Admin)


Often I need to calculate new field values based on existing layer attribute table fields. For this issue it would be great if I do have a field calculator. Think about the following situation:

  1. open layer attribute table.
  2. start digitizing.
  3. add a new field NEWFIELD to the opened attribute table if you don't like to overwrite existing table field values.
  4. select the field you want to calculate values for. In our case NEWFIELD.
  5. open the field calculator. (Opening the field calculator via button like the add field button).
  6. select a math function to calculate the NEWFIELD value. p.e. NEWFIELD = sin(EXISTINGFIELD1) + cos(EXISTINGFIELD2)
  7. stop digitizing.

Please let me know whether my details do explain my idea.

@qgib
Copy link
Contributor Author

qgib commented Jul 21, 2007

Author Name: Tim Sutton (Tim Sutton)


Changed to minor under the following scheme:

  • blocker - bugs that should block the release. Since we are going to release pretty much 'come what may' I would like no bugs
  • allocated to this category without consultation with me and / or PSC
  • critical - bugs that cause the application to crash or corrupt data
  • major - application features that do not function at all
  • minor - features that function but imerfectly e.g. labels placing incorrectly
  • trivial - gui useability issues or small issues with the documentation, install notes etc.

@qgib
Copy link
Contributor Author

qgib commented Feb 12, 2008

Author Name: Paolo Cavallini (@pcav)


Looks like you want to reimplement a spreadsheet within QGIS? This can be done eg in OOo, the issue could be how to recall a spreadsheet easily (single-click) from QGIS?

@qgib
Copy link
Contributor Author

qgib commented Feb 12, 2008

Author Name: Horst Düster (@hdus)


Replying to [comment:5 pcav]:

Looks like you want to reimplement a spreadsheet within QGIS? This can be done eg in OOo, the issue could be how to recall a spreadsheet easily (single-click) from QGIS?

It's not the idea to reimplement a spreadsheet! But it is very helpful to calculate new column values. P.e. for Classification of objects. The first part of my request, add a new column, is realised (PostGIS Layer)

@qgib
Copy link
Contributor Author

qgib commented Jul 3, 2008

Author Name: cdavilam - (cdavilam -)


Replying to [comment:5 pcav]:

Looks like you want to reimplement a spreadsheet within QGIS? This can be done eg in OOo, the issue could be how to recall a spreadsheet easily (single-click) from QGIS?

Although it can be done in a spreadsheet, it would be very useful enabling it within QGIS. Otherwise it's necessary to remove the layer/close project->open dbf in OOo->edit and save->reload in QGIS/reopen project->rearrange simbology (if you don't have it saved), which is a very annoying process.

@qgib
Copy link
Contributor Author

qgib commented Jul 3, 2008

Author Name: Paolo Cavallini (@pcav)


Isn't this implemented as a python plugin? Should we close this?

@qgib
Copy link
Contributor Author

qgib commented Jul 3, 2008

Author Name: Horst Düster (@hdus)


Replying to [comment:9 pcav]:

Isn't this implemented as a python plugin? Should we close this?
Which plugin do you mean?

@qgib
Copy link
Contributor Author

qgib commented Jan 31, 2009

Author Name: Paolo Cavallini (@pcav)


Table Manager, by Borys. Please check whether it has the functions you need.

@qgib
Copy link
Contributor Author

qgib commented Jan 31, 2009

Author Name: cdavilam - (cdavilam -)


No, it has a Calculate button, but currently not functional (to be implemented...)

@qgib
Copy link
Contributor Author

qgib commented Jan 31, 2009

Author Name: Borys Jurgiel (@borysiasty)


Exactly. It's on very hign position on my TODO list, but I haven't touch it yet. I'll do my best to implement it in February.

@qgib
Copy link
Contributor Author

qgib commented Jul 10, 2009

Author Name: Giovanni Manghi (@gioman)


I would like also to see this feature implemented, not only because I think is useful, but also because -the missing of this tool- is one of that things that (other software) users do notice when using for the first time QGis.

@qgib
Copy link
Contributor Author

qgib commented Jul 10, 2009

Author Name: Horst Düster (@hdus)


Replying to [comment:14 lutra]:

I would like also to see this feature implemented, not only because I think is useful, but also because -the missing of this tool- is one of that things that (other software) users do notice when using for the first time QGis.

+1

@qgib
Copy link
Contributor Author

qgib commented Jul 10, 2009

Author Name: Martin Dobias (@wonder-sk)


What operations and functions should such field calculator support?

@qgib
Copy link
Contributor Author

qgib commented Jul 10, 2009

Author Name: Giovanni Manghi (@gioman)


Replying to [comment:16 wonder]:

What operations and functions should such field calculator support?

I know that make comparisons it is always bad, but (if you want to stay out of the arc* playground) I would suggest to have a look at the "field calculator" of gvSIG. It has many commands, every one has his own short description, so you may want to have a look to the program (I cannot find references of all the commands, not even in the manual, pag. 220 [ftp://downloads.gvsig.org/gva/descargas/manuales/gvSIG-1_1-man-v1-en.pdf here]).

See the attached image.

Among the others you can calculate areas, perimeters and lenghts without having to create a new shapefile like ftools requires.

Command list:

ABS 
ACOS
AREA
ASIN
ATAN
CEIL
COS
< >
/
E
==
EXP
<=
<
LOG
MAX
MIN
-
>=
>
PERIMETER
PI
+
POW
RANDOM
ROUND
SIN
SSQRT
TAN
*
TODEGREES
TONUMBER
TORADIANS
TOSTRING


@qgib
Copy link
Contributor Author

qgib commented Jul 10, 2009

Author Name: Marco Hugentobler (@mhugent)


Note: a field calculator is on my (implementation) roadmap for this summer.

Marco

@qgib
Copy link
Contributor Author

qgib commented Sep 30, 2009

Author Name: Marco Hugentobler (@mhugent)


A field calculator is available from
59a486b (SVN r11736) on (more operators will follow)

Marco


  • status_id was changed from Open to Closed
  • resolution was changed from to fixed

@qgib qgib added Feature Request Data Provider Related to specific vector, raster or mesh data providers labels May 24, 2019
@qgib qgib added this to the Version 1.4.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data Provider Related to specific vector, raster or mesh data providers Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant