Skip to content

kml markup not rendering on lunar surface except for polygons #6360

Open
@tamarmot

Description

@tamarmot

Completely baffled. I have some kml and when set up the KmlDataSource with NO ellipsoid, it renders perfectly with all parts (polygon, placemark points with icons, linestring, labels). When I pass in the ellipsoid (which is the moon) the coordinates are converted with that ellipsoid now, but the only thing that renders is the polygon.
Here are some sample coordinates and conversions (verified); the polygon works, the linestring does not work:

LINESTRING:
raw kml point:23.861553347627655,86.65742296849288,0
lunar Cartesian3 {x: 92642.03860773673, y: 40978.950634592955, z: 1734444.2736183512}

earth Cartesian3 {x: 341236.6801546356, y: 150941.42228430414, z: 6345865.286162752}


POLYGON
raw kml point 25.67192131885892,87.21092433056774,0
lunar Cartesian3 {x: 76195.65922995866, y: 36624.5155146179, z: 1735341.9335617495}

earth Cartesian3 {x: 280659.2405910161, y: 134902.8122497697, z: 6349171.658551163}


In looking at KmlDataSource readCoordinate, it calls:
return Cartesian3.fromDegrees(longitude, latitude, height, ellipsoid);
I also notice there is a separate function in Ellipsoid that is similar, and produces the same output:
return ellipsoid.cartographicToCartesian(new Cartographic(CesiumMath.toRadians(longitude), CesiumMath.toRadians(latitude), height));

This does not fix the fact that things don't draw.
I have verified that x^2 + y^2+ z^2 = ellipsoid_radius^2 for my points

I initially thought the problem had to do with styles, but I don't see how it can. I have also tested some kml that is not near the pole and it has the same problem.
I'm the contributor who added the ellipsoid in the first place but I verified that it is used to convert the coordinates, and in fact I'm pretty sure this USED to work when I committed that code (I think version 1.42).

Does anyone have any ideas?
thanks
Tamar

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions