gdcc / dataverse-previewers

A collection of Datafile Previewers that can be configured to work with Dataverse
MIT License
5 stars 15 forks source link

added previewer for shp and geotiff #36

Closed schorcht-ioer closed 1 year ago

schorcht-ioer commented 1 year ago

Dear community,

These are previewers for Esri Shapefiles and Geotiffs.

All previewers have a spinner and a file size limit. If the file size limit is exceeded, an error is thrown. Before the file is loaded, the file size is queried first. The file is loaded only when the file size falls below the threshold value (_file_sizelimit).

Esri Shapefiles

Parameters

file_size_limit = 20 [in MB]

For Esri Shapefiles, there is only the file size threshold parameter (_file_sizelimit). If the application should run too slow, it is recommended to reduce this value.

Geotiffs

Parameters

file_size_limit = 15 [in MB]
row_col_limit = 50000 [number of columns or rows]
load_timeout = 30 [in seconds]

With geotiffs it is also possible to define a maximum number of rows and columns (since compressed tiffs can have a small data size but still be too large to view). Since no special mimetype was available for geotiffs (only tiff), an error is thrown in case of missing projection information (or unsupported tiff variants). Also, there is a problem with the geotiff reader used that an error cannot be caught :\ Therefore, a timeout was defined in which the raster should be loaded (if not, an error is thrown).

cheers, martin

qqmyers commented 1 year ago

@schorcht-ioer - can you add information about the hardcoded size/row/time limits that you have here in the pull request to the comments in 5.2curlcommands.md and mention how they can be changed (someone would have to download these previewers locally and edit their local copy rather than using the hosted versions)?

With that change I'll go ahead and merge.

schorcht-ioer commented 1 year ago

ok, @qqmyers , I have added additional information about the limits in 5.2curlcommands.md.