Permalink
Browse files

update readme with google earth export

  • Loading branch information...
afourmy committed Oct 5, 2017
1 parent a71960c commit 29b962c313942158bfe665880fca5b922788d01b
View
@@ -31,6 +31,12 @@ using the mercator or azimuthal orthographic projections.
![Network GIS visualization](https://github.com/mintoo/networks/raw/master/Readme/animations/gis_visualization.gif)
## Export to Google Earth
Networks can be exported as a .KML file to be displayed on Google Earth, with the same icons and link colors as in pyNMS.
![Google Earth](https://github.com/mintoo/networks/raw/master/Readme/images/google_earth_export.png)
## Network algorithmic visualization
GIS visualization can only be done if we have all GPS coordinates: it is not always the case.
Binary file not shown.
@@ -59,7 +59,6 @@ def __init__(self, controller):
# we convert the RGB color to a KML color,
# i.e #RRGGBB to #AABBGGRR
kml_color = "#ff{0:02x}{1:02x}{2:02x}".format(*cls.color[::-1])
print(kml_color)
line_style.linestyle.color = kml_color
self.styles[subtype] = line_style
@@ -79,7 +78,7 @@ def kml_export(self, _):
point = kml.newpoint(name=node.name, description=node.description)
point.coords = [(node.longitude, node.latitude)]
point.style = self.styles[node.subtype]
point.style.labelstyle.scale = float(self.node_size.text())
point.style.labelstyle.scale = 0#float(self.node_size.text())
for link in self.network.all_links():
line = kml.newlinestring(name=link.name, description=link.description)
@@ -15,7 +15,7 @@
from collections import OrderedDict
from os.path import join
from .base_view import BaseView
from math import asin, cos, sin, sqrt
from math import asin, cos, radians, sin, sqrt
try:
import shapefile
import shapely.geometry

0 comments on commit 29b962c

Please sign in to comment.