Closed Nightsphere closed 3 years ago
I recommend waiting on this until some of the other Save buttons are added to dialogs. Then circle around and decide whether this will save only table (similar to time series table save) or also allow saving the layer, such as GeoJSON. Can always point the user back to the original file similar to issue 299.
See the TSTool DataTable.writeDelimitedFile
](https://github.com/OpenCDSS/cdss-lib-common-java/blob/master/src/RTi/Util/Table/DataTable.java) method for an example of writing a generic table.
My feedback:
csv
? That would give a connection back to the original data.saveFile
. Maybe need to be more specific such as saveFileCsv
or saveFile.csv
? If we allow saving other file types with different extensions this could be an issue.My feedback:
Download layer data table to csv file
.Colorado Counties
table and the filename was Colorado Counties...csv
, which is cumbersome. I recommend using the geoLayerId
value with .csv
appended. The name
will often be too verbose and have spaces, which makes files more difficult to deal with. A variation on sourcePath
might also be used, but for URLs this is ambiguous. I think geoLayerId
is probably the best option at this time. We could also add attributeTableSaveFile
property in which case attributeTable
is appropriate for map configuration since it is more technical, and it would be equivalent to "data table" that the user sees. This would be a properties
property, not built-in. The default if this property is not found is the geoLayerId
value.properties
properties all being shown?My feedback:
csv
file formatting needs to be updated. Currently all column values are quoted. Only date/time and string value columns should be quoted. The original Java example code handled this.ReadTableFromDelimitedFile
command.The changes have been merged for the formatting, and tested with Excel and TSTool. Closing the issue.
Add a Save button to save the full table (or selected rows, when selected functionality is added) to a file, such as CSV, and maybe Excel file. In this case, the original map layer is not being saved, but the extracted attribute table. If saving to CSV, it is appropriate to replace nulls and
NaN
with spaces.