Hi Justin,

> What would be the easiest way to randomly generate points within a

> given geometry? I was hoping getInteriorPoint() would do so but it

> always returns the same point.

Be sure that if getInteriorPoint() had done what you want, somebody

would already have requested that it does return always the same point ;-)

Just joking. Don't know what you really need to achieve but here is how

I would do (not tested) :

env = geometry.getInternalEvelope()

// create a random point in the geometry envelope

x = env.getMinX() + Math.random()*env.getWidth();

y = env.getMinY() + Math.random()*env.getHeight();

test if (x, y) is inside your geometry, if not try another random point

pros : random aspect should be quite good

cons : quite expansive because of test inclusion

May be there is a more efficient solution by hacking

getInteriorPointMethod()

Michaël

> ------------------------------------------------------------------------

>

> _______________________________________________

> jts-devel mailing list

>

[hidden email]
>

http://lists.refractions.net/mailman/listinfo/jts-devel>

_______________________________________________

jts-devel mailing list

[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel