Package | Description |
---|---|
org.openstreetmap.josm.data.validation.tests |
Provides the classes for JOSM data validation tests.
|
org.openstreetmap.josm.gui.mappaint |
Drawing system allowing to display and render OSM map data in a user-friendly and customizable way, through map styles.
Two implementations are provided: XML: this was the system used by default JOSM map style for a long time. |
org.openstreetmap.josm.gui.mappaint.mapcss |
Drawing system based on MapCSS map styles.
|
org.openstreetmap.josm.gui.mappaint.styleelement |
Style elements defining how a map paint style is rendered.
|
Modifier and Type | Method and Description |
---|---|
private java.util.List<TestError> |
MapCSSTagChecker.TagCheck.getErrorsForPrimitive(OsmPrimitive p,
Selector matchingSelector,
Environment env,
Test tester) |
(package private) Selector |
MapCSSTagChecker.TagCheck.whichSelectorMatchesEnvironment(Environment env) |
Modifier and Type | Method and Description |
---|---|
Environment |
Environment.withChild(IPrimitive child)
Creates a clone of this environment, with the specified child.
|
Environment |
Environment.withChildAndIndexAndLinkContext(IPrimitive child,
int index,
int count)
Creates a clone of this environment, with the specified child, index, and context set to
Condition.Context.LINK . |
Environment |
Environment.withContext(Condition.Context context)
Creates a clone of this environment, with the specified
Condition.Context . |
Environment |
Environment.withIndex(int index,
int count)
Creates a clone of this environment, with the specified index.
|
Environment |
Environment.withLinkContext()
Creates a clone of this environment, with context set to
Condition.Context.LINK . |
Environment |
Environment.withParent(IPrimitive parent)
Creates a clone of this environment, with the specified parent.
|
Environment |
Environment.withParentAndIndexAndLinkContext(IPrimitive parent,
int index,
int count)
Creates a clone of this environment, with the specified parent, index, and context set to
Condition.Context.LINK . |
Environment |
Environment.withPrimitive(IPrimitive osm)
Creates a clone of this environment, with the specified primitive.
|
Constructor and Description |
---|
Environment(Environment other)
Creates a clone of the environment
other . |
Modifier and Type | Field and Description |
---|---|
private Environment |
Selector.ChildOrParentSelector.MatchingReferrerFinder.e |
protected Environment |
Selector.ChildOrParentSelector.AbstractFinder.e |
Modifier and Type | Method and Description |
---|---|
(package private) static boolean |
ConditionFactory.PseudoClasses._new(Environment e)
;new tests whether the object is new. |
protected void |
Selector.ChildOrParentSelector.AbstractFinder.addToChildren(Environment e,
IPrimitive p) |
(package private) static boolean |
ConditionFactory.PseudoClasses.anticlockwise(Environment e)
anticlockwise whether the way is closed and oriented anticlockwise,
or non-closed and the 1st, 2nd and last node are in anticlockwise order. |
boolean |
ConditionFactory.SimpleKeyValueCondition.applies(Environment e) |
boolean |
ConditionFactory.KeyValueCondition.applies(Environment env) |
boolean |
ConditionFactory.KeyValueRegexpCondition.applies(Environment env) |
boolean |
ConditionFactory.RoleCondition.applies(Environment env) |
boolean |
ConditionFactory.IndexCondition.applies(Environment env) |
boolean |
ConditionFactory.KeyCondition.applies(Environment e) |
boolean |
ConditionFactory.ClassCondition.applies(Environment env) |
boolean |
ConditionFactory.PseudoClassCondition.applies(Environment e) |
boolean |
ConditionFactory.OpenEndPseudoClassCondition.applies(Environment e) |
boolean |
ConditionFactory.ExpressionCondition.applies(Environment env) |
boolean |
Condition.applies(Environment e)
Checks if the condition applies in the given MapCSS
Environment . |
static java.lang.Float |
Functions.areasize(Environment env)
Returns the area of a closed way or multipolygon in square meters or
null . |
(package private) static boolean |
ConditionFactory.PseudoClasses.areaStyle(Environment e)
:area-style tests whether the object has an area style. |
static boolean |
Functions.at(Environment env,
double lat,
double lon)
Determines if the object centroid lies at given lat/lon coordinates.
|
static LatLon |
Functions.center(Environment env)
Returns the center of the environment OSM primitive.
|
static java.lang.String |
Functions.child_tag(Environment env,
java.lang.String key)
Gets the value of the key
key from the object's child. |
(package private) static boolean |
ConditionFactory.PseudoClasses.clockwise(Environment e)
clockwise whether the way is closed and oriented clockwise,
or non-closed and the 1st, 2nd and last node are in clockwise order. |
(package private) static boolean |
ConditionFactory.PseudoClasses.closed(Environment e)
closed tests whether the way is closed or the relation is a closed multipolygon |
(package private) static boolean |
ConditionFactory.PseudoClasses.closed2(Environment e) |
(package private) static boolean |
ConditionFactory.PseudoClasses.completely_downloaded(Environment e) |
(package private) static boolean |
ConditionFactory.PseudoClasses.connection(Environment e)
:connection tests whether the object is a connection node. |
static int |
Functions.count_roles(Environment env,
java.lang.String... roles)
Returns the number of primitives in a relation with the specified roles.
|
java.lang.Object |
Expression.evaluate(Environment env)
Evaluate this expression.
|
java.lang.Object |
ExpressionFactory.NullExpression.evaluate(Environment env) |
java.lang.Object |
ExpressionFactory.CondOperator.evaluate(Environment env) |
java.lang.Object |
ExpressionFactory.AndOperator.evaluate(Environment env) |
java.lang.Object |
ExpressionFactory.OrOperator.evaluate(Environment env) |
java.lang.Object |
ExpressionFactory.LengthFunction.evaluate(Environment env) |
java.lang.Object |
ExpressionFactory.MinMaxFunction.evaluate(Environment env) |
java.lang.Object |
ExpressionFactory.ParameterFunction.evaluate(Environment env) |
java.lang.Object |
ExpressionFactory.ArrayFunction.evaluate(Environment env) |
java.lang.Object |
LiteralExpression.evaluate(Environment env) |
void |
MapCSSRule.execute(Environment env)
Executes the instructions against the environment
env |
void |
MapCSSRule.Declaration.execute(Environment env)
Executes the instructions against the environment
env |
void |
Instruction.execute(Environment env)
Execute the instruction in the given environment.
|
void |
Instruction.AssignmentInstruction.execute(Environment env) |
java.lang.String |
Subpart.getId(Environment env)
Gets the ID of the suppart
|
java.lang.String |
Subpart.StringSubpart.getId(Environment env) |
java.lang.String |
Subpart.ExpressionSubpart.getId(Environment env) |
static double |
Functions.gpx_distance(Environment env)
Returns the lowest distance between the OSM object and a GPX point
|
static boolean |
Functions.has_tag_key(Environment env,
java.lang.String key)
Determines whether the object has a tag with the given key.
|
static java.lang.Float |
Functions.index(Environment env)
Returns the index of node in parent way or member in parent relation.
|
(package private) static boolean |
ConditionFactory.PseudoClasses.inDownloadedArea(Environment e)
in-downloaded-area tests whether the object is within source area ("downloaded area"). |
static boolean |
Functions.inside(Environment env,
java.lang.String codes)
Determines if the object is inside territories matching given ISO3166 codes.
|
static boolean |
Functions.is_anticlockwise(Environment env)
Determines whether the way is
closed and oriented anticlockwise ,
or non-closed and the 1st, 2nd and last node are in anticlockwise order . |
static boolean |
Functions.is_clockwise(Environment env)
Determines whether the way is
closed and oriented clockwise ,
or non-closed and the 1st, 2nd and last node are in clockwise order . |
static java.lang.Boolean |
Functions.is_prop_set(Environment env,
java.lang.String key)
Determines whether property
key is set. |
static java.lang.Boolean |
Functions.is_prop_set(Environment env,
java.lang.String key,
java.lang.String layer)
Determines whether property
key is set on layer layer . |
static boolean |
Functions.is_right_hand_traffic(Environment env)
check if there is right-hand traffic at the current location
|
static java.lang.String |
Functions.JOSM_pref(Environment env,
java.lang.String key,
java.lang.String def)
|
static java.lang.Boolean |
Functions.JOSM_search(Environment env,
java.lang.String searchStr)
Determines whether the JOSM search with
searchStr applies to the object. |
private static void |
MapCSSStyleSource.loadSettings(MapCSSRule r,
Selector.GeneralSelector gs,
Environment env) |
boolean |
Selector.matches(Environment env)
Apply the selector to the primitive and check if it matches.
|
boolean |
Selector.ChildOrParentSelector.matches(Environment e) |
boolean |
Selector.AbstractSelector.matches(Environment env)
Determines if all conditions match the given environment.
|
boolean |
Selector.LinkSelector.matches(Environment env) |
boolean |
Selector.GeneralSelector.matches(Environment e) |
protected boolean |
ConditionFactory.KeyValueRegexpCondition.matches(Environment env) |
protected boolean |
ConditionFactory.RegexpKeyValueRegexpCondition.matches(Environment env) |
boolean |
Selector.OptimizedGeneralSelector.matchesBase(Environment e) |
boolean |
Selector.GeneralSelector.matchesConditions(Environment e) |
(package private) static boolean |
ConditionFactory.PseudoClasses.modified(Environment e)
:modified tests whether the object has been modified. |
static int |
Functions.number_of_tags(Environment env)
Get the number of tags for the current primitive.
|
static int |
Functions.osm_changeset_id(Environment env)
Returns the id of the changeset the current object was last uploaded to.
|
static long |
Functions.osm_id(Environment env)
Returns the OSM id of the current object.
|
static int |
Functions.osm_timestamp(Environment env)
Returns the time of last modification to the current object, as timestamp.
|
static long |
Functions.osm_user_id(Environment env)
Returns the OSM user id who last touched the current object.
|
static java.lang.String |
Functions.osm_user_name(Environment env)
Returns the OSM user name who last touched the current object.
|
static int |
Functions.osm_version(Environment env)
Returns the version number of the current object.
|
static boolean |
Functions.outside(Environment env,
java.lang.String codes)
Determines if the object is outside territories matching given ISO3166 codes.
|
static java.lang.Long |
Functions.parent_osm_id(Environment env)
Returns the OSM id of the object's parent.
|
static java.lang.String |
Functions.parent_tag(Environment env,
java.lang.String key)
Gets the first non-null value of the key
key from the object's parent(s). |
static java.util.List<java.lang.String> |
Functions.parent_tags(Environment env,
java.lang.String key)
Gets a list of all non-null values of the key
key from the object's parent(s). |
static java.lang.Object |
Functions.prop(Environment env,
java.lang.String key)
Returns the value of the property
key , e.g., prop("width") . |
static java.lang.Object |
Functions.prop(Environment env,
java.lang.String key,
java.lang.String layer)
Returns the value of the property
key from layer layer . |
(package private) static boolean |
ConditionFactory.PseudoClasses.righthandtraffic(Environment e)
righthandtraffic checks if there is right-hand traffic at the current location. |
static java.lang.String |
Functions.role(Environment env)
Returns the role of current object in parent relation, or role of child if current object is a relation.
|
(package private) static boolean |
ConditionFactory.PseudoClasses.sameTags(Environment e)
:same-tags tests whether the object has the same tags as its child/parent. |
(package private) static boolean |
ConditionFactory.PseudoClasses.selected(Environment e) |
static java.lang.Object |
Functions.setting(Environment env,
java.lang.String key)
Get value of a setting.
|
static java.util.List<java.lang.String> |
Functions.tag_regex(Environment env,
java.lang.String keyRegex)
Get keys that follow a regex
|
static java.util.List<java.lang.String> |
Functions.tag_regex(Environment env,
java.lang.String keyRegex,
java.lang.String flags)
Get keys that follow a regex
|
static java.lang.String |
Functions.tag(Environment env,
java.lang.String key)
Gets the value of the key
key from the object in question. |
(package private) static boolean |
ConditionFactory.PseudoClasses.tagged(Environment e)
:tagged tests whether the object is tagged. |
(package private) static boolean |
ConditionFactory.PseudoClasses.unclosed_multipolygon(Environment e)
unclosed-multipolygon tests whether the object is an unclosed multipolygon. |
(package private) static boolean |
ConditionFactory.PseudoClasses.unconnected(Environment e)
unconnected : tests whether the object is a unconnected node. |
private void |
Selector.ChildOrParentSelector.visitBBox(Environment e,
Selector.ChildOrParentSelector.AbstractFinder finder) |
static java.lang.Float |
Functions.waylength(Environment env)
Returns the length of the way in metres or
null . |
Constructor and Description |
---|
AbstractFinder(Environment e) |
ContainsFinder(Environment e) |
CrossingFinder(Environment e) |
InsideOrEqualFinder(Environment e) |
MatchingReferrerFinder(Environment e)
Constructor
|
MultipolygonOpenEndFinder(Environment e) |
Modifier and Type | Method and Description |
---|---|
private static float |
LineElement.computeRealWidth(Environment env,
LineElement.LineType type,
Cascade c) |
static AreaIconElement |
AreaIconElement.create(Environment env)
Create a new
AreaIconElement |
static RepeatImageElement |
RepeatImageElement.create(Environment env)
Create a RepeatImageElement from the given environment
|
static NodeElement |
NodeElement.create(Environment env)
Creates a new node element for the given Environment
|
static TextElement |
TextElement.create(Environment env)
Create a new text element
|
static AreaElement |
AreaElement.create(Environment env)
Create a new
AreaElement |
static BoxTextElement |
BoxTextElement.create(Environment env,
BoxTextElement.BoxProvider boxProvider)
Create a new
BoxTextElement with a boxprovider and a box. |
static TextLabel |
TextLabel.create(Environment env,
java.awt.Color defaultTextColor,
boolean defaultAnnotate)
Builds a text element from style properties in
c and the
default text color defaultTextColor |
(package private) static NodeElement |
NodeElement.create(Environment env,
float defaultMajorZindex,
boolean allowDefault) |
static LineElement |
LineElement.createCasing(Environment env)
Create a line element for the casing from the given MapCSS environment
|
static TextElement |
TextElement.createForContent(Environment env)
JOSM traditionally adds both line and content text elements if a fill style was set.
|
static MapImage |
NodeElement.createIcon(Environment env)
Create a map icon for the environment using the default keys.
|
static MapImage |
NodeElement.createIcon(Environment env,
java.lang.String... keys)
Create a map icon for the environment.
|
private static LineElement |
LineElement.createImpl(Environment env,
LineElement.LineType type) |
static LineElement |
LineElement.createLeftCasing(Environment env)
Create a line element for the left casing from the given MapCSS environment
|
static LineElement |
LineElement.createLine(Environment env)
Create a line element from the given MapCSS environment
|
static LineElement |
LineElement.createRightCasing(Environment env)
Create a line element for the right casing from the given MapCSS environment
|
static RotationAngle |
NodeElement.createRotationAngle(Environment env)
Reads the icon-rotation property and creates a rotation angle from it.
|
private static Symbol |
NodeElement.createSymbol(Environment env)
Create a symbol for the environment
|