Open luisramosbosch opened 1 year ago
Sorry that you're having problems. There isn't enough information here to debug the problem. I suspect that you are using more than one IRI for "country", but I can't tell from the links you provided.
this is the command I am using: robot template --prefix "loc: http://www.example.com/" ^ --prefix "geosparql: http://www.opengis.net/ont/geosparql#" ^ --prefix "sf: http://www.opengis.net/ont/sf#" ^ --prefix "lcc-3166-1: https://www.omg.org/spec/LCC/Countries/ISO3166-1-CountryCodes/" ^ --merge-before ^ --input ISO3166-2-SubdivisionCodes-DE.rdf ^ --template geo-de_germany.tsv ^ --output test-germany.owl
and this is the full output ontology: <?xml version="1.0"?> <rdf:RDF xmlns="https://www.omg.org/spec/LCC/Countries/Regions/ISO3166-2-SubdivisionCodes-DE/" xml:base="https://www.omg.org/spec/LCC/Countries/Regions/ISO3166-2-SubdivisionCodes-DE/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:terms="http://purl.org/dc/terms/" xmlns:geosparql="http://www.opengis.net/ont/geosparql#" xmlns:CountryRepresentation="https://www.omg.org/spec/LCC/Countries/CountryRepresentation/" xmlns:SpecificationMetadata="http://www.omg.org/techprocess/ab/SpecificationMetadata/" xmlns:LanguageRepresentation="https://www.omg.org/spec/LCC/Languages/LanguageRepresentation/">
Sorry that you're having problems. There isn't enough information here to debug the problem. I suspect that you are using more than one IRI for "country", but I can't tell from the links you provided.
actually that seems to be the case, but I am not doing that in the template (or at least i don't think so), and that is the question. I am indicating Germany is of type Country, no more.
lcc-3166-1:Germany
has a single rdf:type
in this output, as specified in the template. I also looked in the source ontology you linked https://www.omg.org/spec/LCC/20211101/Countries/Regions/ISO3166-2-SubdivisionCodes-DE.rdf and I didn't see lcc-3166-1:Germany
or https://www.omg.org/spec/LCC/Countries/CountryRepresentation/Country mentioned there at all.
and Germany just exists, thus I wonder if there is another way to create an individual, and relate it to another existing one without producing such unwanted result?.
lcc-3166-1:Germany
has a singlerdf:type
in this output, as specified in the template. I also looked in the source ontology you linked https://www.omg.org/spec/LCC/20211101/Countries/Regions/ISO3166-2-SubdivisionCodes-DE.rdf and I didn't seelcc-3166-1:Germany
or https://www.omg.org/spec/LCC/Countries/CountryRepresentation/Country mentioned there at all.
With regard to this comment, so it is the modular structure of LCC - OMG spec, if I get your point. And, as you say, lcc-3166-1:Germany has a single rdf:type, but the output produces duplicated references, and that is what I wonder: why?.
Now I see where the other rdf:type
assertion is coming from. The type IRI is indeed the same.
So I think that this is just how Protege is displaying the fact that the rdf:type
is asserted in the file you're loading (bold) and in one of the imports (not bold). If you merge all the imports and save to a new file, you should not see duplicate rdf:type
.
To avoid this, in your template row for lcc-3166-1:Germany
try setting the type to owl:Individual
or maybe owl:NamedIndividual
instead of Country.
Hi dear, I solved most issues using owl:NamedIndividual and the Country reference to Germany is not duplicated anymore. But, however it continues duplicating the states reference:
which is even stranger, given that I do not mention this identifier in this template.
The template with German states would be like:
CURIE Label Type Comment hasGeometry Geometry
ID LABEL TYPE A rdfs:comment AI geosparql:hasGeometry AT geosparql:asWKT^^geosparql:wktLiteral
loc:germany-geometry Germany Geometry sf:MultiPolygon Multipolygon representing the Federal Republic of Germany POINT(2.2945 48.8584)
lcc-3166-1:Germany owl:NamedIndividual http://www.example.com/germany-geometry
loc:Baden-Württemberg-geometry Baden-Württemberg Geometry sf:MultiPolygon Multipolygon representing the german state of Baden-Württemberg POINT(2.2945 48.8584)
lcc-3166-2-DE:DE-BW-Subdivision owl:NamedIndividual http://www.example.com/Baden-Württemberg-geometry
loc:Bayern-geometry Bayern Geometry sf:Polygon Multipolygon representing the german state of Bayern POINT(2.2945 48.8584)
Thanks for all your support
Luis Ramos
let me know if you need the full ontology
Maybe it's because you're using owl:sameAs
. I would avoid that if possible.
I am using the lcc ontology to add geo features to Germany.
I was able to add the corresponding geo feature, but found out that the rdf:type reference is being duplicated, I mean in the source ontology there is only one reference to country, while in the output ontology appear two reference to country to the individual Germany:
Here is the template, and I wonder why the reference should being duplicated?
CURIE Label Type Comment hasGeometry Geometry ID LABEL TYPE A rdfs:comment AI geosparql:hasGeometry AT geosparql:asWKT^^geosparql:wktLiteral loc:germany-geometry Germany Geometry sf:MultiPolygon Multipolygon representing the Federal Republic of Germany POINT(2.2945 48.8584) lcc-3166-1:Germany https://www.omg.org/spec/LCC/Countries/CountryRepresentation/Country http://www.example.com/germany-geometry
Luis Ramos