@ Pure public Rectangle2d toBounds2D ( ) { int startIndex = this . id . indexOf ( ' ' ) ; if ( startIndex <= 0 ) { return null ; } try { int endIndex = this . id . indexOf ( ' ' , startIndex ) ; if ( endIndex <= startIndex ) { return null ; } final long minx = Long . parseLong ( this . id . substring ( startIndex + 1 , endIndex ) ) ; startIndex = endIndex + 1 ; endIndex = this . id . indexOf ( ' ' , startIndex ) ; if ( endIndex <= startIndex ) { return null ; } final long miny = Long . parseLong ( this . id . substring ( startIndex , endIndex ) ) ; startIndex = endIndex + 1 ; endIndex = this . id . indexOf ( ' ' , startIndex ) ; if ( endIndex <= startIndex ) { return null ; } final long maxx = Long . parseLong ( this . id . substring ( startIndex , endIndex ) ) ; startIndex = endIndex + 1 ; final long maxy = Long . parseLong ( this . id . substring ( startIndex ) ) ; final Rectangle2d r = new Rectangle2d ( ) ; r . setFromCorners ( minx , miny , maxx , maxy ) ; return r ; } catch ( Throwable exception ) { // } return null ; }
Extract the primitive bounds from this geoId .