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, geotiff and extended geojson #33

Closed schorcht-ioer closed 1 year ago

schorcht-ioer commented 1 year ago

Dear community,

these are previewers for some geodata formats (Esri Shape files, Geotiffs and an extended version of Geojson).

All previewers have a spinner and a file size limit. If the file size limit is exceeded, an error is thrown.

geotiffs

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).

mimetypes

Apropos mimetpyes, can someone tell me how to customize mimetypes? Because I would like to define mimetypes for zipped gdb (Esri Geodatabase) and geotiffs. Then geotiffs could be distinguished from "normal" tiffs (and maybe *.ovr data could be handled). Also for gdb another previewer could be included.

cheers, martin

pdurbin commented 1 year ago

@schorcht-ioer hi! Just a quick note to say that while I haven't played with your code, I'm excited about the possibilities!

I mentioned your pull request to @atrisovic and @JR-1991 during a NetCDF/geospatial meeting this morning.

I'm not sure if @qqmyers has taken a look yet.

As for your question about mimetypes, I agree it would be better to have something more specific than "contentType":"image/tiff". Maybe we could look here for inspiration:

schorcht-ioer commented 1 year ago

Hi @pdurbin! Thanks for your reply. The discussion about geotiff on opengeospatial is very interesting! We will see how it goes on :)

qqmyers commented 1 year ago

@schorcht-ioer - thanks for the contribution! A few requests for updating the PR:

schorcht-ioer commented 1 year ago

Hi @qqmyers! Thank you for the advice. I will create a new PR for Geotiff and Shp in previewers/betatest folder. As soon as @kaitlinnewson has given her consent, I will create another PR for the existing geojson previewer, or provide an alternative version if necessary.

pdurbin commented 1 year ago

I'm just noting that this was closed in favor of this one:

Thanks, @schorcht-ioer!!