tum-gis / citygml2objv2 Goto Github PK
View Code? Open in Web Editor NEWCommand line converter of CityGML (.gml) to OBJ (.obj) files, while maintaining the semantics
License: MIT License
Command line converter of CityGML (.gml) to OBJ (.obj) files, while maintaining the semantics
License: MIT License
On my Windows machine with Python 3.10 I found that gml-files of the input directory are processed twice since the glob() function does not appear to be case in-sensitive and identifies identical gml-files twice when checking first on "*.gml" and then on "*.GML":
Lines 348 to 351 in c55356a
The link to CityDoctor in the Readme file returns a 404. Perhaps it should point to https://transfer.hft-stuttgart.de/gitlab/citydoctor/citydoctor2
--might do a PR on it later.
Hi,
First I want to thank you for keeping up the development of this tool!
Windows 10
(env) PS D:\XXX\XXX\citygml2obj-2.0> python --version
Python 3.10.0
(env) PS D:\XXX\XXX\citygml2obj-2.0> pip list
Package Version
--------------- --------
contourpy 1.0.7
cycler 0.11.0
fonttools 4.39.4
kiwisolver 1.4.4
lxml 4.9.2
matplotlib 3.7.1
numpy 1.24.3
packaging 23.1
Pillow 9.5.0
pip 23.1.2
PyDecimal 1.0
pyparsing 3.0.9
python-dateutil 2.8.2
setuptools 67.7.2
shapely 2.0.1
six 1.16.0
triangle 20220202
wheel 0.40.0
I basically installed all packages that are listed in the requirements and used python 3.10.0. For "Decimal" I have used "PyDecimal" which should be fine.
https://download1.bayernwolke.de/a/lod2/citygml/688_5336.gml
(env) PS D:\XXX\XXX\citygml2obj-2.0> python .\CityGML2OBJs.py -i .\conv_files -o .\result_files
CityGML2OBJ. Searching for CityGML files...
Traceback (most recent call last):
File "D:\XXX\XXX\citygml2obj-2.0\CityGML2OBJs.py", line 357, in <module>
CITYGML = etree.parse(FULLPATH)
File "src\lxml\etree.pyx", line 3541, in lxml.etree.parse
File "src\lxml\parser.pxi", line 1879, in lxml.etree._parseDocument
File "src\lxml\parser.pxi", line 1905, in lxml.etree._parseDocumentFromURL
File "src\lxml\parser.pxi", line 1808, in lxml.etree._parseDocFromFile
File "src\lxml\parser.pxi", line 1180, in lxml.etree._BaseParser._parseDocFromFile
File "src\lxml\parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc
File "src\lxml\parser.pxi", line 728, in lxml.etree._handleParseResult
File "src\lxml\parser.pxi", line 655, in lxml.etree._raiseParseError
OSError: Error reading file '.\conv_files\688_5336.gml': failed to load external entity "./conv_files/688_5336.gml"
(env) PS D:\XXX\XXX\citygml2obj-2.0> python .\CityGML2OBJs.py -i .\conv_files -o .\result_files -v 1 -p 1
CityGML2OBJ. Searching for CityGML files...
Traceback (most recent call last):
File "D:\XXX\XXXcitygml2obj-2.0\CityGML2OBJs.py", line 357, in <module>
CITYGML = etree.parse(FULLPATH)
File "src\lxml\etree.pyx", line 3541, in lxml.etree.parse
File "src\lxml\parser.pxi", line 1879, in lxml.etree._parseDocument
File "src\lxml\parser.pxi", line 1905, in lxml.etree._parseDocumentFromURL
File "src\lxml\parser.pxi", line 1808, in lxml.etree._parseDocFromFile
File "src\lxml\parser.pxi", line 1180, in lxml.etree._BaseParser._parseDocFromFile
File "src\lxml\parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc
File "src\lxml\parser.pxi", line 728, in lxml.etree._handleParseResult
File "src\lxml\parser.pxi", line 655, in lxml.etree._raiseParseError
OSError: Error reading file '.\conv_files\688_5336.gml': failed to load external entity "./conv_files/688_5336.gml"
The tool didn't show anything in the GUI but gave this error in the console:
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at de.hft.stuttgart.citydoctor.gui.validation.d.f(Unknown Source)
at de.hft.stuttgart.citydoctor.gui.validation.j.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
I hope I have added all necessary information.
When using the triangulation, we observe strong geometric distortions for some data sets. This is particularly the case with official LOD2 datasets. These distortions can usually be avoided by skipping the triangulation.
The following graphic gives an example of these distortions
Experiments have shown that a translation of the CityGML data set can lead to an improvement of the results. However this is not the case for all data sets with this issue.
An examination of the CityGML data sets has shown that the error occurs with data sets in which the coordinates only have 2-3 decimal places.
Hello,
First to all, thank you all for your excellent and useful work.
I am unaware of the proper GitHub etiquette regarding these questions, but without wanting to sound demanding or ungrateful, are there any plans to include/develop exporting to the new CityGML 3.0 standard? I've tried using this program to export a few 3.0 gmls but the following error is raised:
There is a problem with this file: no cityObjects have been found. Please check if the file complies to CityGML.
While this is understandable--it is clearly specified in the repo documentation--perhaps it would be useful to develop this capability.
I've seen that some projects enable exporting to CityJSON, but there is an argument to be made for the necessity to export to obj file directly.
In any case, thanks for your good work, and if help is needed on this feature I'd be happy to collaborate!
Hello, just wanted to give you a thumbs up for such a great work while pointing out a very minor thing; apparently the link to the paper in pdf format in the Credits
section (http://filipbiljecki.com/publications/Biljecki2015vk.pdf
) is not working. At a quick glance it seems it should point to another path in the author's website (https://filipbiljecki.com/publications/2015_udmv_citygml_obj.pdf
)--might do a PR late to fix it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.