[pgpointcloud] Point Cloud Schema Document

Éric Lemoine eric.lemoine at oslandia.com
Wed Feb 21 08:04:19 PST 2018


On Thu, 2018-02-15 at 09:57 +0000, Sirdeshmukh, Neeraj wrote:
> Hello,
>  
> I am trying to simply create a Point Cloud Schema Document to work
> with pgPointCloud. However, I need to store latitude, longitude, and
> height coordinates in WGS84 that have up to 10 decimal places in the
> points and patches tables. Whenever I try to store these large
> values, and retrieve the data later on using the
> PC_AsText(p pcpatch) function, I only see 4-5 decimal places in the
> coordinate values.
>  
> I want to preserve the precision of the original data as much as
> possible, and not lose any decimal values. I tried using the ‘double’
> pc:interpretation type, but that does not work either. What would I
> need to do?

It's related to the interpretation/scale/offset values you use for the
dimensions in the schema document.

For example if you use size=4, interpretation=int32_t and scale=0.01
then the value you provide will be divided by scale (0.01) and then
rounded to the nearest INT32 value. So if your initial value is 5.4322
it will come out as 5.43.

So if you want to preserve the original value you can use size=8,
interpretation=double with no scale defined.

Hope that helps.
--
Éric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osgeo.org/pipermail/pgpointcloud/attachments/20180221/04baac74/attachment.sig>


More information about the pgpointcloud mailing list