-
Notifications
You must be signed in to change notification settings - Fork 302
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
feature: Add Cloud Optimized GeoTIFF (COG) sample #2250
Conversation
We only support COG that are generated throught this command : gdal_translate input.tif output.tif -of COG -co COMPRESS=LZW This means that we need a geotiff (with CRS) and we only support LZW compression for now. This shouldn't be too hard to support other compression like JPEG (with YUV data) or deflate.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi and thanks for this PR! =)
In my opinion, this is a must-have feature so it is pretty nice to have started an implementation! I think we will let it as plug-in for now and integrate it in core itowns when the implementation will be mature enough.
I have a number of comments on this PR and found a number of datasets on OpenArialMaps. A lot of them failed to load since they have mask channels however!
00b8399
to
ef4d528
Compare
ef4d528
to
cb1f661
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Desplandis I apply your code review, can you check if everything is good for you ?
examples/js/plugins/COGSource.js
Outdated
this.noData = (source.noData !== undefined) ? source.noData : this.firstImage.getGDALNoData(); | ||
this.dataType = this.selectDataType(this.firstImage.getSampleFormat(), this.firstImage.getBitsPerSample()); | ||
|
||
this.channels = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed. Actually we ignore channels to prevent some bugs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok to me!
* feature: Add Cloud Optimized GeoTIFF (COG) sample * fix(cog): Fix geotiff link * refactor(COG): Apply code review * fix(COG): Use readRGB instead readRasters --------- Co-authored-by: Kevin ETOURNEAU <kevin.etourneau@sogelink.com>
Description
We need to display Cloud Optimized GeoTIFF (COG) with iTowns.
A pull request already exist about COG but it seems to be abandoned.
We tried to used PR but we got some trouble with UTIF library to parse COG.
We think geotiff is a better library to parse COG.
Motivation and Context
We need to display heavy georeferenced tif file (geotiff) which come from CAD software.
We think the best solution is to convert geotiff to COG and display it with iTowns.
Maybe it can help this discussion ?
We will change the sample url if this PR on itowns data is accepted (or maybe we don't need to change the sample url ?).