Don't click here unless you want to be banned.

LSL Wiki : Land

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are


In Second Life, land (also referred to as ground or terrain) is stored as a 2D grid of height values (a "heightmap"). This means the ground can never overlap, nor can holes be made through it. The grid has a resolution of 1m in each direction, resulting in 256x256 grid points (0-256) per simulator.

Even though 0-256 implies 257 grid points, sims share their edges with adjacent sims, so the height values at x = 256 or y = 256 will be identical to the height values in an adjacent sim to the east or north at x = 0 or y = 0, respectively.

Or, to put it another way, the grid coordinate 256 of one sim can be seen as the grid coordinate 0 of the adjacent sim.

Ground can be modified with the built-in terraforming tools (Ctrl-5) or the llModifyLand function, and can be read using llGround. Land height between grid points is interpolated, giving it a smooth look. The surface is textured, using multiple textures based on the land height and slope. Island owners can set their own ground textures (though not with LSL) and upload RAW heightmaps in a special format (see below).

Land is either public (a rare sight now) or owned by agents or groups. Such land parcels consist of blocks with 4x4m size. Land owners can disallow the rezzing of objects or running scripts (effective up to 40m above ground). Sound can optionally be restricted to a parcel, with no sound leaving or entering it. Land parcels can also have an audio or video stream associated with them.


llAddToLandBanList (1.8)
llGetParcelDetails (1.13)
llGetParcelMaxPrims (1.13)
llGetParcelPrimOwners (1.13)
llGetParcelPrimCount (1.13)
llRemoveFromLandBanList (1.8)
llRemoveFromLandPassList (1.8)


Q: Is there a way to determine how many objects are on a given parcel of land, or better yet, who owns them?
A: llGetParcelPrimOwners attempts to do this, returning a list showing which avatars own objects and how many prims each avatar owns on the parcel. It is limited to at most 100 object owners, and only works if the script owner has appropriate permissions. There's currently no way to get a list of all the objects themselves - Sensors are only able to detect up to 16 objects per scan.

Q: Is there a way to determine the name or description of a parcel of land?
A: Yes. Use llGetParcelDetails.

Q: Is there a way to determine how much land a user owns within a sim?
A: Not directly. However, you could construct a land scanner that would use llGetLandOwnerAt to scan every 4x4m plot and compare all the owners' keys detected against yours. You wouldn't be able to find out the size or shape of individual parcels, however. Only the overall shape of each owner's land could be detected. It might be all one parcel, or divided up into individual 16 square metre blocks.

You could then use llParcelMediaQuery on your own land to allow your script to check if the parcels are different, though this would only work if the parcels had been set to different video streams. Remember, the media URL doesn't actually have to go anywhere.

Of course, you can specify different media URLs on each parcel. If you're not using the video feature, and don't plan to, you can use it to store unique identifiers this way. If you do need to use the media feature, and you need them to all point to the same URL, try using an URL redirect on a website to produce unique URLs pointing to the same file.

Q: Is there a way to determine whether a parcel is owned by a group or an individual?
A: Yes. llGetParcelDetails returns a list which can contain the key of the land owner and the key of the group. If these keys match, then the land is group owned. However, there is no way for a script to determine the actual details of the group -- such as its name -- regardless.'

Q: Is there a way to get or set the for sale price on land, or set other land flags such as Damage, No Outside Scripts, etc.?
A: No, the most you can do is use llScriptDanger to find out whether or not a given position is above land that is considered "safe" for your scripted object to pass into. You can't set any land flags beyond music or media streams.

Q: Is there a way to automatically buy or sell land?
A: No.

See the RAW heightmap page for information about creating one.

Andrew Linden, 10/11/05: Small movements in land near parcel borders is related to some lossy compression in how we stream the terrain data. There is evidence from our research into the new rendering engine that it is probably easier to just stream the terrain data in its full precision, since it represents less data than a typical 512x512 texture on a simple object.

Lossy compression effects will be most noticable near sharp features (sudden cliff or very tall spike or very deep hole).

Functions | Simulator
There are 4 comments on this page. [Display comments/form]