Skip to content

Commit

Permalink
inverse of bag-icon
Browse files Browse the repository at this point in the history
git-svn-id: https://cowfish.unh.edu/projects/schwehr/trunk/src/bag-py@13842 a19cddd1-5311-0410-bb07-9ca93daf0f0b
  • Loading branch information
schwehr committed May 31, 2010
1 parent d39699c commit af17dea
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions bagsqlite2kml.py
Expand Up @@ -39,6 +39,12 @@ def sqlite2kml(cx,outfile):
</IconStyle>
</Style>
<Style id="survey_bbox">
<LineStyle>
<color>ff0074d2</color>
<width>2</width>
</LineStyle>
</Style>
<Folder>
''')

Expand All @@ -56,7 +62,22 @@ def sqlite2kml(cx,outfile):
x_center = (ll[0] + ur[0]) / 2.
y_center = (ll[1] + ur[1]) / 2.
o.write('''
<Folder>
<Folder><name>{survey}</name>
<Placemark>
<name>{survey} bbox</name>
<styleUrl>#survey_bbox</styleUrl>
<LineString>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>
{x_min},{y_min},100
{x_max},{y_min},100
{x_max},{y_max},100
{x_min},{y_max},100
{x_min},{y_min},100
</coordinates>
</LineString>
</Placemark>
<Folder><name>{survey} descr</name>
<Region>
<LatLonAltBox>
<north>{y_max}</north>
Expand All @@ -74,7 +95,7 @@ def sqlite2kml(cx,outfile):
</Lod>
</Region>
<Placemark>
<name>{survey}</name>
<name>{survey} descr</name>
<styleUrl>#survey_style</styleUrl>
<description>
<![CDATA[
Expand All @@ -100,20 +121,7 @@ def sqlite2kml(cx,outfile):
<coordinates>{x_center},{y_center}</coordinates>
</Point>
</Placemark>
<Placemark>
<name>{survey}</name>
<LineString>
<coordinates>
{x_min},{y_min},0
{x_max},{y_min},0
{x_max},{y_max},0
{x_min},{y_max},0
{x_min},{y_min},0
</coordinates>
</LineString>
</Placemark>
</Folder> <!-- keep the region just to the overview placemark -->
</Folder>
<Folder> <name>{survey} bags</name>
Expand Down
Binary file added survey-icon-66x66.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit af17dea

Please sign in to comment.