src/com/wherehoo/WHGeo.java
/**
     * Converts <tt>point</tt> so its parameters fall within proper Wherehoo ranges.  
     *These are:<br>
     *- (-90,90) for X coordinate (representing latitude)<br>
     *- (0,360) for Y coordinate (representing longitude)<br> 
     *@param point the point that needs to be converted, so its coordinates fall within proper Wherehoo ranges.
     */
Converts point so its parameters fall within proper Wherehoo ranges.
These are:
(-90,90) for X coordinate (representing latitude)
(0,360) for Y coordinate (representing longitude)
@param point the point that needs to be converted, so its coordinates fall within proper Wherehoo ranges.
Converts point so its parameters fall within proper Wherehoo ranges . These are : ( - 90 90 ) for X coordinate ( representing latitude ) ( 0 360 ) for Y coordinate ( representing longitude ) @param point the point that needs to be converted so its coordinates fall within proper Wherehoo ranges .
public static void toWHFormat(Point2D.Double point){
	BigDecimal x= new BigDecimal(point.getX());
	BigDecimal y= new BigDecimal(point.getY());
	BigDecimal _360 = new BigDecimal(360);
	double lat,lon;
	BigDecimal adjustX=x.divide(_360,BigDecimal.ROUND_FLOOR);
	adjustX=new BigDecimal(adjustX.intValue());
      	x=x.subtract(adjustX.multiply(_360));
	lat=x.doubleValue();
	if (lat<=180 && lat>90){
	    x=x.negate();
	    x=x.add(new BigDecimal(180));
	} else {
	    if (!(lat<90)){
		x=x.subtract(_360);
		if(lat>180 && lat<270){
		    x=x.negate();
		    x=x.add(new BigDecimal(-180));
		}
	    }   
	}
	BigDecimal adjustY=y.divide(_360,BigDecimal.ROUND_FLOOR);
	adjustY=new BigDecimal(adjustY.intValue());
	y=y.subtract(adjustY.multiply(_360));
	point.setLocation(x.doubleValue(),y.doubleValue());
    }
public static void toWHFormat ( Point2D . Double point ) { BigDecimal x = new BigDecimal ( point . getX ( ) ) ; BigDecimal y = new BigDecimal ( point . getY ( ) ) ; BigDecimal _360 = new BigDecimal ( 360 ) ; double lat , lon ; BigDecimal adjustX = x . divide ( _360 , BigDecimal . ROUND_FLOOR ) ; adjustX = new BigDecimal ( adjustX . intValue ( ) ) ; x = x . subtract ( adjustX . multiply ( _360 ) ) ; lat = x . doubleValue ( ) ; if ( lat <= 180 && lat > 90 ) { x = x . negate ( ) ; x = x . add ( new BigDecimal ( 180 ) ) ; } else { if ( ! ( lat < 90 ) ) { x = x . subtract ( _360 ) ; if ( lat > 180 && lat < 270 ) { x = x . negate ( ) ; x = x . add ( new BigDecimal ( - 180 ) ) ; } } } BigDecimal adjustY = y . divide ( _360 , BigDecimal . ROUND_FLOOR ) ; adjustY = new BigDecimal ( adjustY . intValue ( ) ) ; y = y . subtract ( adjustY . multiply ( _360 ) ) ; point . setLocation ( x . doubleValue ( ) , y . doubleValue ( ) ) ; }
Converts <tt>point</tt> so its parameters fall within proper Wherehoo ranges.
Converts <tt > point< / tt > so its parameters fall within proper Wherehoo ranges .
//if latitude has values outside (-90,90), convert
 //convert to (0,360) range
 //convert to (-90,90) range
 //System.out.println("lat between 90 and 180");
 //System.out.println("lat between 180 and 270");
 //if longitude has values outside (0,360), convert
