Closed tfqrsli closed 2 years ago
Somewhere in your file, there are xlink:href
attributes pointing to gml:id
values that don't exist. To check this, pick one of the error messages and copy the string between the single quotes. Then search for this string in your input file and you will find your xlink:href
attribute (or more than one). Next, remove the #
at the start of the string and search again. You will not find a gml:id
attribute having this string as value. And thus, your file contains references that cannot be resolved. If you do find such a gml:id
then you have found a bug.
If you share the dataset, I can possibly give you more hints.
hi clause,
Thanks for reply. Unfortunately, i cannot give the dataset cause we have an agreement with client to keep this as confidential. However, i've try your suggestion and the result is i found both with #
and without for #UPI_10084101410062.S.0B.M2.D4_2_BP.Toe0c5FFd90yx72TM3Gk_BP.mpqwwTEswQ7gz9Y9tR3Z_PG.tJaFjzQvC9gXNa34AOp8
i've attach a both result that i've search in input file.
Thanks for your tests. Well, hard to guess the cause for the issue without being able to check the dataset.
Could you please validate your dataset against the CityGML schemas? Simply open the Importer/Exporter, go to the Import
tab, add your file to the input file list and click on the Just validate
button in the lower right corner next to the Import
button. Do you receive error messages on the console?
It seems that your dataset uses a gml:MultiGeometry
to store the geometry. The Importer/Exporter only has limited support for gml:MultiGeometry
objects. Can you please check whether the polygon with the gml:id UPI_10084101410062.S.0B.M2.D4_2_BP.Toe0c5FFd90yx72TM3Gk_BP.mpqwwTEswQ7gz9Y9tR3Z_PG.tJaFjzQvC9gXNa34AOp8
has been correctly imported into the database? You can either search the table surface_geometry
for a tuple that has this value stored in the gmlid
column. Or you can export your data using the Importer/Exporter and search the output file for this gml:id value.
Are you able to create a very simple dataset in the same way as you created the dataset for you client? Could be a simple box for the building geometry. The idea is to have a comparable dataset that you could share with us for testing purposes.
Which version of the Importer/Exporter are you using ("Help -> About")
Hi clause,
We already make a decision and agree to give another simple dataset that provide same error (but in LoD3). However, i've try all the suggestion with new dataset but the same building (LoD4) and the result as below ;-
select * from citydb.surface_geometry where gmlid LIKE 'UPI_10084101410062.S.0B.M2.D4_2_BP.1H05jB9D20eXY62C6KV0_BP.fOPKVZdkB5HGbu7vGkn4_PG.KiZXbg8CNLv79kTGOEt7'
with and without #
and both result are not in database. Also, i've try to export
UPI_10084101410062.S.0B.M2.D4_2_BP.1H05jB9D20eXY62C6KV0_BP.fOPKVZdkB5HGbu7vGkn4_PG.KiZXbg8CNLv79kTGOEt7
using 3dcitydb importer/exporter and the result are still the same.
It would be great if you willing to share with me a tutorial or any reference to gain more knowledge or fundamental on how it works, limitation and what should or should not have in 3dcitydb importer/exporter.
Special thanks to you clause, cheers.
additional, i have screenshot during process importing are still running. But the log only show 1000 log if i not mistaken.
It is possible to solve this problem to change from MULTI_GEOMETRY
to another type of geometry that support 3dcitydb through xml viewer/editor? This is because i am not generate manually using FME workbench. I am using plugin from Sketchup.
sorry for asking since i still in this domain.
Thanks for sharing the example dataset, @tfqrsli. As assumed above, your dataset uses gml:MultiGeometry
objects. In general, a gml:MultiGeometry
is a collection of geometries that are allowed to have mixed dimensions: points (0D), curves (1D), surfaces (2D) and solids (3D). The 3DCityDB can handle geometries of different dimensions and collections of geometries having the same dimension. But collections containing geometries of different dimensions are not supported.
Five of the six gml:MultiGeometry
objects in your dataset contain only polygons (2D) and can therefore be imported (those gml:MultiGeometry
objects are internally mapped to gml:MultiSurface
). The sixth gml:MultiGeometry
, however, contains both polygons (2D) and line strings (1D). This is not supported and therefore the gml:MultiGeometry
is skipped and not imported (see corresponding ERROR messages in the log). And, finally, this is the reason why some of the appearance XLinks pointing to elements from this skipped gml:MultiGeometry
cannot be resolved.
How to fix this?
gml:MultiGeometry
. Use the following collection geometries instead: gml:MultiPoint
(0D), gml:MultiCurve
(1D), gml:MultiSurface
(2D) or gml:MultiSolid
(3D). These collection classes may only contain geometries of the same dimension.I recommend using the latest version 4.3.0 of the Importer/Exporter: https://github.com/3dcitydb/importer-exporter/releases/tag/v4.3.0
Hello Clause,
Thanks for your explanation, It helps a lot to find a root cause and where it come from. It come from stray line in the model and using suggestion from developer in plugin Sketchup, this issue were solve. Thanks to you Clause.
However, i have another issue during importing again which is i tried to validate and import into dummy database and exporting back. All of this process successfully validate, import and export using 3dcitydb importer/exporter. However, when i import into real database, the console log in 3dcitydb importer/exporter show error
[11:19:03 ERROR] A SQL error occurred: Batch entry 0 insert into citydb.TEXTUREPARAM (SURFACE_GEOMETRY_ID, IS_TEXTURE_PARAMETRIZATION, WORLD_TO_TEXTURE, SURFACE_DATA_ID) values (7548554, 0, NULL, 383),(7548578, 0, NULL, 383),(7548598, 0, NULL, 383),(7548724, 0, NULL, 383),(7548770, 0, NULL, 383),(7548784, 0, NULL, 383),(7548794, 0, NULL, 383),(7548804, 0, NULL, 383),(7548812, 0, NULL, 383),(7548834, 0, NULL, 383),(7548846, 0, NULL, 383),(7548932, 0, NULL, 383),(7548952, 0, NULL, 383),(7548956, 0, NULL, 383),(7548968, 0, NULL, 383),(7140334, 0, NULL, 384) was aborted: ERROR: insert or update on table "textureparam" violates foreign key constraint "texparam_surface_data_fk"
Detail: Key (surface_data_id)=(384) is not present in table "surface_data". Call getNextException to see other errors in the batch.
[11:19:03 ERROR] Cause: ERROR: insert or update on table "textureparam" violates foreign key constraint "texparam_surface_data_fk"
Detail: Key (surface_data_id)=(384) is not present in table "surface_data".
[11:19:03 ERROR] Cause: ERROR: insert or update on table "textureparam" violates foreign key constraint "texparam_surface_data_fk"
Detail: Key (surface_data_id)=(384) is not present in table "surface_data".
I lost my mind since this issue come because both database (dummy and real) through the same way to connect and created. could you give an explanation or suggestion to overcome this issue?
thanks, tfq
Hi, Could you share your test datasets? I want to take a try on my machine.
In the mean time, you could also create a third database and test the import/export again. If it works, then the problem is probably from your "real" database, which might be broken due to some kind of unknown operations.
best
Zhihang
@tfqrsli, to be able to support you, please send us more information:
Cheers, Claus
Closing due to missing feedback. Feel free to re-open if you have more questions.
Hi,
I am tfq and i'm new here. Recently i have an issue which is to import gml (LoD4) file to database using 3dcitydb importer/exporter and the console log show error failed to solve Xlinks reference even pass validation before import. What the possibility to get the error and how to solve.
For the information, i am new for this field and i am using sketchup to modeling the building and plugin sketchup (cityeditor) to assign and convert to gml file type.
I have attaching a picture of console log
I am very happy if someone can help me to guide or solve this problem since already cross my due date to submit.
Regards tfq