Re: Multiple Objects

191 views
Skip to first unread message
Message has been deleted

Mark Erikson

unread,
Dec 23, 2014, 11:49:51 PM12/23/14
to cesiu...@googlegroups.com
For borders, check out the Natural Earth project at http://www.naturalearthdata.com/ .  Some nice vector data sets there.

On Tuesday, December 23, 2014 12:24:40 PM UTC-5, Emily Brandsdorfer wrote:
Hello,
 I am trying to demonstrate something very similar to the CZML data source example in sandcastle. I have multiple objects that are moving around and for whatever reason even though they have a set interval/availability. It runs one object then the next then the next even though a few are supposed to be moving simultaneously. Any suggestions on how I can code this?

I am also looking for offline imagery of country borders, does anyone know where I can find this?

Emily

Matthew Amato

unread,
Dec 29, 2014, 9:51:59 AM12/29/14
to cesiu...@googlegroups.com
Can you post your CZML?  If so I can take a quick look for you.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Mark Erikson

unread,
Jan 3, 2015, 3:12:16 AM1/3/15
to cesiu...@googlegroups.com
Ah, good point. 

So, last year I had a similar task of needing to generate a file of vector country borders and a file of country label locations for the Cesium-based app we were building.  I started with the Natural Earth "110m Country" dataset available at http://www.naturalearthdata.com/downloads/110m-cultural-vectors/110m-admin-0-countries/ .  The zip file available for download contains data in the "ESRI shapefile" format ( https://en.wikipedia.org/wiki/Shapefile ), which is a widely used geodata format for vector data.

Now, Cesium doesn't understand shapefiles directly.  However, there is a "CZML-Writer" project that is able to do some offline conversion of data into CZML format ( https://github.com/AnalyticalGraphicsInc/czml-writer ).  I wound up cloning that repo, poking around the C# version implementation, and adding some abilities to it to allow it to perform the exact conversion process I wanted.  If I remember right, it had shapefile logic in the codebase, but for some reason it wasn't actually hooked up to the CLI at the time.  Also, I wanted to do some filtering of what shapefile entries were being converted based on some of the data attributes, and spent some time adding a custom bit of argument handling based on a 3rd-party expression parsing library.  I also generated the country label locations based on calculating the centroids of the largest single polygon for each country, which produced adequate results (found out later that apparently label placement is actually an area of pretty serious academic research).

Ultimately, I was able to produce the two CZML files I needed, and moved on.  I tried to get permission to submit my CZML-Writer changes back to the Cesium project, but got shot down at the time.  I'll be back into the office on Monday, and may take another stab at getting those submitted.

In any case, the TL;DR version is that ultimately you'll need to take the polygon geocoordinates in the Natural Earth shapefiles and turn those into CZML polygon entries.  Hopefully that'll give you enough of a pointer to work from.

Mark Erikson

On Friday, January 2, 2015 11:46:59 AM UTC-5, Emily Brandsdorfer wrote:
Mark,
 I've downloaded it, but I am not sure how to put it into Cesium
Reply all
Reply to author
Forward
0 new messages