dcb
2025-06-18 4c4d0f591f94428ed7e5d2f4ae5df5c5087d8c26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.se.nsl.utils;
 
 
import cn.smartearth.sem.SEM;
 
public class SemUtils {
    public static void main(String[] args) throws Exception {
        semToCityJson();
    }
    public static void cityJsonToSem(String jsonUrl,String semUrl) throws Exception {
        //cityjson转sem
        SEM sem = SEM.fromCityJSON(jsonUrl);
        sem.writeToFile(semUrl);
    }
    public static void semToCityJson() throws Exception {
        //sem转cityjson
        SEM sem2 = new SEM("D:\\uwsolver\\tongzhou\\link.sem");
        sem2.writeToCityJSON("D:\\uwsolver\\tongzhou\\link\\link.json");
    }
}