Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial KML support from GSoC 2013 #1147

Merged
merged 170 commits into from
Sep 13, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
7424f06
Create KmlDataSource.js using DataSource.js as template
andr3nun3s Jun 15, 2013
8bbac8c
Cleanup KmlDataSource.js
andr3nun3s Jun 18, 2013
fa6e724
Copy functions from CZMLDataSource and replace 'CZML' with 'KML'
andr3nun3s Jun 20, 2013
760a6cc
Create new Spec for KmlDataSource
andr3nun3s Jun 20, 2013
8a89108
Complete default constructor
andr3nun3s Jun 20, 2013
3ee4bc1
Comment out 'processKml' for now
andr3nun3s Jun 20, 2013
02f1ca3
Merge branch 'kml' of github.com:andre-nunes/cesium into kml
andr3nun3s Jun 25, 2013
9484196
Cleanup KmlDataSource
andr3nun3s Jun 25, 2013
2fa4a2e
Add KML example file to the Gallery of Cesium Viewer
andr3nun3s Jun 25, 2013
9f931ed
Modify Cesium Viewer 'source' parameter so it can load KML files
andr3nun3s Jun 25, 2013
2d0ca32
Tweek KmlDataSourceSpec.js to reflect changes on the default constructor
andr3nun3s Jun 25, 2013
4c6807d
Merge branch 'master' into kml
andr3nun3s Jun 27, 2013
9218021
Add a new function to process KML files
andr3nun3s Jun 27, 2013
ad46478
Add new test to allow me to visualize Placemark list in the debugger
andr3nun3s Jun 29, 2013
5d487ee
Move all the functions to process KML into KmlDataSource.js
andr3nun3s Jun 29, 2013
49d868a
Fix typo
andr3nun3s Jun 29, 2013
1eb7ca9
Search for geometry type of Point in processPlacemark
andr3nun3s Jun 29, 2013
412440a
First try using geometryHandler
andr3nun3s Jun 29, 2013
439afa5
Start creating objects
andr3nun3s Jun 30, 2013
94467f9
Add initial arguments to KML processing functions
andr3nun3s Jun 30, 2013
74bdbc9
Add more empty processing functions
andr3nun3s Jul 1, 2013
71adba4
Fix typo
andr3nun3s Jul 1, 2013
44ac795
Add pseudo-code to process Styles
andr3nun3s Jul 2, 2013
2b73876
Add coordinate's processing
andr3nun3s Jul 3, 2013
5c9e04d
Merge with master branch
andr3nun3s Jul 4, 2013
5d3a8ce
Implement KML Point
andr3nun3s Jul 4, 2013
f172902
Rename Spec
andr3nun3s Jul 5, 2013
38ba29d
Start implementing Style
andr3nun3s Jul 5, 2013
82e483b
Change test name
andr3nun3s Jul 6, 2013
7aefcfd
Add Styles to loadKML
andr3nun3s Jul 6, 2013
147d487
Properly check for each style type
andr3nun3s Jul 7, 2013
b35d709
Cleanup comments
andr3nun3s Jul 7, 2013
2fb279d
Fix how IDs are discovered or created
andr3nun3s Jul 7, 2013
5aebd47
Move comments into right context
andr3nun3s Jul 8, 2013
44fa8fc
Add some elements of IconStyle
andr3nun3s Jul 9, 2013
6cbed0c
Merge branch 'master' into kml
andr3nun3s Jul 9, 2013
9a2e47f
Add the remaining elements of IconStyle
andr3nun3s Jul 10, 2013
2a0dd64
Add style processing to processPlacemark
andr3nun3s Jul 11, 2013
9d02ee6
Add new sample KML file
andr3nun3s Jul 11, 2013
a8de29b
Add a new spec to test the simpler placemark
andr3nun3s Jul 11, 2013
835ea01
Reverse color string from abgr to rgba
andr3nun3s Jul 11, 2013
8fe3200
Tweek billboard properties
andr3nun3s Jul 12, 2013
28907d3
Add style processing to processPoint
andr3nun3s Jul 13, 2013
330f9aa
Create guid for duplicate ids
andr3nun3s Jul 13, 2013
361da80
Simplify readCoordinates by using regular expressions
andr3nun3s Jul 15, 2013
0ff70da
Merge branch 'master' into kml
andr3nun3s Jul 15, 2013
739234d
Remove unnecessary comments
andr3nun3s Jul 15, 2013
45a615f
Raise event after KML has been loaded
andr3nun3s Jul 15, 2013
da5cbc8
Fix processStyle
andr3nun3s Jul 15, 2013
2e3c871
Use the correct object in processPoint
andr3nun3s Jul 16, 2013
c1f2a08
Fix color handling
andr3nun3s Jul 16, 2013
fe8ea69
Add spec to test Point geometry
andr3nun3s Jul 16, 2013
6f186a7
Add line style
andr3nun3s Jul 17, 2013
6a3ac8d
Start implementing line string processing
andr3nun3s Jul 18, 2013
6af3b13
Improve unit tests for Point geometry.
mramato Jul 18, 2013
441b9b6
Merge pull request #1 from mramato/mramato-kmlSpecs
andr3nun3s Jul 21, 2013
7a5364c
Merge branch 'master' into kml
andr3nun3s Jul 22, 2013
c46e18b
Improve unit test for Line Geometry
andr3nun3s Jul 23, 2013
a7eba77
Add support to multiple coordinate tuples
andr3nun3s Jul 23, 2013
37be1bd
Add LabelStyle support to Point geometry
andr3nun3s Jul 23, 2013
10c3a1d
Add Spec to test LineStyle on a Point placemark
andr3nun3s Jul 23, 2013
d674a5e
Fix bugs related to LineStyle processing
andr3nun3s Jul 23, 2013
824df70
Add TODO
andr3nun3s Jul 26, 2013
642d2f2
Implement LineString
andr3nun3s Jul 27, 2013
8e6a1aa
Improve line geometry unit test
andr3nun3s Jul 27, 2013
8d446dc
adAdd whitespace characters as possible separators of coordinate tuples
andr3nun3s Jul 27, 2013
312f1b9
Complete LineString implementation
andr3nun3s Jul 27, 2013
5ef9c5c
Add cache for external styles
andr3nun3s Jul 29, 2013
dcb729d
First try at processing remote styles
andr3nun3s Jul 30, 2013
66bacfa
Refactor style processing
andr3nun3s Jul 30, 2013
5d4264c
Add initial support for external styles
andr3nun3s Jul 30, 2013
70228cc
Add specs for basic style handling.
mramato Jul 31, 2013
ba16797
Minor tweaks.
mramato Jul 31, 2013
5ce3bc0
Merge pull request #2 from mramato/kml-style-fixes
andr3nun3s Jul 31, 2013
80498e7
Remove empty functions
andr3nun3s Jul 31, 2013
aea110d
Remove unnecessary checks
andr3nun3s Jul 31, 2013
21fa65f
Merge branch 'kml' of github.com:andre-nunes/cesium into kml
andr3nun3s Jul 31, 2013
8702644
Make specs more readable
andr3nun3s Jul 31, 2013
2195284
Tweak LabelStyle spec
andr3nun3s Jul 31, 2013
80c4ee3
Merge branch 'master' into kml
andr3nun3s Jul 31, 2013
0297644
Add unit tests
andr3nun3s Jul 31, 2013
f8bbe08
Fix indentation
andr3nun3s Jul 31, 2013
211f062
Check for invalid coordinates
andr3nun3s Aug 1, 2013
b8cf248
Fix loadUrl
andr3nun3s Aug 1, 2013
fd2729d
Add new unit tests for Point, Line geometry and loadUrl
andr3nun3s Aug 1, 2013
199f260
Fix typo
andr3nun3s Aug 1, 2013
d0ba516
Fix inline style processing
andr3nun3s Aug 1, 2013
70426c3
Add TODO
andr3nun3s Aug 1, 2013
22d45f3
Merge branch 'master' into kml
andr3nun3s Aug 2, 2013
efb61fb
Finish debugging inline processing
andr3nun3s Aug 2, 2013
460b4ea
Merge branch 'master' into kml
andr3nun3s Aug 6, 2013
f131750
Remove unnecessary tests
andr3nun3s Aug 6, 2013
e96639f
Small tweaks
andr3nun3s Aug 6, 2013
f6195b1
Fix strict violation
andr3nun3s Aug 6, 2013
9048a2a
Cleanup code
andr3nun3s Aug 6, 2013
8cf7044
More code cleanup
andr3nun3s Aug 6, 2013
c957554
Refactor helper functions
andr3nun3s Aug 6, 2013
ab6a949
Add spec to test Color
andr3nun3s Aug 6, 2013
b1f9625
Add a random color generator using the semantics defined in the KML r…
andr3nun3s Aug 7, 2013
9c7da4b
Fix color processing
andr3nun3s Aug 7, 2013
393e842
Merge branch 'master' into kml
andr3nun3s Aug 8, 2013
13bc610
Remove old sample file
andr3nun3s Aug 9, 2013
037bdd2
Fix indentation
andr3nun3s Aug 9, 2013
8d3ac92
Fix style processing to support both inline and external styles.
mramato Aug 9, 2013
17013c2
Merge pull request #3 from mramato/mramato-kml-style-fixes
andr3nun3s Aug 9, 2013
24c4cba
Merge branch 'kml' of github.com:andre-nunes/cesium into kml
andr3nun3s Aug 9, 2013
01a6354
Fix coordinate handling
andr3nun3s Aug 13, 2013
cbddcd0
Code cleanup
andr3nun3s Aug 13, 2013
f0f3d55
Add spec for LineStyle
andr3nun3s Aug 13, 2013
2e2c90a
Tweak random color generation
andr3nun3s Aug 13, 2013
755ccaf
Fix bug that happens with 'undefined' colorMode
andr3nun3s Aug 13, 2013
cbea591
Add PolyStyle
andr3nun3s Aug 13, 2013
d34979d
Code cleanup
andr3nun3s Aug 13, 2013
c3f573f
Improve random color generation
andr3nun3s Aug 13, 2013
a3a2d61
Remove alpha component randomization
andr3nun3s Aug 14, 2013
ceab2cc
Comment out work in progress
andr3nun3s Aug 15, 2013
8da0086
Change RuntimeError to DeveloperError where appropriate
andr3nun3s Aug 15, 2013
0eef7a4
Merge branch 'master' into kml
andr3nun3s Aug 15, 2013
116dcdf
Add support to Polygons
andr3nun3s Aug 19, 2013
a55d17d
Add draft tests to PolyStyle and Polygon geometry
andr3nun3s Aug 19, 2013
5069d1b
Improve tests to Polygon geometry and PolyStyle
andr3nun3s Aug 19, 2013
7482e07
Finish test for PolyStyle
andr3nun3s Aug 20, 2013
c2c5bc8
Add support to MultiGeometry
andr3nun3s Aug 20, 2013
78651f6
Code cleanup
andr3nun3s Aug 20, 2013
6bbabab
Complete MultiGeometry support
andr3nun3s Aug 21, 2013
94ea7ca
Merge branch 'master' into kml
andr3nun3s Aug 22, 2013
6462c82
Tweak LabelStyle
andr3nun3s Aug 22, 2013
df6dc69
Merge branch 'master' into kml
andr3nun3s Aug 22, 2013
2e4aa22
Fix LabelStyle
andr3nun3s Aug 22, 2013
99a9f5d
Code cleanup
andr3nun3s Aug 22, 2013
4af6d72
Add Drag and Drop
andr3nun3s Aug 22, 2013
6940325
Major code cleanup
andr3nun3s Aug 23, 2013
44acfcb
Add unit tests for invalid inputs
andr3nun3s Aug 23, 2013
d851302
Tweak style code
andr3nun3s Aug 23, 2013
832ee64
Merge branch 'master' into kml
andr3nun3s Aug 23, 2013
e64953d
Update color function according to changes in Color.fromRandom
andr3nun3s Aug 23, 2013
89b53aa
Code cleanup
andr3nun3s Aug 24, 2013
a016176
Test LineStyle default values
andr3nun3s Aug 24, 2013
a296ad0
Test PolyStyle default values
andr3nun3s Aug 24, 2013
ceb5a3e
Test IconStyle default values
andr3nun3s Aug 24, 2013
bacd1ac
Test LabelStyle default values
andr3nun3s Aug 24, 2013
41015f0
Test if image paths are handled correctly
andr3nun3s Sep 4, 2013
da083d7
Merge branch 'master' into kml
andr3nun3s Sep 4, 2013
b82796c
Update polygon geometry
andr3nun3s Sep 4, 2013
4f39536
Merge branch 'master' into kml
andr3nun3s Sep 5, 2013
a02efd1
Add initial implementation of gx:Track
andr3nun3s Sep 5, 2013
d9d2546
Add test for gx:track
andr3nun3s Sep 5, 2013
7498442
Improve processGxTrack
andr3nun3s Sep 6, 2013
9d0cb65
Add gx:MultiTrack support
andr3nun3s Sep 6, 2013
127a164
Code cleanup
andr3nun3s Sep 9, 2013
637c9b7
Fix Drag and Drop
andr3nun3s Sep 9, 2013
190524f
Remove unnecessary variable
andr3nun3s Sep 9, 2013
968bf0f
Remove Polygon defaults
andr3nun3s Sep 9, 2013
4900d75
Add initial TimeSpan support
andr3nun3s Sep 10, 2013
e0128ec
Fix specs for TimeSpan
andr3nun3s Sep 10, 2013
4cf8a04
Style and coordinate fixes.
mramato Sep 11, 2013
d852483
Merge pull request #5 from mramato/kml-style-fixes
andr3nun3s Sep 11, 2013
3f7b9ba
Merge branch 'master' into kml
andr3nun3s Sep 11, 2013
85be6a3
Add unit test that uses coordinates with only 2 values
andr3nun3s Sep 11, 2013
f323642
Improve unit test for TimeSpan
andr3nun3s Sep 11, 2013
16a0fd7
Tweak KML date processing
andr3nun3s Sep 12, 2013
9da96bd
Improve support for time-dynamic data
andr3nun3s Sep 12, 2013
7bd023d
Replace DeveloperError with RuntimeError where appropriate
andr3nun3s Sep 12, 2013
d4ad137
First pass at KMZ support.
mramato Sep 12, 2013
ee29d70
Add license for zip.js
mramato Sep 12, 2013
de8a968
Misc cleanup.
mramato Sep 12, 2013
40a25cd
A bunch of misc cleanup.
mramato Sep 12, 2013
e40c782
Remove console.log
mramato Sep 12, 2013
51054b3
More cleanup.
mramato Sep 12, 2013
90e59ed
Merge pull request #6 from mramato/kml-cleanup
andr3nun3s Sep 13, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Apps/CesiumViewer/CesiumViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ define([
'Core/defined',
'DynamicScene/CzmlDataSource',
'DynamicScene/GeoJsonDataSource',
'DynamicScene/KmlDataSource',
'Scene/PerformanceDisplay',
'Widgets/checkForChromeFrame',
'Widgets/Viewer/Viewer',
Expand All @@ -13,6 +14,7 @@ define([
defined,
CzmlDataSource,
GeoJsonDataSource,
KmlDataSource,
PerformanceDisplay,
checkForChromeFrame,
Viewer,
Expand Down Expand Up @@ -89,21 +91,27 @@ define([

if (defined(endUserOptions.source)) {
var source;
var sourceFunctionName = 'loadUrl';
var sourceUrl = endUserOptions.source.toUpperCase();
if (endsWith(sourceUrl, '.GEOJSON') || //
endsWith(sourceUrl, '.JSON') || //
endsWith(sourceUrl, '.TOPOJSON')) {
source = new GeoJsonDataSource();
} else if (endsWith(sourceUrl, '.CZML')) {
source = new CzmlDataSource();
} else if (endsWith(sourceUrl, ".KML")) {
source = new KmlDataSource();
} else if (endsWith(sourceUrl, ".KMZ")) {
source = new KmlDataSource();
sourceFunctionName = 'loadKmzUrl';
} else {
loadingIndicator.style.display = 'none';

showLoadError(endUserOptions.source, 'Unknown format.');
}

if (defined(source)) {
source.loadUrl(endUserOptions.source).then(function() {
source[sourceFunctionName](endUserOptions.source).then(function() {
viewer.dataSources.add(source);

if (defined(endUserOptions.lookAt)) {
Expand Down
23 changes: 23 additions & 0 deletions Apps/CesiumViewer/Gallery/simplePlacemark.kml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id="randomColorIcon">
<IconStyle>
<color>ff00ff00</color>
<colorMode>random</colorMode>
<scale>1.1</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pal3/icon21.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<name>IconStyle.kml</name>
<styleUrl>#randomColorIcon</styleUrl>
<Point>
<coordinates>-9.171441666666666,38.67883055555556,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>

16 changes: 16 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ https://github.com/cujojs/when
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

### zip.js

https://github.com/gildas-lormeau/zip.js

> Copyright (c) 2013 Gildas Lormeau. All rights reserved.
>
> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
>
> 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
>
> 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
>
> 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission.
>
> THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

### webgl-noise

https://github.com/ashima/webgl-noise
Expand Down
Loading