add_site()

Adds a new site to a given place.

Synopsis

add_site(place, site_id, latitude, longitude, elevation)

Description

This function adds a new site to the named place, assigning the given site_id, latitude, longitude, and elevation. The agent creating a site with this action also becomes a member of the new site.

Parameters

place

A valid place name.

site_id

The ID for the new site.

latitude

The latitude for the new site.

longitude

The longitude for the new site.

elevation

The elevation for the new site.

Examples

Suppose a place called Stadium exists to represent American football stadiums, and we want to add sites for the Pittsburgh Steelers’ stadium and the Baltimore Ravens’ stadium. The following lines would add these sites, and make the adding agent a member (or attendee) of the two stadiums.

# Add the actual locations for the Steelers' and Ravens' stadiums.
add_site(Stadium, 100, 40.446686, -80.015851, 725.0)
add_site(Stadium, 200, 39.273498, -76.620330, 185.0

Note

Sites can alternatively be defined for a given place type in the place block. For example:

place my_place {
    site = 1, 48.8566, 2.3522, 0
    site = 2, 51.5072, 0.1276, 0
}

See Also

site