GRASS logo

NAME

p.location.create - Create a GRASS GIS location for a planetary body.
Creates a new GRASS location configured with the correct ellipsoid (from the built-in body database or custom radii) and projection for a solar system body. Sets a sensible default region (full-globe or polar cap) at the requested resolution. Must be run from inside any existing GRASS session.

KEYWORDS

Planetary, Setup & Location, location, projection, ellipsoid

SYNOPSIS

p.location.create
p.location.create --help
p.location.create [-p] [body=string] [location=string] [projection=string] [res=float] [lon_0=float] [lat_0=float] [lat_1=float] [lat_2=float] [semi_major=float] [semi_minor=float] [--help] [--verbose] [--quiet] [--ui]

Flags:

-p
Print the PROJ.4 string that would be used and exit (dry run)
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

body=string
Planetary body (mars|moon|venus|mercury|titan|ceres|enceladus|europa|custom)
Reads semi-major/minor axes from the built-in body database. Use custom with semi_major= and semi_minor=.
Options: mars, moon, venus, mercury, titan, ceres, enceladus, europa, custom
Default: mars
location=string
Name of the new GRASS location (default: body name)
projection=string
Map projection
Options: latlong, eqc, sinu, north_stereo, south_stereo, merc, lcc, laea, ortho
Default: latlong
latlong: Geographic lat/lon (degrees)
eqc: Equidistant cylindrical (simple cylindrical) — standard planetary base map
sinu: Sinusoidal equal-area — low-distortion for full-globe maps
north_stereo: North polar stereographic
south_stereo: South polar stereographic
merc: Mercator — low-latitude strips
lcc: Lambert Conformal Conic — regional maps at mid-latitudes
laea: Lambert Azimuthal Equal-Area — hemispheric maps
ortho: Orthographic — visualisation
res=float
Resolution (degrees for latlong, metres for projected; 0=skip region setup)
Default: 0.01
lon_0=float
Central / reference longitude (degrees)
Default: 0.0
lat_0=float
Projection centre latitude (for lcc/laea/ortho/stere)
Default: 0.0
lat_1=float
First standard parallel for lcc (degrees)
Default: 30.0
lat_2=float
Second standard parallel for lcc (degrees)
Default: 60.0
semi_major=float
Custom equatorial radius in metres (body=custom)
semi_minor=float
Custom polar radius in metres (body=custom; default = semi_major)

Table of contents

DESCRIPTION

p.location.create creates a new GRASS GIS location configured with the correct ellipsoid and projection for a solar system body. It sets a full-body default region at the requested resolution so the new location is immediately usable without additional g.region setup.

Must be run from inside an existing GRASS session (any location/mapset). The new location is created in the same GISDBASE as the current session.

Body database

Built-in bodies (IAU 2015/2018 reference radii):

body= Name a (m) b (m)
mars Mars 3 396 190 3 376 200
moon Moon 1 737 400 1 737 400 (sphere)
venus Venus 6 051 800 6 051 800 (sphere)
mercury Mercury 2 439 700 2 439 700 (sphere)
titan Titan 2 574 730 2 574 730 (sphere)
ceres Ceres 482 060 445 940
enceladus Enceladus 256 600 248 300
europa Europa 1 562 090 1 562 090 (sphere)
custom — semi_major= semi_minor=

Projections

projection= PROJ.4 Typical use
latlong +proj=longlat GIS analysis, band-depth maps, baselines
eqc Equidistant cylindrical Standard planetary base map (simple cylindrical)
sinu Sinusoidal Equal-area full-globe maps
north_stereo Polar stereographic N Arctic / north polar cap
south_stereo Polar stereographic S South polar cap
merc Mercator Low-latitude navigation strips
lcc Lambert Conformal Conic Regional mid-latitude maps (two std. parallels)
laea Lambert Azimuthal Equal-Area Hemispheric equal-area
ortho Orthographic Visualisation only

Resolution

For latlong, res= is in degrees. For all projected modes, res= is in metres. Set res=0 to skip region setup (e.g. if you will import a raster and align the region to it with g.region raster=...).

PARAMETERS

Parameter Default Description
body= mars Planetary body
location= (body name) New GRASS location name
projection= latlong Map projection
res= 0.01 Resolution (degrees or metres)
lon_0= 0.0 Central / reference longitude
lat_0= 0.0 Centre latitude (for lcc/laea/ortho)
lat_1= 30.0 First standard parallel (lcc)
lat_2= 60.0 Second standard parallel (lcc)
semi_major= Custom equatorial radius in metres
semi_minor= Custom polar radius (default = semi_major)
-p Print PROJ.4 string and exit (dry run, no GRASS needed)

EXAMPLES

Mars location, geographic lat/lon at 0.01° (≈ 600 m at equator):

p.location.create body=mars projection=latlong res=0.01

Moon, simple cylindrical at 500 m/pixel (typical global mosaic):

p.location.create body=moon projection=eqc res=500 location=moon_eqc

Mars, north polar stereographic at 1 km for OMEGA north cap analysis:

p.location.create body=mars projection=north_stereo res=1000 location=mars_nps

Venus custom — large-scale regional sinusoidal map:

p.location.create body=venus projection=sinu res=2000 lon_0=0 location=venus_sinu

Dry-run: print PROJ.4 without creating anything:

p.location.create -p body=titan projection=lcc lat_1=30 lat_2=60

NOTES

SEE ALSO

g.proj, g.region, p.in.archive, p.target.info

SOURCE CODE

Available at: p.location.create source code (history)

Accessed: Sunday Nov 15 11:06:02 2026


Main index | Paint index | Topics index | Keywords index | Graphical index | Full index

© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual