2

All of the examples in Cesium show coordinates for the locations in the code. For example, for Wyoming they show the following. Where can we get these coordinates from? If I want to do Arkansas, is there a list of US states and their Cesium coordinates somewhere?

var wyoming = viewer.entities.add({
    name : 'Wyoming',
    polygon : {
        hierarchy : Cesium.Cartesian3.fromDegreesArray([
            -109.080842,45.002073,
            -105.91517,45.002073,
            -104.058488,44.996596,
            -104.053011,43.002989,
            -104.053011,41.003906,
            -105.728954,40.998429,
            -107.919731,41.003906,
            -109.04798,40.998429,
            -111.047063,40.998429,
            -111.047063,42.000709,
            -111.047063,44.476286,
            -111.05254,45.002073
        ]),
        material : Cesium.Color.RED.withAlpha(0.5),
        outline : true,
        outlineColor : Cesium.Color.BLACK
    }
});

viewer.zoomTo(wyoming);

closed as primarily opinion-based by neogeomat, BERA, Oto Kaláb, nmtoken, aldo_tapia Mar 19 '18 at 10:59

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • There are thousands of sources for coordinate data all over the globe, at many different scales, and in many projections, and in many formats. The Arkansas outline will be significantly longer in ASCII than Wyoming, due to the course of the Mississippi. – Vince Mar 12 '16 at 17:07
  • Thank you for the comment. All the datasets I see simply provide a single lat and lon for any given area. But this isn't how Cesium uses coordinates. It has a longer list to specify the whole area so that it can add its shapes. Do I need use shape files? – Cybernetic Mar 12 '16 at 18:49
  • 1
    There's a great deal of background that goes into this question, which is not well-suited to the GIS SE "focused question / best answer" model. You're asking about the difference between POINT and POLYGON datasets, and a binary vector format which, while extractable to ASCII with various tools, won't provide you ASCII coordinates directly. The Open Data SE group might be better suited to your request, but you'd need to refine it to focus on details. – Vince Mar 12 '16 at 19:33
0

Cesium does include a sample file Apps/SampleData/ne_10m_us_states.topojson containing the outlines of 50 US States. The demo is here:

Cesium GeoJSON and TopoJSON Demo

In this demo, you can click on any state for some simple metadata.

Not the answer you're looking for? Browse other questions tagged or ask your own question.