input
stringlengths
10
828
output
stringlengths
5
107
public double get radius return 0
get the radius for this geo shape
public boolean contains double x double y double w double h boolean inside false for geo shape shape this inside shape contains x y w h return inside
tests if the interior of the shape entirely contains the specified
public boolean contains point2 d point boolean inside false for geo shape shape this inside shape contains point return inside
tests if the specified point is inside the boundary of the shape
public boolean intersects double x double y double w double h return trans shape intersects x y w h
tests if the interior of the shape intersects the interior of a
public boolean contains rectangle2 d rect boolean inside false for geo shape shape this inside shape contains rect return inside
tests if the interior of the shape entirely contains the specified
public rectangle get bounds rectangle bounds null for geo shape shape this if bounds null bounds shape get bounds else bounds bounds union shape get bounds return bounds
returns an integer rectangle that completely encloses the shape
public boolean intersects rectangle2 d rect return trans shape intersects rect
tests if the interior of the shape intersects the interior of a
public rectangle2 d get bounds2 d return get bounds
returns a high precision rectangle that completely encloses the shape
private void move marker trans shape reset if proj point null trans shape append get marker shape false trans shape transform new affine transform 1 0 0 1 proj point x proj point y
move the internal marker location
public geo coord get center if center null calc center radius return center
get the center of the shape
public void project projection proj try proj point proj project coord move marker catch projection exception e trans shape reset proj point null
projects the geographic coordinates into the given projection
public void set marker shape shape shape if render style null render style new render style render style set marker shape shape if proj point null move marker
set the shape used to render the marker
public boolean check point geo coord coord boolean within shape false if filter shape null try point proj pt projection project coord if radius 0 within shape filter shape contains proj pt else geo bounds bounds new geo bounds coord radius bounds project projection within shape filter shape intersects bounds catch projection exception exc ignore and return false return within shape
check the given coordinates to see if it intersects or lies near the
public geo shape get filter shape return filter shape
get the internal geographic shape used to filter points
public geo bounds get geo bounds double min lon 180 double max lon 180 double min lat 90 double max lat 90 for geo shape shape this geo bounds bounds shape get geo bounds max lat math max max lat bounds get max latitude max lon math max max lon bounds get max longitude min lat math min min lat bounds get min latitude min lon math min min lon bounds get min longitude return new geo bounds min lat max lat min lon max lon
get the geographic bounds for this shape
public void set filter shape geo shape shape filter shape shape if projection null projection new equirect use a large size viewport for projecting to increase accuracy projection set view bounds new rectangle 0 0 1000000 1000000 filter shape project projection
set the shape used to perform the geographic filtering
public void set radius double rad radius rad
set the comparison radius
public void set feature class string feature classes if feature classes null feat class str else feat class feature classes to upper case string buffer feat buf new string buffer for int i 0 i feature classes length i char feat feat class char at i if character is letter feat feat buf append feature class feat feat class str feat buf to string
set the feature classes this locator will use
public path iterator get path iterator affine transform at return new multi path iterator this at
returns an iterator object that iterates along the shape boundary and
public object get data return exc data
gets the data associated with the exception
public path iterator get path iterator affine transform at double flatness return new flattening path iterator new multi path iterator this at flatness
returns an iterator object that iterates along the shape boundary and
public boolean add geo shape shape return shapes add shape
add a shape to this geographic layer
public boolean add all collection geo shape shape coll return shapes add all shape coll
add all of a collection of geographic shapes to this layer
public double get radius if center null calc center radius return radius
get the radius for this geo multi shape
public void set geo path string path geo path path
set the base geo names path
public color get draw color return render style get draw color
get the drawing color for this layer
public color get fill color return render style get fill color
get the fill color for this layer
public boolean intersects double x double y double w double h boolean meets false for geo shape shape this meets shape intersects x y w h return meets
tests if the interior of the shape intersects the interior of a
public geo bounds get geo bounds double min lon 180 double max lon 180 double min lat 90 double max lat 90 for geo shape shape shapes geo bounds bounds shape get geo bounds max lat math max max lat bounds get max latitude max lon math max max lon bounds get max longitude min lat math min min lat bounds get min latitude min lon math min min lon bounds get min longitude return new geo bounds min lat max lat min lon max lon
get the geographic bounds for this layer
public void set retry flag boolean retry flag retry retry flag
set the flag indicating whether to allow retrying when the servers are
public void add coord geo coord coord coords put 1000 0 coord no point should have 1000 as a key generate hull coords values to array new geo coord 0
add a coordinate to the set of points for the convex hull
public boolean intersects rectangle2 d rect boolean meets false for geo shape shape this meets shape intersects rect return meets
tests if the interior of the shape intersects the interior of a
public int get pick radius return pick radius
get the radius used for picking shapes in this layer
public void project projection proj for geo shape shape this shape project proj
projects the geographic coordinates into the given projection
public geo shape pick geo point2 d point geo shape picked null if pickable make rectangle to intersect shape with rectangle2 d rect new rectangle2 d double point get x pick radius point get y pick radius 2 pick radius 2 pick radius for iterator geo shape iter shapes iterator picked null iter has next geo shape shape iter next if pick radius 0 if shape contains point picked shape else if shape intersects rect picked shape return picked
pick the shape at the specified geographic point
public void project projection proj reset point pts proj project hull pts to array new geo coord 0 for point point pts if point null add point point x point y
projects the geographic coordinates into the given projection
public void remove coord geo coord coord if coords contains value coord remove the coordinate by determining its azimuth double azim center get azimuth coord coords remove azim if hull pts contains coord generate hull coords values to array new geo coord 0
remove a point from the convex hull
public void project projection proj for geo shape shape shapes shape project proj
projects the geographic coordinates into the given projection
public void set colors color draw color color fill color render style set draw color draw color render style set fill color fill color
set the draw and fill colors for this layer
public void set draw color color color render style set draw color color
set the draw color for this layer
public void set fill color color color render style set fill color color
set the fill color for this layer
public double get minor radius return minor rad
gets the minor radius short axis for this ellipse
public void set marker shape shape marker for geo shape shape shapes if shape instanceof geo marker geo marker shape set marker shape marker
set the marker shape for this layer
public void add filter geo shape shape if shape null shape get data null string name shape get data get name add filter name shape
add a geographic shape to the set of filters
public void add filter string shape name geo shape shape if shape null shape name null geo filter filter new geo filter shape filter set radius get radius filters put filter shape name all shapes add shape
add a geographic shape to the set of filters
public string pick shape geo coord coord string picked null for geo filter filter filters key set if filter check point coord picked filters get filter return picked
return the name of the shape picked for the given coordinate
public void set pickable boolean is pickable pickable is pickable
set whether this layer is pickable
public double get weight return my weight
gets the weight
public void set weight double weight my weight weight
sets the weight
public void add layer geo layer layer canvas add layer layer
add a geographic layer to the display
public void set pick radius int radius pick radius radius
set the radius used for picking shapes in this layer
protected void handle pick geo shape picked if picked null data record rec picked get data if rec null info area set text rec get name n rec write fields to string
handle the picking of a geo shape
public void add term string word terms add word
add a word to the set of match words for this filter
public void add terms set string words terms add all words
add words to the set of match words for this filter
private boolean match all words data record rec set string all vals get text vals rec boolean match true for iterator string term iter terms iterator term iter has next match string term term iter next boolean found false for string val all vals if val contains term found true match found return match
return whether all the words are matched in the data record
private boolean match any word data record rec set string all vals get text vals rec boolean match false for iterator string term iter terms iterator term iter has next match string term term iter next for string val all vals if val contains term match true return match
return whether any of the words are matched in the data record
public void set match all boolean flag match all flag
set the match all flag
public int get xoffset return x off
get the xoffset for this marker icon
public void redraw map canvas repaint
redraw the current map
public int get yoffset return y off
get the yoffset for this marker icon
public boolean is point return get icon width 2 get icon height 2
return whether this marker icon is a single point
public void set offset int x offset int y offset x off x offset y off y offset
set the offset for this marker icon
public void set base url url base url base dir base url
set the base esri url used to access shape files
public void write to file string file name
write this icon to a file
protected jpanel setup action pane return null
set up an action pane which can be used within this application
public string guess value string value hash set string good values int dist max dist 1 string guessed null for string str good values int cur dist string utils calc word distance value str if cur dist dist dist cur dist guessed str return guessed
find the best match from a set of strings for a particular value
public void set max distance int distance max dist distance
set the maximum distance for word replacement
public void set min count int count min count count
set the minimum count for a field value
public void add field value string field name v field value set v values get field name if values null values new hash set v put field name values values add field value
add a value to the given field
public v get field string field name v value null set v values get field name if values null value values iterator next return value
gets the value for a particular field
public string get field as string string field name string str null set v values get field name if values null string buffer buf new string buffer for v value values buf append value to string buf append int len buf length str buf substring 0 len 1 return str
gets the value of the specified field converted to a string
public boolean is multi valued string field name set v values get field name return values null values size 1
return whether the given field has multiple values
public void merge data multi value map v other map for string key other map key set set v other vals other map get key set v my vals get key if my vals null my vals new hash set v put key my vals my vals add all other vals
merges the data from another multi value map with this one
public void remove field value string field name v field value set v values get field name if values null values remove field value if values is empty remove field name
remove a value from the set of values for the given field name
public void set field string field name v field value set v values get field name if values null values new hash set v put field name values else values clear values add field value
sets the value for a particular field
public double get convert factor return convert factor
get the conversion factor for this unit
protected string get body class return body class
get the body class for this html doc data
protected string get body tag return body tag
get the body tag for this html doc data
public void show layer list list geo layer layers canvas get layers if layers is empty layer editor set layers canvas get layers layer editor set visible true
display the geographic layer editor
public string get section tag return section tag
get the section tag
protected void show text string text info area set text text
show the text string in the scrolling information window
public string get time stamp tag return time stamp tag
get the timestamp tag
public void state changed change event evt canvas set layers layer editor get layers canvas repaint
receive a state changed event
protected string get title tag return title tag
get the title tag for this html doc data
private boolean accept and data record rec for doc filter term terms if term accept rec fail fast easiest with internal return here return false return true
return whether the data record is accepted by this filter
public int get distance return dist
get the distance for this proximity search
private boolean accept or data record rec for doc filter term terms if term accept rec succeed fast easiest with internal return here return true return false
return whether the data record is accepted by this filter
public string get term1 return word1
get the first term for this proximity search
public void add term doc filter term if term instanceof tree clause tree clause term is and and flatten query terms add all tree clause term get terms else terms add term
add a term to this tree clause
public url get url return html ref
get the url for this particular html doc data object
public string get term2 return word2
get the second term for this proximity search
public void add terms set doc filter query terms terms add all query terms
add a set of terms to this clause
public void clear terms terms clear
remove all terms from this tree clause
public boolean match text string text if word1 null word2 null throw new null pointer exception one of the proximity search terms is null boolean is match false string words text split s int last inx1 1 int last inx2 1 for int i 0 i words length is match i string word words i if word equals word1 is match ordered last inx2 1 i last inx2 dist 1 last inx1 i else if word equals word2 is match last inx1 1 i last inx1 dist 1 last inx2 i return is match
match this filter against the body of text
public void set term1 string term word1 term
set the first term for this proximity search
public void set term2 string term word2 term
set the second term for this proximity search
public boolean is flat boolean flat true for doc filter term terms flat term instanceof tree clause return flat
return whether this boolean clause is flat
public doc filter get negated filter return clause
return the filter that is negated by this not clause
public boolean accept doc data doc boolean match match doc doc if match tag null doc add key tag return match
return whether the represented document is accepted by this filter
public void set and boolean and flag and and flag
set whether this tree is an and tree or an or tree