-
Notifications
You must be signed in to change notification settings - Fork 9
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
Media (MIME) type for GeoTIFF #34
Comments
1- First of all, let's remember that GeoTIFF specification (as of https://trac.osgeo.org/geotiff/ = http://geotiff.maptools.org/spec/geotiffhome.html) is (or was) agnostic of MIME type.
In conclusion, as for rfc3302 MIME type is image, and subtype is tiff, I would recommend to add the recommendation to use the image/tiff MIME type when necessary, in accordance with IANA, and OGC GMLCOV GeoTIFF extension requirement. |
Theoretically, your points may all be valid, but practically there is a need from many developers to know in advance whether a file is a Tiff or a subformat such as GeoTiff or cloud-optimized GeoTiffs. For example, you don't want to download megabytes of data just to realize that you can't display the non-GeoTiff file in your map. GeoJSON and JSON are doing similar things for good reasons so I am wondering why we can't just come up with image/geo+tiff for example. This is completely valid and could be registered with IANA. So I'd vote for this. |
I understand your point. However once again, the existing GeoTIFF standard is agnostic of MIME type, and nothing in the resulting TIFF/GeoTIFF file is carrying the MIME type. |
In addition to my previous comment, you may check https://www.awaresystems.be/imaging/tiff.html which provides an up-to-date register of registered TIFF tags (including GeoTIFF ones). And check that MIME type information is not available in Baseline, Extensiona nd Private TIFF tags |
The GeoTIff shouldn't carry the media type, but still it would be beneficial to have guidance on a GeoTiff media type. Otherwise in practical use the developers will still come up with proprietary media types, several standards did so (STAC, openEO, even OGC WPS 1.0) and many software as well. So if you'd come up with a usable standard then you need to come up with a separate media type. All your points are valid, but are not very helpful in practice as implementations usually don't want to parse files in advance to check for their type. It's very much the same as for JSON and GeoJSON, which have separate media types. |
This guidance on MIME type for GeoTIFF file is to be discussed transversely with other OGC SWGs, such as WCS.SWG (using the plain image/tiff) for GMLCOV GeoTIFF extension, and probably WPS. |
As all encodings standard inside the OGC, there should be a recommendation on MIME type (though this is - of course - not addressed by GeoTIFF 1.0. |
Again, to be able to easily identify GeoTiff files I strongly support a media type different to |
Extrapolating from the "prominent example", you might want to consider that image/geo+tiff means "give me/I offer a GeoTIFF in WGS 84", and continue to use image/tiff for more general GeoTIFF images. It's my understanding that application/geo+json only applies to GeoJSON 4 which restricts coordinates to be in WGS 84. This seems to have been motivated by interoperability issues (intended targets of the standardization commonly did not have access to CRS definition databases and reprojection engines). "For example, you don't want to download megabytes of data just to realize that you can't display the non-GeoTiff file in your map" Yes, and the same thing can happen, albeit less frequently, if your client can't understand the GeoKeys for whatever reason (not set up to handle custom entries, not up to date with some of the EPSG references, etc.) |
I hope that never happens. I consider GeoJSON's lock into WGS84 as a major (and unnecessary) flaw in the spec. I understand their reasoning and intent, but the lock-in seems crazy for the near-future use-cases (as WGS84 will be replaced). A recommendation (best practice) to use WGS84 is fine, but please allow flexibility any spatial standard. And the use of decimal degrees simply doesn't work in so many use-cases (not to mention locking a format on Earth). BTW, as shown here (https://metacpan.org/pod/Geo::JSON::CRS) there are efforts to support CRSs in GeoJSON. Lastly, besides my need to support the planetary domain, there have been papers out warning about a single assumed use-case for WGS84 (note there are 6+ variations of WGS84 too). |
And image/tiff does not work in the cases you describe because Certainly it isn't the "For example, you don't want to download megabytes of data just to realize that you can't display the non-GeoTiff file in your map" rationale when you are talking about non-earth images (since the vast majority of image/geo+tiff images, if that comes to mean tiff with geokeys, would presumably not be usefully displayable with your images of Ganymede). I'm asking for the compelling use case for why image/tiff doesn't work because I don't know what it is not because I think it doesn't exist. You and m-mohr seem to have a better sense for what that is and I want to understand that a little better. Can you clarify? |
That is not a good idea, I agree with @thareUSGS here. Regarding CRS I'd go the way charsets are implemented for text documents on the web. For HTML it would be
For us it's simply: We are creating imagery catalogs and would like to indicate whether TIFF files can be shown on a web map or not. See also: radiantearth/stac-spec#251 and radiantearth/stac-spec#54 There must be a reason why there are so many proprietary GeoTiff media types out there. There are people who need it and I don't know why we should limit to image/tiff if it's easy to just give it a separate sub-type such as
I don't know any file format that actually carries a media type. That's not how media types work. They are added by servers or clients for communication based on file contents or extensions or other sources, for example the GeoKeyDirectoryTag. It's the same for GeoJSON, that doesn't carry the media type itself. It's simply added whenever useful to HTTP requests/responses etc. |
I'm not sure this type of argument is going to get you very far. Never-the-less, I am sympathetic to your struggles. The push back you might be receiving is that on the face of things, your suggestion has a strange smell given that a media type is meant to convey the nature (image) and format (tiff) of the dataset. These aspects are covered fully for GeoTIFF by image/tiff. You are trying to convey something more about the content. You feel that there is something special and critical about georeferencing for geospatial data. Maybe you're right. Not sure. So I suppose you are arguing that TIFF is so flexible in its specification that you need to use it as a structured type name suffix to indicate the specialized schema extension that represents geospatial imagery, similar to application/geo+json (whose specification you disagree with) and image/svg+xml. Perhaps that argument can win the day. Again, not sure.
OK, I'm strangely envisioning a catalog of images indicated by URL whose only other metadata is a flag indicating whether or not it is displayable on a map. No bounding box. No pixel type information. No band count. That's weird to me. Anyhow, I caution you that you have to be more deliberate to achieve your desired outcome. A ModelTiePointTag containing 0, 0, 0, a ModelPixelScaleTag containing 1,-1, 0 and a GTModelTypeGeoKey value of 0 = undefined or unknown is perfectly valid GeoTIFF. And that would not be an unreasonable way for someone to associate geokeys with an unreferenced geospatial image if they thought that advertisement of image/geo+tiff was a good way to indicate their geospatial image holdings (i.e., these TIFFs are not cute pictures of cats). |
Why does it have a strange smell to do what is common sense for formats such as XML, JSON and others? They all have type/something+format media types. Again, I have not figured out why it seems problematic to have a separate type instead of image/tiff?
Whatever it will be, may not be a suffix, but could also be a parameter. So if you are really strongly want to stay with image/tiff, then standardize a parameter so that you can separate Tiff from GeoTiff (OGC WPS once had
Where did you get this from? I don't disagree fully with GeoJSON, just think it has some flaws, but still works for most use cases quite well.
I have never said that, too. Just look at a STAC catalog [json, html] / STAC Item [json, html] and/or the discussion I linked to above, so that you don't need to envision one yourself. |
FYI: The OGC Naming Authority review of the GeoTIFF spec included the comment "Section 8 lists some potential media types for GeoTIFF. application/geotiff should also be considered alongside image/tiff+geo, or image/tiff-geo" |
Since this will be an OGC registered Media Type, we should follow previous OGC practice. Looking at the IANA registry, the pattern is {schema}+{encoding} (ex. GML is gml+xml). So GeoTIFF would be image/geo+tiff. |
thareUSGS apparently ("I consider GeoJSON's lock into WGS84 as a major (and unnecessary) flaw in the spec."). My apologies for attributing it to you.
Agreed. I was telling you what I was envisioning, not what you said. Thank you for the links, though, they were very helpful. I see now that your motivation is to use the mime type in communicating with your clients as a provider of a STAC catalog (not sure if I'm phrasing that right), not necessarily as something to be relied upon from the servers the implementation filling your catalog might be crawling. It is clearer now to me what you are trying to do. So although the image/geo+tiff mime type cmheazel indicates you should soon have at your disposal does NOT necessarily mean
but merely
the other metadata you presumably collect upon harvest will help you protect your clients from accessing an asset that can't be displayed on a web map. |
A couple of observations on this for consideration. In any case, if continuing down the image/geo+tiff road, the OGC may wish to consider a slightly different subtype than "geo" since it is already in use under another type and refers to an entirely different schema. Might be confusing. |
I don't think this is an issue or confusing. The subtypes don't need to be unique as they are bound to the type, i.e. tiff / json. |
Fair enough. |
Thanks to all for contributions and material. Some other common usages
Options for GeoTIFF file MIME type Recommendation any of option 1 or 2 seems acceptable (to me) - TBD |
Even Rouault email (13/06/2019) Inline
Sean Gillies, one of the author of the GeoJSON spec, pointed that IANA would have the final word on this, and would likely pick application/geo+tiff, pointing to https://tools.ietf.org/html/rfc6838#section-4.2.5, for consistency with the application/geo+json precedent. |
SWG + OpenOAB decision (26 June) |
Something like |
If we're going to add parameters to support COG, I'd prefer to see identification of properties: does it have tiles (boolean or maybe what size), and does it have overviews (boolean or maybe what powers). |
@bradh I don't think the GeoTiff spec needs to add anything regarding COG here. But the COG spec can specify its own media type and base it on the GeoTiff media type by adding a parameter. So I don't think there will be parameters in the GeoTiff spec?! |
If there is a need to be descriptive about certain characteristics of GeoTIFF, then the GeoTIFF MIME type could include that - COG is still meant to be valid GeoTIFF, and if you don't care about tiling and/or overviews, you can treat what you have as GeoTIFF. So a (moderate) preference for not treating that variation as a different media type. |
So the COG media type variant would be like
and then the determination of "COGness" would be up to the user, e.g., compression in optional but highly recommended, tile-size should be <= 512 but isn't required to be. The client can then determine from all those properties what actions (like range reads) they want to do. |
I agree with @m-mohr I think it's up to the COG developers to determine this and decide how to extend the media type for their purposes. There's a parallel discussion on the COG list about this right now at https://lists.osgeo.org/pipermail/cog/2019-July/000067.html The most the GeoTIFF SWG should do would be to indicate that specializations of the GeoTIFF format might also extend the media type and that GeoTIFF parsers should not reject media types that contain unknown keys. |
Whether it makes more sense to do it as a "COG thing" or a "SWG thing" depends on whether there is ever likely to be another profile that makes use of this information. If its broader than COG, then describe it here. If it is just COG, describe it in COG, and just facilitate it here. I could well see additional profiles (e.g. NGA likes them, DGIWG seems to do it a lot), so I think having common parameters in the GeoTIFF spec (and MIME registration - IANA isn't going to let everyone go crazy on the OGC's submission) is probably better. |
FYI I sent this suggestion on the cog@lists.osgeo.org back in July I would suggest the usage of the profile link relation the value to be defined (for example it could be https://www.cogeo.org/ ) Further reading at FYI this is already being used by GML |
Did this actually get submitted to IANA? It'd be useful for us in STAC to refer officially somewhere to this. |
Scott
You were supposed to handle the relation with IANA, could you please indicate the progress of this action?
Thanks in advance
Emmanuel
De : Chris Holmes [mailto:notifications@github.com]
Envoyé : jeudi 28 janvier 2021 06:04
À : opengeospatial/geotiff
Cc : Emmanuel Devys; State change
Objet : Re: [opengeospatial/geotiff] Media (MIME) type for GeoTIFF (#34)
SWG + OpenOAB decision (26 June)
Per OAB andGeoTIFF.SWG: Media type = Image/tiff; application=GeoTIFF, develop an RFC in accordance with RFC 3302 and contact IANA.
Did this actually get submitted to IANA? It'd be useful for us in STAC to refer officially somewhere to this.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub<#34 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACDHG2TZRTSIMBNI5PJLCJTS4DV3XANCNFSM4FUUMMXQ>.
|
In short, such a registration with IANA is not possible. Read the IANA response below and consider if we want to apply for a completely new media type. It seems that the process continued in email threads and was not updated on this Issue. We applied to IANA for registration and after significant discussion between us and IANA, we were informed that parameters could not be registered. The IANA response is as follows. "The short answer is no, there is no such thing as a separate media type The long answer is that parameters have to be defined when the media type is As for the so-called sub-parameter registry - a very poor choice of names IMO - In the specific case of image/tiff, modifying the original media type |
The conclusion of this issue that affects GeoTIFF is that image/tiff; application=geotiff is correct with IANA. We can close this issue here. An issue in COG repo was open to discuss about this: opengeospatial/CloudOptimizedGeoTIFF#1 |
I don't understand the conclusion as the message from @joanma747 seems to be in conflict with what @ogcscotts posted: @joanma747 says image/tiff; application=geotiff is fine with IANA Can you clarify? Do we just use image/tiff; application=geotiff without registration? |
https://www.iana.org/assignments/media-types/image/tiff already defines "application" as the ONLY parameter you can use. No other parameter can be added the Media Type without IANA "blessing". This creates a problem for COG where more parameters are needed. My understanding is that @ogcscotts is talking about other than application. |
That makes sense, thanks. |
Yes, and for plain GeoTIFF (not COG), this is what was specified, after some investigation at IANA.
See section 8 I n OGC GeoTIFF 1.1, http://docs.opengeospatial.org/is/19-008r4/19-008r4.html#_media_types_for_geotiff_data_encoding
De : Matthias Mohr ***@***.***
Envoyé : mardi 26 octobre 2021 17:09
À : opengeospatial/geotiff
Cc : Emmanuel Devys; State change
Objet : Re: [opengeospatial/geotiff] Media (MIME) type for GeoTIFF (#34)
That makes sense, thanks.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub<#34 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACDHG2VG7CC6G3SRRZDWFNDUI3HA3ANCNFSM4FUUMMXQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
In metadata and other use-cases, there is a need to specify of which type a file is to allow clients to handle them appropriately. Software implementors came up with different media types to describe GeoTIFFs as a special form of TIFFs:
image/geotiff
I see quite oftenimage/tiff;subtype=geotiff
image/geo+tiff
(similar toapplication/geo+json
)There are probably even more invented media types out there. I think there should be a single media type and it should be discussed already what OGC is heading for to lead implementors in one direction.
Another issue to take into consideration: How to handle sub types like cloud optimized geotiffs? Should that be
image/cogeo+tiff
orimage/cog+geotiff
or ...?The text was updated successfully, but these errors were encountered: