|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class defines the RegionModel interface. It describes basic methods for searching and working with regions.
Method Summary | |
Location[] |
getCitiesInCountry(java.lang.String country) Get all cities in a country. |
Location[] |
getCitiesInState(java.lang.String state, java.lang.String country) Get all cities in a state. |
java.lang.String[] |
getContinents() Get the names of all continents. |
Location[] |
getCountiesInState(java.lang.String state, java.lang.String country) Get all counties in a state. |
Location[] |
getCountriesInContinent(java.lang.String continent) Get all the countries in a continent. |
java.lang.String[] |
getCountry(Point point) Given a Point in longitude and latitude, return which country this point is in. |
double |
getDistanceInMeter(Point point, int regionId) Get distance, in meters, between a Point and a Region. |
Location[] |
getInteractCities(Point point) Given a Point (latitude/longitude), find all cities that interact with the point. |
Location[] |
getInteractCountries(Point point) Given a Point (latitude/longitude), find all countries that interact with the point. |
Location[] |
getInteractPostalCodes(Point point) Given a Point (latitude/longitude), find all postal codes that interact with the point. |
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. |
Location[] |
getInteractStates(Point point) Given a Point (latitude/longitude), find all states that interact with the point. |
java.lang.String[] |
getPostalCode(Point point) Deprecated. Replaced by getInteractPostalCodes(Point). The application should call getInteractPostalCodes and get postal code from the returned locations. |
Location[] |
getPostalCodesInCity(java.lang.String city, java.lang.String state, java.lang.String country) Get all postal codes in a city. |
java.lang.String[] |
getState(Point point) Deprecated. Replaced by getInteractStates(Point). The application should call that function and then call getState from the returned locations. |
Location[] |
getStatesInCountry(java.lang.String country) Get all states in a country. |
boolean |
inside(Point point, int regionId) Check whether a Point is inside a region. |
Location[] |
searchCity(java.lang.String city) Search for cities. |
Location[] |
searchPCode(java.lang.String pcode) Search for postal codes. |
Location[] |
searchPCode(java.lang.String pcode, boolean includeCity) Search for postal codes. |
RMRegion[] |
searchRegions(Location location) Search for regions with the given location. |
Location[] |
searchState(java.lang.String state) Search for states. |
Location[] |
searchStateByAbbr(java.lang.String stateAbbr, java.lang.String country) Search for states by abbreviation. |
Method Detail |
public Location[] getCitiesInCountry(java.lang.String country) throws oracle.panama.spatial.core.region.RMException
country
- A String representing the name of the country. The country name parameters must be an exact match (case insensitive) to a country in the region modeling data. You are recommended to do a search for a country first, then use the names in the return result to call this function.oracle.panama.spatial.core.region.RMException
- if error occurs.public Location[] getCitiesInState(java.lang.String state, java.lang.String country) throws oracle.panama.spatial.core.region.RMException
state
- A String representing the name of the state.country
- A String representing the name of the country. The state and country name parameters must be an exact match (case insensitive) to a state in the region modeling data. You are recommended to do a search for a state first, then use the names in the return result to call this function.oracle.panama.spatial.core.region.RMException
- if error occurs.public java.lang.String[] getContinents() throws oracle.panama.spatial.core.region.RMException
oracle.panama.spatial.core.region.RMException
- if error occurs.public Location[] getCountiesInState(java.lang.String state, java.lang.String country) throws oracle.panama.spatial.core.region.RMException
state
- A String representing the name of the state.country
- A String representing the name of the country. The state and country name parameters must be an exact match (case insensitive) to a state in the region modeling data. You are recommended to do a search for a state first, then use the names in the return result to call this function.oracle.panama.spatial.core.region.RMException
- if error occurs.public Location[] getCountriesInContinent(java.lang.String continent) throws oracle.panama.spatial.core.region.RMException
continent
- A String representing the name of the continent. The continent name parameter must be an exact match (case insensitive) to a continent in the region modeling data. You are recommended to do a search for continents first, then use the names in the return result to call this function.oracle.panama.spatial.core.region.RMException
- if error occurs.public java.lang.String[] getCountry(Point point)
Point
in longitude and latitude, return which country this point is in.point
- the Point
which country we want to findnull
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.public double getDistanceInMeter(Point point, int regionId) throws oracle.panama.spatial.core.region.RMException
point
- A Point object.oracle.panama.spatial.core.region.RMException
public Location[] getInteractCities(Point point)
Point
(latitude/longitude), find all cities that interact with the point. This function depends on the region data in the repository.public Location[] getInteractCountries(Point point)
Point
(latitude/longitude), find all countries that interact with the point. This function depends on the region data in the repository.public Location[] getInteractPostalCodes(Point point)
Point
(latitude/longitude), find all postal codes that interact with the point. This function depends on the region data in the repository.public int[] getInteractRegions(int regionID)
regionID
- Region IDpublic int[] getInteractRegions(int regionID, int[] regions)
regionID
- Region ID.regions
- An asc sorted array of non zero region IDs you want to checkpublic int[] getInteractRegions(Point location)
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.location
- the Point
(latitude/longitude) of the locationpublic int[] getInteractRegions(Point location, int[] regions)
location
- the Point
(latitude/longitude) of the locationregions
- An asc sorted array of non zero region IDs you want to checkpublic Location[] getInteractStates(Point point)
Point
(latitude/longitude), find all states that interact with the point. This function depends on the region data in the repository.public java.lang.String[] getPostalCode(Point point)
Point
in longitude and latitude, return which postal code this point is in.point
- the Point
which postal codes we want to findnull
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.public Location[] getPostalCodesInCity(java.lang.String city, java.lang.String state, java.lang.String country) throws oracle.panama.spatial.core.region.RMException
city
- A String representing the name of the city.state
- A String representing the name of the state. For countries without state, this parameter must be null
.country
- A String representing the name of the country. The city, state and country name parameters must be an exact match (case insensitive) in the region modeling data. You are recommended to do a search for a city first, then use the names in the return result to call this function.oracle.panama.spatial.core.region.RMException
- if error occurs.public java.lang.String[] getState(Point point)
Point
in longitude and latitude, return which state/province this point is in.point
- the Point
which state/province we want to findnull
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.public Location[] getStatesInCountry(java.lang.String country) throws oracle.panama.spatial.core.region.RMException
country
- A String representing the name of the country. The country name parameter must be an exact match (case insensitive) to a country in the region modeling data. You are recommended to do a search for a country first, then use the names in the return result to call this function.oracle.panama.spatial.core.region.RMException
- if error occurs.public boolean inside(Point point, int regionId) throws oracle.panama.spatial.core.region.RMException
point
- A Point object.oracle.panama.spatial.core.region.RMException
public Location[] searchCity(java.lang.String city)
city
- A String representing the city name. Support '*' and '?' as the wild cards. For example "San Francisco", "S?n Fran*".public Location[] searchPCode(java.lang.String pcode)
pcode
- A String representing the postal code. Support '*' and '?' as the wild cards. For example "94065", "94??5", or "0406?".public Location[] searchPCode(java.lang.String pcode, boolean includeCity)
pcode
- A String representing the postal code. Support '*' and '?' as the wild cards. For example "94065", "94??5", or "0406?". Do NOT use just a wild card as the input parameter as that may result in thousands of location and that can be extremely expensive.includeCity
- A boolean value indicating whether you want the city name to be included in the returned location array. Postal code data is not directly associated with city data. In order to figure out what city a postal code resides in a spatial query is required. Therefore, setting this value to true makes the method more expensive. To get city name from a postal code without city information, use getInteractCities()
method.public RMRegion[] searchRegions(Location location)
location
- A Location object based on which the search is done.public Location[] searchState(java.lang.String state)
state
- A String representing the state name. Support '*' and '?' as the wild cards. For example "Massach*".public Location[] searchStateByAbbr(java.lang.String stateAbbr, java.lang.String country)
stateAbbr
- A String representing the state name abbreviation. Support '*' and '?' as the wild cards. For example "M?".country
- A String representing the name of the country. Support '*' and '?' as the wild cards. For example "US*".
|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |