njam / citygml-to-3dtiles

Convert from CityGML to Cesium 3D Tiles.
Apache License 2.0
160 stars 41 forks source link

Where is the source of the spatial reference system (SRS) CH1903 ? #44

Closed Phuocdat10 closed 7 months ago

Phuocdat10 commented 7 months ago

Hello,

I would like to appreciate this amazing tool, It is helpful my current work.

However, I have a curious about the source of the SRS. As mentioned in the Readme.md

let converter = new Converter({
  srsProjections: {
    'CH1903': '+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs',
  }
});
await converter.convertFiles('./input.xml', './output/');

The definition should be in the "PROJ.4" format. Definitions in that format can be found at http://epsg.io/.

  1. But, the definition of CH1903 as mentioned can not be found in http://epsg.io/.

  2. How can I find the definition of my current SRS EPSG:4166 in Korea? Because, the one I get on the mentioned website does not work.

Thank you so much for any support! Dt

njam commented 7 months ago

Hi @Phuocdat10 , I think this should work:

  1. Go to https://epsg.io/
  2. Search for EPSG:4166, click on the search result
  3. Scroll to the bottom, where it says "Export" click on "PROJ.4"
  4. You find the result: +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs +type=crs

Let me know if that works.

njam commented 7 months ago

(I want to add the most-used SRS directly to the project in the future, so that these steps wouldn't be necessary anymore. I created a ticket if you want to track it: https://github.com/njam/citygml-to-3dtiles/issues/45)

Phuocdat10 commented 7 months ago

Dear @njam,

I wanted to express my gratitude for your introduction. It was effective, and I successfully directed my workspace to the area this code covered.

Thank you once again for your assistance.