opengeospatial / 2D-Tile-Matrix-Set

OGC 2D Tile Matrix Set & TileSet Metadata standard
https://www.ogc.org/standards/tms
Apache License 2.0
8 stars 10 forks source link

TileMatrixSet issues #7

Closed jerstlouis closed 3 years ago

jerstlouis commented 4 years ago
  1. E.3.2 -- what is normally "tileMatrix" : [ ... ] elsewhere, here is "tileHeight" : [ ]

  2. In the JSON schema for WorldCRS84QuadVariableWidth.json , this defines a nice variable width matrix set, but the identifier is "WorldCRS84Quad". Shouldn't this be "WorldCRS84QuadVariable" or something else?

  3. The JSON examples in the document use the fancy quotes, so if one copy-pastes an example, it will not be valid JSON.

  4. "tileMatrix" is a property that defines an array of multiple TileMatrices. We've been using "tileMatrices" for a while on our service and I thought we had reached an agreement to use the plural form. It would be nice to standardize on how to define such a property with multiplicity... I think the standard approach for JSON schemas should be in XML corresponding to "tileMatrices" : [ { "type" : TileMatrix", ... } ] in JSON

    If I do tileMatrix = something, I expect to be defining ONE tile matrix, not an array. Just like when writing in XML I define one tile matrix in there.

  5. I find the "Type" suffix enum values for the classes used with the "type" property problematic. I don't believe such a suffix is typically used, or wanted. For example in GeoJSON, "type" : "FeatureCollection". There is no "Type" suffix.

The main purpose of such a standard type property is support polymorphism, where an expected object could be a number of different things. So when we do use Type, we can for example use reflection to find the class that "type" identifies. (this is actually not needed here at all because the same object type is always expected, so type is actually superfluous). So if the type is "TileMatrix", we can look up the TileMatrix class. This breaks if the type is set to "TileMatrixType". In ECON (http://ec-lang.org/econ/), our superset of JSON compatible with eC instantiation syntax, the type can naturally be specified before the curly braces, e.g.:

tileMatrices = [ TileMatrix { identifier = 0, ... }, TileMatrix { identifier = 0, ... } ]

Also conceptually, if the type of an object is a "TileMatrixType", then it is not a TileMatrix, it is a type of TileMatrix We can't directly look up the UML class in a diagram either... I don't understand why a suffix would be wanted here, there is no namespace collision...

I realize TMS is now a published standard (but arguably no published standard yet references it! ), but I think these are important concerns, and it would be nice to clarify the approach, also for future JSON schemas... I wish I noticed and commented about this earlier (in fact I may have but didn't have time to check status before publication).

cholmes commented 4 years ago

Seems like it could be good to split these all into separate issues, so they can be tracked / discussed / resolved separately. Can make a TileMatrixSet 'label' to track / group them.

ghobona commented 4 years ago

@jerstlouis Please move this issue to the OGC Standards Tracker, so that it can be tracked against the relevant standard (OGC Two Dimensional Tile Matrix Set standard).

joanma747 commented 4 years ago

Please provide a URI in the standards tracker

jerstlouis commented 4 years ago

@joanma747 @ghobona Points 1,2,3 are non-contentious editorial mistakes and filed as http://ogc.standardstracker.org/show_request.cgi?id=645 Point 4 (Change "tileMatrix" to plural "tileMatrices") was filed as http://ogc.standardstracker.org/show_request.cgi?id=648 Point 5 (Change "type" : "TileMatrixType" to simply "TileMatrix") was filed as http://ogc.standardstracker.org/show_request.cgi?id=649

ghobona commented 4 years ago

@jerstlouis Thanks for moving the issues to Standards Tracker.

jerstlouis commented 4 years ago

Also variableMatrixWidths should be plural, since it is also an array.

joanma747 commented 3 years ago

1 editorial. Accepted 2 editorial. Accepted 3 editorial. Accepted 4 ensure that JSON encoding uses plural where array is the valiue of a property. e.g. "tileMatrices". In xml singlular is used because the element is repeated /tileMatrixSet/tileMatrix. Can we use this in the JSON best practices document as a general rule? 5 remove the "Type" in the end of the type names. for the JSON encoding e.g. "type": "TileMatrix" without "Type" (do not use "TileMatrixType".

Is type required? It does not seem necessary in a triple store practical application. We will check if they are optional in the json schema and in an eventual JSON conformance class.

jerstlouis commented 3 years ago

@joanma747 please note the other plural variableMatrixWidths mention right above.

jerstlouis commented 3 years ago
jerstlouis commented 3 years ago

Could the XML variable width example in Annex E be updated to simply represent the same partial GNOSISGlobalGrid example as the one in JSON right below instead?

joanma747 commented 3 years ago

Changes applied by @jerstlouis