Python:如何在KML中更改<scale>元素的值?

时间:2017-04-18 20:03:49

标签: python xml file google-maps kml

我有多个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)

0 个答案:

没有答案