How is a .pnts file generated?

610 views
Skip to first unread message

brenda...@gmail.com

unread,
Mar 22, 2016, 1:18:26 PM3/22/16
to cesium-dev
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!

Matthew Shaxted

unread,
Mar 27, 2016, 3:17:55 PM3/27/16
to cesium-dev, brenda...@gmail.com
This link may help with these coordinate definitions - they are in RTC:

Matthew Shaxted

unread,
Mar 27, 2016, 10:35:12 PM3/27/16
to cesium-dev, brenda...@gmail.com

Shirui Wang

unread,
Apr 18, 2017, 12:07:03 PM4/18/17
to cesium-dev, brenda...@gmail.com

Hi Matthew,
Thanks again for sharing your code. I managed to make it run perfectly to convert .las data and .xyzdata 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!

Reply all
Reply to author
Forward
0 new messages