根据四角坐标生成KML文件

BOX.bat

@echo off

chcp 65001>nul 2>nul

set tab=

for /f "delims=, tokens=1-9" %%i in (TXT\KML.txt) do (

    @echo %%i

    @echo ^ >KML\%%i.kml

    @echo ^ >>KML\%%i.kml

    @echo %tab%^ >>KML\%%i.kml

    @echo %tab%%tab%^ >>KML\%%i.kml

    @echo %tab%%tab%%tab%^%%i^ >>KML\%%i.kml

    @echo %tab%%tab%%tab%^ >>KML\%%i.kml

    @echo %tab%%tab%%tab%%tab%^ >>KML\%%i.kml

    @echo %tab%%tab%%tab%%tab%%tab%^ >>KML\%%i.kml

    @echo %tab%%tab%%tab%%tab%%tab%%tab%^ >>KML\%%i.kml

    @echo %tab%%tab%%tab%%tab%%tab%%tab%%%j,%%k,0 >>KML\%%i.kml

    @echo %tab%%tab%%tab%%tab%%tab%%tab%%%l,%%m,0 >>KML\%%i.kml

    @echo %tab%%tab%%tab%%tab%%tab%%tab%%%n,%%o,0 >>KML\%%i.kml

    @echo %tab%%tab%%tab%%tab%%tab%%tab%%%p,%%q,0 >>KML\%%i.kml

    @echo %tab%%tab%%tab%%tab%%tab%%tab%^ >>KML\%%i.kml

    @echo %tab%%tab%%tab%%tab%%tab%^ >>KML\%%i.kml

    @echo %tab%%tab%%tab%%tab%^ >>KML\%%i.kml

    @echo %tab%%tab%%tab%^ >>KML\%%i.kml

    @echo %tab%%tab%^ >>KML\%%i.kml

    @echo %tab%^ >>KML\%%i.kml

    @echo ^ >>KML\%%i.kml

)

pause


KML.txt

XRB1,138.5181507699,37.2003202876,140.0542901447,36.8573958530,139.6073482433,35.6663606264,138.0249816287,36.0146612049

你可能感兴趣的:(根据四角坐标生成KML文件)