I'm trying to parse the binary data in a sample .pnts file to better understand it's format and how to create a custom one. I'm trying to parse the sample points.pnts file found in:
https://github.com/AnalyticalGraphicsInc/cesium/tree/3d-tiles/Specs/Data/Cesium3DTiles/Points/Points
I'm following this format to parse: https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/TileFormats/Points/README.md
When I parse I get the first 3 positions as:
node ./pnt-reader.js
{ magic: 'pnts',
version: 1,
byteLength: 1875016,
pointsLength: 125000,
positions: [ 34.58336639404297, 88.80476379394531, -30.29364776611328 ] }
My question is: Are these supposed to be x,y,z coordinates in decimal degrees?
I've heard that the format will be changing soon but we'd like to glue together a demo ASAP so we'd like to get something working with this format if we can.
Thanks!
This link may help with these coordinate definitions - they are in RTC:
http://cesiumjs.org/forum.html#!msg/cesium-dev/exLzUPmmBPU/CAW_EM-VDgAJ
Hi Matthew,
Thanks again for sharing your code. I managed to make it run perfectly to convert .las
data and .xyz
data on both Linux
and Windows
system now for our project.
But when I tried to host them on IIS server
instead of on NodeJS
, it doesn’t load .pnts
files anymore.
I have edited the web.config
file as following:
<configuration>
<system.webServer>
<staticContent>
<remove fileExtension=".json" />
<mimeMap fileExtension=".json" mimeType="application/json" />
<remove fileExtension=".pnts" />
<mimeMap fileExtension=".pnts" mimeType="application/octet-stream" />
</staticContent>
</system.webServer>
</configuration>
So there is no error messages to serve .pnts
or .json
files.
But the console log showed that selectedTiles:Array(0)
instead of selectedTiles:Array(1)
. That means the .json
file has been loaded but .pnts
file has not.
I also checked the Cesium.js
source code which you implement the Cesium3DTileset
constructor. But it seems like the code is server-agnostic.
This problem has been bothered me many days and if you could help, I would appreciate A LOT!