33 bool geo,
const std::string& lane,
double posOverLane,
bool friendlyPos,
double posLat,
34 const std::string& icon,
double layer,
double angle,
const std::string& imgFile,
bool relativePath,
35 double width,
double height,
const std::string& name,
const Parameterised::Map& parameters) :
36 Shape(id, type, color, layer, angle, imgFile, name, relativePath),
41 myPosOverLane(posOverLane),
42 myFriendlyPos(friendlyPos),
45 myHalfImgWidth(width / 2.0),
46 myHalfImgHeight(height / 2.0) {
115 const double pos,
const bool friendlyPos,
const double posLat)
const {
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ SUMO_ATTR_LAYER
A layer number.
@ SUMO_ATTR_COLOR
A color information.
static std::string getFilePath(const std::string &path)
Removes the file information from the given path.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
const std::string & getID() const
Returns the id.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
void setPrecision(int precision=gPrecision)
Sets the precision or resets it to default.
An upper class for objects with additional parameters.
std::map< std::string, std::string > Map
parameters map
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
PointOfInterest(const std::string &id, const std::string &type, const RGBColor &color, const Position &pos, bool geo, const std::string &lane, double posOverLane, bool friendlyPos, double posLat, const std::string &icon, double layer=DEFAULT_LAYER, double angle=DEFAULT_ANGLE, const std::string &imgFile=DEFAULT_IMG_FILE, bool relativePath=DEFAULT_RELATIVEPATH, double width=DEFAULT_IMG_WIDTH, double height=DEFAULT_IMG_HEIGHT, const std::string &name=DEFAULT_NAME, const Parameterised::Map ¶meters=DEFAULT_PARAMETERS)
Constructor.
POIIcon getIcon() const
get icon
~PointOfInterest()
Destructor.
bool getFriendlyPos() const
returns friendly position
void setHeight(double height)
set the image height of the POI
double myHalfImgHeight
The half height of the image when rendering this POI.
void setFriendlyPos(const bool friendlyPos)
set friendly position
Position getCenter() const
Returns the image center of the POI.
void setWidth(double width)
set the image width of the POI
double getHeight() const
Returns the image height of the POI.
bool myFriendlyPos
friendlyPos enable or disable friendly position for position over lane
void setIcon(const std::string &icon)
set icon
double getWidth() const
Returns the image width of the POI.
const std::string & getIconStr() const
get icon(in string format)
void writeXML(OutputDevice &out, const bool geo=false, const double zOffset=0., const std::string laneID="", const double pos=0., const bool friendlyPos=false, const double posLat=0.) const
double myHalfImgWidth
The half width of the image when rendering this POI.
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
double z() const
Returns the z-position.
double y() const
Returns the y-position.
class for maintaining associations between enums and xml-strings
static StringBijection< POIIcon > POIIcons
POI icon values.
const std::string getShapeName() const
Returns the name of the Shape.
static const double DEFAULT_IMG_WIDTH
bool getShapeRelativePath() const
Returns the relativePath of the Shape.
static const std::string DEFAULT_IMG_FILE
const std::string & getShapeType() const
Returns the (abstract) type of the Shape.
static const double DEFAULT_ANGLE
static const double DEFAULT_IMG_HEIGHT
double getShapeLayer() const
Returns the layer of the Shape.
const std::string & getShapeImgFile() const
Returns the imgFile of the Shape.
const RGBColor & getShapeColor() const
Returns the color of the Shape.
double getShapeNaviDegree() const
Returns the angle of the Shape in navigational degrees.
const std::string & getString(const T key) const
T get(const std::string &str) const
static std::string escapeXML(const std::string &orig, const bool maskDoubleHyphen=false)
Replaces the standard escapes by their XML entities.