Skip to main content

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

Sorry, I forgot that I could extend the existing PrecisionModel.
S

On Sat, 10 Nov 2018 13:02:30 +1100, Martin Davis <mtnclimb@xxxxxxxxx> wrote:

Not sure what you mean by "modify the function".  It's totally up to the client how it maintains Z values.  But the semantics of *not* automatically modifying the Z value is intentional.

That comment should be clarified in the method Javadoc.

On Fri, Nov 9, 2018 at 5:23 PM Simon SPDBA Greener <simon@xxxxxxxxxxxx> wrote:
But should I ignore....

//MD says it's OK that we're not makePrecise'ing the z [Jon Aquino]

And modify the function directly?

Simon

Sent from BlueMail
On 10 Nov. 2018, at 11:13, Martin Davis <mtnclimb@xxxxxxxxx> wrote:
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


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
_______________________________________________
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



--
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