我有多个KML文件需要更改<scale>
值(例如<scale>1.0</scale>
到<scale>2.0</scale>
),但是在python中这样做的正确方法是什么?
到目前为止,只发现以下相关信息:
# set the coordinate precision to something smaller
In [69]: set_max_decimal_places(
....: pm1,
....: max_decimals={
....: 'longitude': 2,
....: 'latitude': 1,
....: }
....: )
和
In [39]: from os import path
In [40]: kml_file = path.join( \
....: '../src/pykml/test', \
....: 'testfiles/google_kml_developers_guide', \
....: 'complete_tour_example.kml')
In [44]: with open(kml_file) as f:
In [45]: doc = parser.parse(f)