ogcincubator / chek-profiles

1 stars 0 forks source link

initial list of issues #1

Open VladimirAlexiev opened 1 year ago

VladimirAlexiev commented 1 year ago

@avillar @rob-metalinkage @peterrdf Here's an initial list of issues from about 20 min inspection of the example json/turtle.

Conventions:

Issues:

avillar commented 1 year ago

@VladimirAlexiev, thanks for your thorough review. A few quick notes:

  • The city:CityJson type is wrong

Yes, you're absolutely right.

  • but city:hasVertex is unordered in turtle

This is only half-done. The idea is to assign blank node ids to the vertices and the use them as references in the boundaries; however, I got stuck due to the flexible nature of boundaries, which can have anywhere between 0 and... 5? levels of nesting, depending on the type of geometry.

In any case, is the order of the vertices relevant (I'm honestly asking, since I'm not a CityJSON guru by any means)? Unless I'm mistaken, the order of the vertices is only important to the extent that the references in other constructs (e.g. boundaries) are consistent. In this example (bear with me for a second and imagine that the boundaries arrays and untangled), the boundaries would use blank node ids to refer to the specific vertices (to which rdflib would assign, in turn, blank node ids, instead of leaving them unlabeled as they are right now).

A RDF -> CityJSON converter could then just revert the process by defining an order (lexicographically?) to sort the vertices, mapping them to their position in the vertices array and replacing the references (e.g. boundaries) with the corresponding indexes.

Ontology terms are defined with relative URL in the context, resulting in local file: URLs in turtle

This is a bug in the pyld module (it's not expanding the terms as it should). I have pushed a workaround for this, so (fingers crossed) no more file:// URIs.

boundaries have a similar structure to vertices (list of numeric triples), but city:hasVertex vs city:boundaries have very different structure

Explained above.

city:hasVertex vs city:boundaries don't use a consistent naming convention

Agreed.

city:lod "2" may be better rendered as a number

Fixed by setting the @type.

city:hasTransform, city:translate are defined as xsd:float or double

Added the necessary @type's for rdflib to serialize it as xsd:decimal.

Nested blank nodes are not formatted well

This is just how rdflib serializes Turtle...

an important root object "Building_1" is missing from the turtle

The identifiers for the objects are used to generate the blank node ids; if you look at the ttl file, you'll see two different city objects ([1], [2]).

Of course, that should also be done for the parents and children as well, but as I said, this is all still far from complete.

VladimirAlexiev commented 1 year ago

@avillar Can you please open a new issue "how to represent geometry (vertices and indexes)"? It's crucial for the whole effort. Please add this info:

these extra considerations:

@rob-metalinkage and @peterrdf What's your take on geometry?


identifiers for the objects are used to generate the blank node ids;

Ah, but they should be used to make URLs (and perhaps emitted in a separate field identifier), not merely to distinguish the blank nodes.

avillar commented 1 year ago

Quick note: the nested lists issue was not really a JSON-LD 1.0 vs 1.1, but a problem with the rdflib JSON-LD parser...