Closed JkGemma closed 5 years ago
Nevermind, added the ESPG and it's fine.
Yes, unfortunately the list of available SRS is currently hardcoded in SRSTranslator.mjs. It would be nice if the http://epsg.io/ databases would be automatically queried for simple SRS..
For now I've added a link to the corresponding readme section to the error message.
Nevermind, added the ESPG and it's fine.
where do you put the ESPG?
@yaryaraldebaran you can pass the SRS if you use the library programmatically in your own script like this: https://github.com/njam/citygml-to-3dtiles#option-srsprojections
Alternatively you could download the code, adjust SRSTranslator.mjs locally, and then run the local version.
thank you for your response, btw how do you get get the SRSname from citygml files? i want to add functionality that user can include the prj file as the SRS. for instance, i modified from your example
var SRSname = SRSname_from_gml ;
var SRSPRJ = SRS_from_PRJ;
let converter = new Converter({
srsProjections: {
'${SRSname}': '${SRSPRJ}',
}
});
await converter.convertFiles('./input.xml', './output/');
i've read your code here but still haven't figured it out to recode it into my own code
how do you get get the SRSname from citygml files?
The code currently takes the "srsName" attribute of the root element:
srs = this.selectNode('//@srsName').value
This is a simplification though, see https://en.wiki.quality.sig3d.org/index.php/Modeling_Guide_for_3D_Objects_-_Part_1:_Basics_(Rules_for_Validating_GML_Geometries_in_CityGML)#Spatial_Reference_Systems_.28SRS.29
Hello,
It would be cool to be able to use your tool, but I got a problem.
When I run :
I get :
My SRS in the gml file is writen like that :
Is it wrong? If yes, I'd like to know how it should be write
Thanks to you! Jk.