Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jts-dev] PrecisionModel.makePrecise

I note in PrecisionModel the method:

/**
* Rounds a Coordinate to the PrecisionModel grid.
*/
public void makePrecise(Coordinate coord)
{
// optimization for full precision
if (modelType == FLOATING) return;

coord.x = makePrecise(coord.x);
coord.y = makePrecise(coord.y);
//MD says it's OK that we're not makePrecise'ing the z [Jon Aquino]
}

I would like to be able to apply a precision factor eg round to 1mm (0.001/3) any Z values.

Given what this method does, what is the best way/place to round/makePrecision any Z ordinates?

Regards
Simon
--------------------------------------------------------------------------------------------------------
Spatial Advice & Solutions Architecture
Database Spatial Stored Procedure Designer

Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE FME
Awarded "2011 Oracle Spatial Excellence Award for Education and Research"
A: 39 Cliff View Drive, Allens Rivulet, 7150, Tas, Aust
W: www.spdba.com.au
E: simon@xxxxxxxxxxxx
V: +61 362 396 397
M: +61 418 396 391
GITC Supplier: T1005
Skype: sggreener
Long: 147.20515 (147° 12' 18" E)
Lat: -43.01530 (43° 00' 55" S)
GeoHash: r22em9r98wg
NAC:W80CK 7SWP3

Back to the top