oracle.panama.spatial.region
Interface RegionModel


public interface RegionModel

RegionModel interface.


Method Summary
TypeMethod
 java.lang.String[] getCountry(Point point)
          Given a Point in longitude and latitude, return which country this point is in.
 int[] getInteractRegions(int regionID)
          Given a region ID, compute all interacting regions.
 int[] getInteractRegions(int regionID, int[] regions)
          Given a region R identified by regID and a list of regions, compute all regions that are in the list and interact with R.
 int[] getInteractRegions(Point location)
          Given a Point (latitude/longitude)we can define an "area of interest" (AOI) with the location as the center.
 int[] getInteractRegions(Point location, int[] regions)
          Given a list of region-ids and an AOI (see documentation), return the region-ids for the regions that interact with the AOI.
 java.lang.String[] getPostalCode(Point point)
          Given a Point in longitude and latitude, return which postal code this point is in.
 java.lang.String[] getState(Point point)
          Given a Point in longitude and latitude, return which state/province this point is in.
 

Method Detail

getInteractRegions

public int[] getInteractRegions(Point location)
Given a Point (latitude/longitude)we can define an "area of interest" (AOI) with the location as the center. Then we can find all point locations that lie within the AOI and all "regions" (system and user defined) that overlap the AOI.
Parameters:
location - the Point (latitude/longitude) of the location
Returns:
int[] An asc sorted array of non zero region IDs that interact with the location. The array must be asc sorted to be used for binary search.

getInteractRegions

public int[] getInteractRegions(Point location,
                                int[] regions)
Given a list of region-ids and an AOI (see documentation), return the region-ids for the regions that interact with the AOI.
Parameters:
location - the Point (latitude/longitude) of the location
regions - An asc sorted array of non zero region IDs you want to check
Returns:
int[] An asc sorted array of non zero region IDs that interact with the location. The array must be asc sorted to be used for binary search.

getInteractRegions

public int[] getInteractRegions(int regionID)
Given a region ID, compute all interacting regions.
Parameters:
regionID - Region ID
Returns:
int[] An asc sorted array of non zero region IDs that interact with the location. The array must be asc sorted to be used for binary search.

getInteractRegions

public int[] getInteractRegions(int regionID,
                                int[] regions)
Given a region R identified by regID and a list of regions, compute all regions that are in the list and interact with R.
Parameters:
regionID - Region ID.
regions - An asc sorted array of non zero region IDs you want to check
Returns:
int[] An asc sorted array of non zero region IDs that interact. he array must be asc sorted to be used for binary search.

getPostalCode

public java.lang.String[] getPostalCode(Point point)
Given a Point in longitude and latitude, return which postal code this point is in.
Parameters:
point - the Point which postal codes we want to find
Returns:
String array representing the postal code that contains the point. If no postal code could be found that contains the point, then null is returned. Please note that this function may return you mutiple postal codes if the point is very close to postal code boundaries. The accuracy of this function depends on the region data quality in the repository.

getState

public java.lang.String[] getState(Point point)
Given a Point in longitude and latitude, return which state/province this point is in.
Parameters:
point - the Point which state/province we want to find
Returns:
String array representing the states that contains the point. If no state could be found that contains the point, then null is returned. Please note that this function may return you mutiple states if the point is very close to state boundaries. The accuracy of this function depends on the region data quality in the repository.

getCountry

public java.lang.String[] getCountry(Point point)
Given a Point in longitude and latitude, return which country this point is in.
Parameters:
point - the Point which country we want to find
Returns:
String array representing the countries that contains the point. If no country could be found that contains the point, then null is returned. Please note that this function may return you mutiple countries if the point is very close to country boundaries. The accuracy of this function depends on the region data quality in the repository.