-
Notifications
You must be signed in to change notification settings - Fork 7
/
README
17 lines (13 loc) · 873 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Transform KML polygons in their 'mask' equivalent entities.
For each <Placemark>:
- an universe rectangle(polygon) that covers the studied area is created.
- all the previous inner boundaries (holes) become stand-alone polygons and forces a <MultiGeometry> to be created
- the previous outer boundary become a hole in the universe polygon created
Usage example:
$ xsltproc invert.xsl cantons.kml > cantons_inverted.kml
If you want to customize the masking area, use 'mask' via --stringparam:
$ xsltproc --stringparam mask '-25,15 40,15 40,80 -25,80 -25,15' invert.xsl cantons.kml > cantons_inverted.kml
The attached 'cantons.kml' is generated from Swisstopo GG25 dataset.
http://www.toposhop.admin.ch/en/shop/products/landscape/gg25_1
For a demo output check this Swiss boundaries map integration (Google Maps, Google Fusion Tables)
http://www.vasile.ch/hacks/ft-mask/