Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jts-dev] Simple cast problem

In my Java code I create a Geometry object that could be of any type.

I test that the Geometry us if type Polygon then do a cast. My code terminates with no exception thrown....

Geometry g = ......;
if ( g instanceof Polygon) {
   Polygon p = (Polygon) g;
   //Process polygon
}

Any help trying to work out what is going on appreciated.

Simon

39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia
(P) 03 62 396 397
(M) 0418 396 381
(W) www.spdba.com.au

Back to the top