Ticket #241 (assigned Enhancement: null)
Sample Rasters tool should automatically create fields
| Reported by: | jjr8 | Owned by: | jjr8 |
|---|---|---|---|
| Priority: | Medium | Milestone: | Unscheduled |
| Component: | Tools - Spatial Analysis | Version: | 0.5a12 |
| Keywords: | Cc: |
Description
Currently, the Sample Rasters tool requires the user to specify the names of the fields to receive the sampled values (one field for each raster), and that these fields must already exist. The tool would be easier to use if the field names were optional entirely.
It would work like this:
- If no field name was specified, the tool would use the name of the raster as the field name. The tool must be smart enough to coerce the raster name into a legal field name (e.g. shapefiles can only have 10 character field names; certain characters are illegal; the name must not duplicate a previously used name). The tool should issue an informational message to explain this was done.
- If the field does not exist, the tool would create it automatically. It should examine the data type of the raster and create a field with the same data type. The tool should issue an informational message to explain this was done; ideally it should not duplicate the message above.
- If the field does exist, the tool would compare its data type to that of the raster. If the raster data type can be coerced into the field data type with no loss of precision, the tool would do this automatically. If there was a loss of precision the tool would do it anyway, but issue a warning.
Thanks to Pat Iampietro for suggesting this enhancement.
Change History
Note: See
TracTickets for help on using
tickets.
