org.ala.layers.util
Class SpatialUtil

java.lang.Object
  extended by org.ala.layers.util.SpatialUtil

public class SpatialUtil
extends java.lang.Object

Author:
Adam

Constructor Summary
SpatialUtil()
           
 
Method Summary
static double calculateArea(double[][] areaarr)
           
static double calculateArea(java.lang.String wkt)
           
static double cellArea(double resolution, double latitude)
           
static int convertLatToPixel(double lat)
           
static int convertLngToPixel(double lng)
           
static double convertMetersToLat(double meters)
           
static double convertMetersToLng(double meters)
           
static double convertMetersToPixels(double meters, double latitude, int zoom)
           
static double convertPixelsToMeters(int pixels, double latitude, int zoom)
           
static double convertPixelToLat(int px)
           
static double convertPixelToLng(int px)
           
static int planeDistance(double lat1, double lng1, double lat2, double lng2, int zoom)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpatialUtil

public SpatialUtil()
Method Detail

calculateArea

public static double calculateArea(double[][] areaarr)

calculateArea

public static double calculateArea(java.lang.String wkt)

convertLngToPixel

public static int convertLngToPixel(double lng)

convertPixelToLng

public static double convertPixelToLng(int px)

convertLatToPixel

public static int convertLatToPixel(double lat)

convertPixelToLat

public static double convertPixelToLat(int px)

convertMetersToPixels

public static double convertMetersToPixels(double meters,
                                           double latitude,
                                           int zoom)

convertPixelsToMeters

public static double convertPixelsToMeters(int pixels,
                                           double latitude,
                                           int zoom)

convertMetersToLng

public static double convertMetersToLng(double meters)

convertMetersToLat

public static double convertMetersToLat(double meters)

planeDistance

public static int planeDistance(double lat1,
                                double lng1,
                                double lat2,
                                double lng2,
                                int zoom)

cellArea

public static double cellArea(double resolution,
                              double latitude)


Copyright © 2014. All Rights Reserved.