Skip to main content

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

You can do this:

coord.setZ( pm.makePrecise ( coord.getZ() ) );

On Fri, Nov 9, 2018 at 3:31 PM Simon (SPDBA) Greener <simon@xxxxxxxxxxxx> wrote:
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
_______________________________________________
jts-dev mailing list
jts-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/jts-dev

Back to the top