So the revised intersection test algorithm becomes:
angle_a + angle_b > pi or dot(normal_a, normal_b) >= cos_a*cos_b - sin_a*sin_b
Not as pretty. A speedup for large coverages :-) but a slowdown for everything else... :-(
Thoughts on the intersection of software development and earth science.
angle_a + angle_b > pi or dot(normal_a, normal_b) >= cos_a*cos_b - sin_a*sin_b
{
"points":[
[x0,y0], [x1,y1], ..., [xn,yn]
],
"lines":[
[x0,y0, x1,y1, ..., xn,yn],
...
],
"polygons":[
[
[x0,y0, x1,y1, ..., xn,yn],
...
],
[
[x0,y0, x1,y1, ..., xn,yn],
...
],
...
],
"features":[
{
"points":[
[x0,y0], [x1,y1], ..., [xn,yn]
],
"lines":[
...
]
},
...
]
}"crs":{
"epsg":"4326",
"wkt":"COMPD_CS["OSGB36 / British National Grid...",
"proj4":"+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"
}"bounds":[min_lon, min_lat, max_lon, max_lat]
[ [x1, y1, z1], ..., [xn, yn, zn] ]
[ x1, y1, z1, ..., xn, yn, zn ]
dot(normal_a, normal_b) >= cos(angle_a + angle_b)
cos(a + b) = cos(a)cos(b) - sin(a)sin(b)
dot(normal_a, normal_b) >= cos_a*cos_b - sin_a*sin_b
Google will be releasing an open-source KML library in C++ that implements and tracks the standard as it progresses.
By providing a reference library it allows developers to more easily keep up to date with KML without having to maintain their own library and track standards changes.