[OSM-dev] osm2pgsql / postgis precision
Jan-Benedict Glaw
jbglaw at lug-owl.de
Thu Jul 2 18:44:10 BST 2009
On Wed, 2009-07-01 19:13:26 +0100, Jon Burgess <jburgess777 at googlemail.com> wrote:
> On Wed, 2009-07-01 at 13:51 +0200, Etienne Chové wrote:
> > Etienne Chové a écrit :
> > > The difference is not really significant but postgis says
> > > polygons are olvelapping each other while they have just a
> > > common boundary.
> >
> > The errors doesn't appear when I delete lines "#define
> > FIXED_POINT" in middle_ram.c and middle_pgsql.c
> >
> > Is it danerous to delete them ?
>
> I have come across this issue before, the 'slim' mode can fetch the node
> positions from the DB or from a RAM cache. The DB stores the positions
> in doubles (giving 53 bits of precision), the RAM cache uses fixed point
> arithmetic giving around 32 bits of precision. 32 bits is perfectly
> sufficient for OSM and halves the storage size.
Are you 100% sure about that comment?
ISTR that at some time, I calculated the accuracy of 32bit (float) at
the aequator, which resulted in +/- 15cm or the like. This may or may
not be enough...
MfG, JBG
--
Jan-Benedict Glaw jbglaw at lug-owl.de +49-172-7608481
Signature of: Arroganz verkürzt fruchtlose Gespräche.
the second : -- Jan-Benedict Glaw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090702/c879ecfb/attachment.pgp>
More information about the dev
mailing list