GXIPJ class

class geosoft.gxapi.GXIPJ
The IPJ class describes a single spatial reference in the world,
defined under a coordinate system, an orientation,
and a warp (which can be used to distort the projected object
to a particular shape or boundary).

Note:

IPJ objects may be attached to channels or views. Two IPJs taken
together are used to create a PJ object, which allows for the
conversion of positions from one projection to the other.
See also the LL2 class, which creates Datum correction lookups.

See also          PJ    Converts coordinates between projections
LL2   Creates Datum correction lookups.
add_exagg_warp((float)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6) → None:
Add a warp to IPJ to exaggerate X, Y and Z.
Parameters:
  • arg1 (float) – X exaggeration, must be > 0.0
  • arg2 (float) – Y exaggeration, must be > 0.0
  • arg3 (float) – Z exaggeration, must be > 0.0
  • arg4 (float) – X reference origin
  • arg5 (float) – Y reference origin
  • arg6 (float) – Z reference origin
Returns:

Nothing

Return type:

None

New in version 5.0.0.

add_log_warp((int)arg1, (int)arg2) → None:
Add a warp to IPJ to log one or both coordinantes
Parameters:
  • arg1 (int) – Log in X?
  • arg2 (int) – Log in Y?
Returns:

Nothing

Return type:

None

New in version 7.0.0.

add_matrix_warp((float)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9, (float)arg10, (float)arg11, (float)arg12, (float)arg13, (float)arg14, (float)arg15, (float)arg16) → None:
Add a warp to IPJ using a matrix
Parameters:
  • arg1 (float) – Row 0 Element 0
  • arg2 (float) – Row 0 Element 1
  • arg3 (float) – Row 0 Element 2
  • arg4 (float) – Row 0 Element 3
  • arg5 (float) – Row 1 Element 0
  • arg6 (float) – Row 1 Element 1
  • arg7 (float) – Row 1 Element 2
  • arg8 (float) – Row 1 Element 3
  • arg9 (float) – Row 2 Element 0
  • arg10 (float) – Row 2 Element 1
  • arg11 (float) – Row 2 Element 2
  • arg12 (float) – Row 2 Element 3
  • arg13 (float) – Row 3 Element 0
  • arg14 (float) – Row 3 Element 1
  • arg15 (float) – Row 3 Element 2
  • arg16 (float) – Row 3 Element 3
Returns:

Nothing

Return type:

None

New in version 7.0.0.

add_warp((int)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (GXVV)arg5) → None:
Add a warp to IPJ.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

There must be at least "warp type" points in the
warp point VV's.
All point VV's must have the same number of points.
If there are more points than required by the warp,
the warp will be determined by least-square fitting
to the warp surface for all but the 4-point warp.
The 4-point ward requires exactly 4 points.

Cannot be used with WARP_MATRIX or WARP_LOG
clear_coordinate_system() → None:
Clear coordinate sytsem, except for units
Returns:Nothing
Return type:None

New in version 7.2.0.

Note:

Clears the Datum, Local Datum and Projection info.
Leaves units, any warp or orientation warp unchanged.
clear_orientation() → None:
Clear an orientation warp from an IPJ.
Returns:Nothing
Return type:None

New in version 5.1.6.

clear_warp() → None:
Clear warp parameters (if any) from an IPJ.
Returns:Nothing
Return type:None

New in version 5.0.0.

compare_datums((GXIPJ)arg1) → int:
Compare the datums of two coordinate systems?
Parameters:arg1 (geosoft.gxapi.GXIPJ) – IPJ 2
Returns:0 - Datums are different 1 - Datums are the same, but different LDT 2 - Datums and LTD are the same
Return type:int

New in version 6.2.0.

Note:

To transform between different datums requires the use of a local
datum transform.  The local datum transform can be defined when
a coordinate system is created, but the definition is optional.
This function will test that the local datum transforms are defined.
Note that a coordinate transformation between datums without a
local datum transform is still possible, but only the effect of
ellipsoid shape will be modelled in the transform.
convert_orientation_warp_vv((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (int)arg4) → None:
Convert X,Y and Z VVs using the orientation warp from an IPJ.
Parameters:
  • arg1 (geosoft.gxapi.GXVV) – X VV coordinates converted on output
  • arg2 (geosoft.gxapi.GXVV) – Y VV coordinates converted on output
  • arg3 (geosoft.gxapi.GXVV) – Z VV coordinates converted on output
  • arg4 (int) – 1 - Forward (raw -> coordinate) , 0 - (coordinate -> raw)
Returns:

Nothing

Return type:

None

New in version 6.4.0.

convert_warp((float_ref)arg1, (float_ref)arg2, (float_ref)arg3, (int)arg4) → int:
Converts a point X, Y, Z to the new IPJ plane.
Parameters:
Returns:

0 if ok - 1 otherwise

Return type:

int

New in version 6.3.0.

convert_warp_vv((GXVV)arg1, (GXVV)arg2, (int)arg3) → int:
Converts a set of X & Y VVs to the new IPJ plane. The Z is assumed to be 0
Parameters:
  • arg1 (geosoft.gxapi.GXVV) – X VV coordinates converted on output
  • arg2 (geosoft.gxapi.GXVV) – Y VV coordinates converted on output
  • arg3 (int) – 1 - Forward (raw -> coordinate) , 0 - (coordinate -> raw)
Returns:

0 if ok - 1 otherwise

Return type:

int

New in version 6.3.0.

coordinate_systems_are_the_same((GXIPJ)arg1) → int:
Are these two coordinate systems the same?
Parameters:arg1 (geosoft.gxapi.GXIPJ) – IPJ 2
Returns:0 - No 1 - Yes
Return type:int

New in version 7.2.0.

Note:

This does not compare LDT information (use geosoft.gxapi.GXIPJ.compare_datums() for that).
coordinate_systems_are_the_same_within_a_small_tolerance((GXIPJ)arg1) → int:
Same as geosoft.gxapi.GXIPJ.coordinate_systems_are_the_same(), but allows for small numerical differences
Parameters:arg1 (geosoft.gxapi.GXIPJ) – IPJ 2
Returns:0 - No 1 - Yes
Return type:int

New in version 7.2.0.

copy((GXIPJ)arg1) → None:
Copy IPJs
Parameters:arg1 (geosoft.gxapi.GXIPJ) – destination IPJ
Returns:Nothing
Return type:None

New in version 5.0.0.

copy_projection((GXIPJ)arg1) → None:
Copy the projection from one IPJ to another
Parameters:arg1 (geosoft.gxapi.GXIPJ) – source
Returns:Nothing
Return type:None

New in version 7.0.0.

Note:

Copies the projection parameters, while leaving the rest
(e.g. Datum, Local Datum Transform) unchanged.
static create() → GXIPJ:
This method creates a projection object.
Returns:IPJ Object
Return type:geosoft.gxapi.GXIPJ

New in version 5.0.0.

static create_s((GXBF)arg1) → GXIPJ:
Create IPJ from serialized source.
Parameters:arg1 (geosoft.gxapi.GXBF) – BF
Returns:IPJ Object
Return type:geosoft.gxapi.GXIPJ

New in version 5.0.0.

static create_xml((str)arg1) → GXIPJ:
Create an IPJ from serialized Geosoft MetaData XML file
Parameters:arg1 (str) – File Name
Returns:IPJ Object
Return type:geosoft.gxapi.GXIPJ

New in version 7.0.0.

get_3d_matrix_orientation((float_ref)arg1, (float_ref)arg2, (float_ref)arg3, (float_ref)arg4, (float_ref)arg5, (float_ref)arg6, (float_ref)arg7, (float_ref)arg8, (float_ref)arg9, (float_ref)arg10, (float_ref)arg11, (float_ref)arg12, (float_ref)arg13, (float_ref)arg14, (float_ref)arg15, (float_ref)arg16) → None:
Gets the coefficients of a 3D matrix orientation.
Parameters:
Returns:

Nothing

Return type:

None

New in version 8.5.0.

get_3d_view((float_ref)arg1, (float_ref)arg2, (float_ref)arg3, (float_ref)arg4, (float_ref)arg5, (float_ref)arg6, (float_ref)arg7, (float_ref)arg8, (float_ref)arg9) → None:
Get 3D orientation parameters
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.3.0.

Note:

The view must have a 3D orientation
get_3d_view_ex((float_ref)arg1, (float_ref)arg2, (float_ref)arg3, (float_ref)arg4, (float_ref)arg5, (float_ref)arg6, (float_ref)arg7, (float_ref)arg8, (float_ref)arg9, (int_ref)arg10, (int_ref)arg11) → None:
Get 3D orientation parameters with new flags
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.0.0.

Note:

The view must have a 3D orientation
get_crooked_section_view_v_vs((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (int_ref)arg4) → None:
Get the crooked section path.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.2.0.

Note:

Returns the orignal VVs used to set up the crooked section path.
get_display_name((str_ref)arg1) → None:
Get a name for display purposes from IPJ
Parameters:arg1 (geosoft.gxapi.str_ref) – name returned
Returns:Nothing
Return type:None

New in version 6.3.0.

get_esri((str_ref)arg1) → None:
Store coordinate system in an ESRI prj coordinate string
Parameters:arg1 (geosoft.gxapi.str_ref) – ESRI projection string returned
Returns:Nothing
Return type:None

New in version 5.1.8.

Note:

If the projection is not supported in ESRI, the projection
string will be empty.
get_gxf((str_ref)arg1, (str_ref)arg2, (str_ref)arg3, (str_ref)arg4, (str_ref)arg5) → None:
Store coordinate system in GXF style strings.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

See GXF revision 3 for string descriptions
All strings must be the same length, 160 (STR_GXF) recommended.
Strings too short will be truncated.
static get_list((int)arg1, (str)arg2, (GXLST)arg3) → None:
Get a list of parameters.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.0.0.

Note:

The datum filter string, if specified, will limit the requested
list to those valid for the spacified datum.
get_method_parm((int)arg1) → float:
Get projection method parameter
Parameters:arg1 (int) – IPJ_CSP constants
Returns:Parameter setting, rDUMMY if dot used
Return type:float

New in version 5.0.0.

get_mi_coord_sys((str_ref)arg1, (str_ref)arg2) → None:
Store coordinate system in MapInfo coordsys pair
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.0.0.

get_name((int)arg1, (str_ref)arg2) → None:
Get an IPJ name
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

get_north_azimuth((float)arg1, (float)arg2) → float:
Return the azimuth of geographic North at a point.
Parameters:
  • arg1 (float) – input X location
  • arg2 (float) – input Y location
Returns:

Azimuth (degrees CW) of geographic north from grid north at a location.

Return type:

float

New in version 7.3.0.

Note:

If the IPJ is not a projected coordinate system
then the returned azimuth is GS_R8DM;
get_orientation() → int:
Get IPJ orientation in space.
Returns:IPJ_ORIENT constants
Return type:int

New in version 5.1.4.

Note:

Projections can be created oriented horizontally (e.g. in plan maps)
or vertically (in section maps - Wholeplot and IP).
get_orientation_info((float_ref)arg1, (float_ref)arg2, (float_ref)arg3, (float_ref)arg4, (float_ref)arg5) → None:
Get IPJ orientation parameters.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.6.

Note:

IPJ_ORIENT_TYPE:
IPJ_ORIENT_DEFAULT - no special orientation - plan view.
This is equivalent to IPJ_ORIENT_PLAN with
dXo = dYo = dZo = dRotation = 0.0.

IPJ_ORIENT_PLAN      Azimuth = Rotation CCW degrees
The plan differs from the default view in that
a reference level is set, and the axes can be
rotated and offset from the local X,Y.

IPJ_ORIENT_SECTION   Azimuth - CW degrees from North
-360 <= azimuth <= 360
Swing - degrees bottom towards viewer
-90 < swing < 90
The section view projects all plotted objects
HORIZONTALLY onto the viewing plan in order to
preserve elevations, even if the section has a swing.
get_orientation_name((str_ref)arg1) → None:
Get a name for display purposes from IPJ
Parameters:arg1 (geosoft.gxapi.str_ref) – name returned
Returns:Nothing
Return type:None

New in version 6.3.0.

get_plane_equation((float)arg1, (float)arg2, (float)arg3, (float)arg4, (float_ref)arg5, (float_ref)arg6, (float_ref)arg7, (float_ref)arg8, (float_ref)arg9, (float_ref)arg10, (float_ref)arg11, (float_ref)arg12, (float_ref)arg13) → None:
Get the equation of a plane
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.6.

Note:

Two opposite corners of the plane are required.
Because the origin of the plane does not necessarily
have a stable back-projection into true 3d coordinates.
In practice, use the current view extents, or the corners
of a grid.
get_plane_equation2((GXIPJ)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float_ref)arg6, (float_ref)arg7, (float_ref)arg8, (float_ref)arg9, (float_ref)arg10, (float_ref)arg11, (float_ref)arg12, (float_ref)arg13, (float_ref)arg14) → None:
Get the equation of a plane with reprojection.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.4.1.

Note:

This is the same as geosoft.gxapi.GXIPJ.get_plane_equation(), but the
input projected coordinate system (PCS) may
be different from that of the IPJ you want the
plane equation values described in. This may be
required, for instance, when a 3D view has been created
in one PCS, and an oriented grid from a different PCS is
to be displayed in that view.

If the two input IPJs share the same PCS (determined
using the geosoft.gxapi.GXIPJ.same() function), then the geosoft.gxapi.GXIPJ.get_plane_equation()
function is called directly, using the input IPJ.
get_units((float_ref)arg1, (str_ref)arg2) → None:
Get unit parameters
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

get_xml((str_ref)arg1) → None:
Get an Geosoft Metadata XML string from an IPJ
Parameters:arg1 (geosoft.gxapi.str_ref) – XML string returned
Returns:Nothing
Return type:None

New in version 7.0.0.

has_projection() → int:
Does the IPJ object contain a projection?
Returns:0 - No 1 - Yes
Return type:int

New in version 7.2.0.

has_section_orientation() → int:
Does this projection contain an orientation used by section plots?
Returns:0 - No 1 - Yes
Return type:int

New in version 8.3.0.

Note:

Returns     1 if there is a section orientation

The following orientations can be used to orient sections or section views:

IPJ_ORIENT_SECTION - Target-type sections with Z projection horizontally
IPJ_ORIENT_SECTION_NORMAL - Like IPJ_ORIENT_SECTION, but Z projects
perpendicular to the secton plane.
IPJ_ORIENT_SECTION_CROOKED - Crooked sections
IPJ_ORIENT_3D - Some Sections extracted from a voxel - e.g. VoxelToGrids,
as the voxel can have any orientation in 3D.

It is sometimes important to ignore the section orientation, for instance
when rendering a grid in 3D where it has been located on a plane.
is_3d_inverted() → int:
Is this 3D View inverted ?
Returns:0 - No 1 - Yes (inverted)
Return type:int

New in version 6.3.1.

is_3d_inverted_angles() → int:
Are the angles in this 3D View inverted ?
Returns:0 - No 1 - Yes (inverted)
Return type:int

New in version 6.3.1.

is_geographic() → int:
See if this projection is geographic
Returns:0 - No 1 - Yes
Return type:int

New in version 6.3.0.

is_null() → bool

Check if the instance of geosoft.gxapi.GXIPJ is null (undefined)

Returns:True if this is a null instance of geosoft.gxapi.GXIPJ, False otherwise.
Return type:bool`
make_geographic() → None:
Remove a projected coordinate system from an IPJ
Returns:Nothing
Return type:None

New in version 5.1.5.

Note:

This function does nothing if the IPJ is not a projected coordinate system.
make_projected((float)arg1, (float)arg2, (float)arg3, (float)arg4) → None:
Create a default projected coordinate system from lat-long ranges.
Parameters:
  • arg1 (float) – minimum longitude
  • arg2 (float) – minimum latitude
  • arg3 (float) – maximum longitude
  • arg4 (float) – maximum latitude
Returns:

Nothing

Return type:

None

New in version 5.1.5.

Note:

Terminates with invalid or unsupported ranges.
If the map crosses the equator, or if map is within 20 degrees of the
equator, uses an equatorial mercator projection centered at the central
longitude. Otherwise, uses a Lambert Conic Conformal (1SP) projection
for the map. Global maps outside of +/- 70 degrees latitude are not
supported.
make_wgs84() → None:
Make a WGS 84 geographic projection
Returns:Nothing
Return type:None

New in version 5.1.8.

new_box_resolution((GXIPJ)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (float_ref)arg7, (float_ref)arg8, (float_ref)arg9) → None:
Determine a data resolution in a new coordinate system
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.5.

Note:

if there are any problems reprojecting, new resolutions will
dummy.  The conversion to new resolution is based on measurements
along the four edges and two diagonals.
static null() → GXIPJ

A null (undefined) instance of geosoft.gxapi.GXIPJ

Returns:A null geosoft.gxapi.GXIPJ
Return type:geosoft.gxapi.GXIPJ
orientations_are_the_same((GXIPJ)arg1) → int:
Are these two orientations the same?
Parameters:arg1 (geosoft.gxapi.GXIPJ) – IPJ 2
Returns:0 - No 1 - Yes
Return type:int

New in version 7.2.0.

orientations_are_the_same_within_a_small_tolerance((GXIPJ)arg1) → int:
Same as geosoft.gxapi.GXIPJ.orientations_are_the_same(), but allows for small numerical differences
Parameters:arg1 (geosoft.gxapi.GXIPJ) – IPJ 2
Returns:0 - No 1 - Yes
Return type:int

New in version 7.2.0.

projection_type_is_fully_supported() → int:
Is the projection type fully supported?
Returns:0 - No 1 - Yes
Return type:int

New in version 7.2.0.

Note:

This function checks only the projected coordinated system
in the IPJ object, so should only be used with projections
of type IPJ_TYPE_PCS.
This function does not test the validity of datums or local
datum transforms.
read((int)arg1, (str)arg2, (str)arg3, (str)arg4) → None:
Read and define an IPJ from a standard file.
Parameters:
  • arg1 (int) – IPJ_TYPE constants
  • arg2 (str) – string 1
  • arg3 (str) – string 2
  • arg4 (str) – string 3
Returns:

Nothing

Return type:

None

New in version 5.0.0.

reproject_section_grid((GXIPJ)arg1, (float_ref)arg2, (float_ref)arg3, (float_ref)arg4, (float_ref)arg5, (float_ref)arg6) → None:
Reproject a section grid
Parameters:
  • arg1 (geosoft.gxapi.GXIPJ) – Reprojected IPJ on input (need not include an orientation). On output contains the same type of orientation as the initial IPJ, adjusted to be in the same location.
  • arg2 (geosoft.gxapi.float_ref) – X origin of grid (input initial value, output new value)
  • arg3 (geosoft.gxapi.float_ref) – Y origin of grid (input initial value, output new value)
  • arg4 (geosoft.gxapi.float_ref) – X cell size of grid (input initial value, output new value)
  • arg5 (geosoft.gxapi.float_ref) – Y cell size of grid (input initial value, output new value)
  • arg6 (geosoft.gxapi.float_ref) – Grid rotation (degrees CCW) (input initial value, output new value)
Returns:

Nothing

Return type:

None

New in version 9.0.0.

Note:

Reproject a section grid to a new IPJ, adjusting its orientation and registration so that
it remains in the same location.
serial((GXBF)arg1) → None:
Serialize IPJ to a BF.
Parameters:arg1 (geosoft.gxapi.GXBF) – BF
Returns:Nothing
Return type:None

New in version 5.0.0.

serial_fgdcxml((str)arg1) → None:
Write the IPJ as a FDGC MetaData XML object
Parameters:arg1 (str) – Name of file to export to
Returns:Nothing
Return type:None

New in version 7.0.0.

serial_isoxml((str)arg1) → None:
Write the IPJ as a ISO MetaData XML object
Parameters:arg1 (str) – Name of file to export to
Returns:Nothing
Return type:None

New in version 7.0.0.

serial_xml((str)arg1) → None:
Write the IPJ as a Geosoft MetaData XML object
Parameters:arg1 (str) – Name of file to export to
Returns:Nothing
Return type:None

New in version 7.0.0.

set_3d_inverted((int)arg1) → None:
Set whether a view is inverted (must be 3D already)
Parameters:arg1 (int) – Inverted (0 or 1)
Returns:Nothing
Return type:None

New in version 6.3.1.

set_3d_inverted_angles((int)arg1) → None:
Set whether the angles in this view are inverted (must be 3D already)
Parameters:arg1 (int) – Inverted (0 or 1)
Returns:Nothing
Return type:None

New in version 6.3.1.

set_3d_matrix_orientation((float)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9, (float)arg10, (float)arg11, (float)arg12, (float)arg13, (float)arg14, (float)arg15, (float)arg16) → None:
Apply a 3D orientation directly using matrix coefficients.
Parameters:
  • arg1 (float) – Row 0 Element 0
  • arg2 (float) – Row 0 Element 1
  • arg3 (float) – Row 0 Element 2
  • arg4 (float) – Row 0 Element 3
  • arg5 (float) – Row 1 Element 0
  • arg6 (float) – Row 1 Element 1
  • arg7 (float) – Row 1 Element 2
  • arg8 (float) – Row 1 Element 3
  • arg9 (float) – Row 2 Element 0
  • arg10 (float) – Row 2 Element 1
  • arg11 (float) – Row 2 Element 2
  • arg12 (float) – Row 2 Element 3
  • arg13 (float) – Row 3 Element 0
  • arg14 (float) – Row 3 Element 1
  • arg15 (float) – Row 3 Element 2
  • arg16 (float) – Row 3 Element 3
Returns:

Nothing

Return type:

None

New in version 8.5.0.

set_3d_view((float)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9) → None:
Set 3D orientation parameters
Parameters:
  • arg1 (float) – X location of view origin
  • arg2 (float) – Y location of view origin
  • arg3 (float) – Z location of view origin
  • arg4 (float) – Rotation in X
  • arg5 (float) – Rotation in Y
  • arg6 (float) – Rotation in Z
  • arg7 (float) – Scaling in X
  • arg8 (float) – Scaling in Y
  • arg9 (float) – Scaling in Z
Returns:

Nothing

Return type:

None

New in version 6.3.0.

Note:

Sets up translation, scaling and rotation in all three directions
for 3D objects.
set_3d_view_ex((float)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9, (int)arg10, (int)arg11) → None:
Set 3D orientation parameters with new flags
Parameters:
  • arg1 (float) – X location of view origin
  • arg2 (float) – Y location of view origin
  • arg3 (float) – Z location of view origin
  • arg4 (float) – Rotation in X
  • arg5 (float) – Rotation in Y
  • arg6 (float) – Rotation in Z
  • arg7 (float) – Scaling in X
  • arg8 (float) – Scaling in Y
  • arg9 (float) – Scaling in Z
  • arg10 (int) – IPJ_3D_ROTATE constants
  • arg11 (int) – IPJ_3D_FLAG constants
Returns:

Nothing

Return type:

None

New in version 7.0.0.

Note:

Sets up translation, scaling and rotation in all three directions
for 3D objects.
set_3d_view_from_axes((float)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9, (float)arg10, (float)arg11, (float)arg12) → None:
Set 3D orientation parameters
Parameters:
  • arg1 (float) – X location of view origin
  • arg2 (float) – Y location of view origin
  • arg3 (float) – Z location of view origin
  • arg4 (float) – X axis X component
  • arg5 (float) – X axis Y component
  • arg6 (float) – X axis Z component
  • arg7 (float) – Y axis X component
  • arg8 (float) – Y axis Y component
  • arg9 (float) – Y axis Z component
  • arg10 (float) – Scaling in X
  • arg11 (float) – Scaling in Y
  • arg12 (float) – Scaling in Z
Returns:

Nothing

Return type:

None

New in version 9.0.0.

Note:

Sets up translation, scaling and rotation in all three directions
for 3D objects, based on input origin and X and Y axis vectors.
set_crooked_section_view((GXVV)arg1, (GXVV)arg2, (GXVV)arg3, (int)arg4) → None:
Set up the crooked section view.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.2.0.

Note:

A non-plane section. It is a vertical section which curves along a path in
(X, Y).
set_depth_section_view((float)arg1) → None:
Set depth section orientation parameters
Parameters:arg1 (float) – View Y value for Depth = 0.0.
Returns:Nothing
Return type:None

New in version 7.0.0.

set_esri((str)arg1) → None:
Set coordinate system from an ESRI prj coordinate string
Parameters:arg1 (str) – ESRI prj format projection string
Returns:Nothing
Return type:None

New in version 5.1.8.

Note:

If the projection is not supported in Geosoft, the
IPJ will be unknown.
set_gxf((str)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5) → None:
Set coordinate system from GXF style strings.
Parameters:
  • arg1 (str) – “projection name” or PCS_NAME from ipj_pcs.csv (datum / projection) or EPSG coordinate system code number or “<file.prj>” projection file name or “<file.wrp>” warp file name
  • arg2 (str) – “datum name”[, major axis, elipticity, prime meridian] or DATUM from datum.csv or EPSG datum code number
  • arg3 (str) – “method name”, parameters (P1 through P8) or “projection name”[,”method name”,”Units”,P1,P2...] or TRANSFORM from transform.csv or EPSG transform method code number
  • arg4 (str) – “unit name”, convertion to metres or UNIT_LENGTH from units.csv
  • arg5 (str) – “local transform name”[,dX,dY,dZ,rX,rY,rZ,Scale] or DATUM_TRF from datumtrf.csv or AREA_OF_USE from ldatum.csv or EPSG local datum transform code number
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Simplest Usage:

The coordinate system can be resolved from the "coordinate system name"
if the name is specified using an EPSG number or naming convention such as:

"datum / projection"  (example: "Arc 1960 / UTM zone 37S")

Where:
"datum" is the EPSG datum name (eg. NAD83).  All supported datums are
listed in ...usercsvdatum.csv.
"projection" is the EPSG coordinate system map projection.
datum name (eg. "UTM zone 10N").  All supported coordinate
system projections are listed in ...user/csv/transform.csv.
All EPSG known combined coordinate systems of the earth are
listed in ...user/csv/ipj_pcs.csv.

To define a geographic (longitude, latitude) oordinate system, specify
the datum name alone (ie "Arc 1960").  EPSG numbers can also be used, so in
the example above the name can be "21037".

The coordinate system may also be oriented arbitrarily in 3D relative to
the base coordinate system by specifying the orientation as a set of
6 comma-separated values between angled brackets after the coordinate system name:

"datum / projection"<oX,oY,oZ,rX,rY,rZ>
21037<oX,oY,oZ,rX,rY,rZ>

where:
oX,oY,oZ    is the location of the local origin on the CS
rX,rY,rZ    are rotations in degrees azimuth (clockwise) of
the local axis frame around the X, Y and Z axis
respectively.  A simple plane rotation will only have
a rotation around Z.  For example:
"Arc 1960 / UTM zone 37S"<525000,2500000,0,0,0,15>
defines a local system with origin at (525000,2500000)
with a rotation of 15 degrees azimuth.

Orientation parameters not defined will default to align with the
base CS,  Note that although allowed, it does not make sense to have
an orientation on a geographic coordinate system (long,lat).

Complete usage:

A coordinate system can also be fully described by providing an additional
four strings that define the datum, map projection, length units and
prefered local datum transform.  Refer to GXF revision 3 for further detail:
http://www.geosoft.com/resources/goto/GXF-Grid-eXchange-File

Note that coordinate system reference tables sre maintained in csv files
located in the .../user/csv folder found with the Geosoft installation files,
which will usually be located here:
C:Program Files (x86)GeosoftOasis montajusercsv

The "datum" string can use a datum name defined in the "datum.csv" file,
or the local datum name from datumtrf.csv, or the local datum description
from ldatum.csv.
For a non-EPSG datum, you can define your own datum parameters in the
Datum stringfield as follows:

"*YourDatumName",major_axis,flattening(or eccentricity)[,prime_meridian]

where
The * before "YourDatumName" indicates this is a non-EPSG name.
major_axis is in metres.
flattening less than 0 is interpreted as eccentricity (0 indicates a sphere).
prime_meridian is optional, specified in degrees of longitude relative to
Greenwich.

The "Projection" can contain a projection system defined in the
"transform.csv" file, or the name of a projection type followed by projection
parameters.  Geographic coordinates systems (long/lat only) must leave
"projection" blank.

Projection names not defined in "transform.csv" can be defined in the
"projection" string as follows:

method,length_units,P1,P2,...

where:

"method" is a method from the table "transform_parameters.csv".
"length_units" is a "Unit_length" from units.csv.
P1 through P8 (or fewer) are the projection parameters for the method
as defined in "transform_parameters.csv", and in the order defined.
Parameters that are blank in "transform_parameters.csv" are omitted
from the list so that each method will have a minimum list of
parameters.

Angular parameters must always be degrees, and may be defined a
decimal degree fromat, or "DEG.MM.SS.ssss".
Distance parameters (False Northing and False Easting) must be
defined in the "length_units" (string 4).

Examples:

Geographic long,lat on datum "Arc 1960":
"4210","","","",""
"Arc 1960","","","",""
"","Arc 1960","","",""

Projected Coordinate System, UTM zone 37S
"21037","","","",""
"","4210","16137","",""
""Arc 1960 / UTM zone 37S"","","","",""
"",""Arc 1960"","UTM zone 37S","",""
"",""Arc 1960"","UTM zone 37S","m",""
"",""Arc 1960"","UTM zone 37S","m,1.0",""
"",""Arc 1960"","UTM zone 37S","m,1.0","");
"",""Arc 1960"","UTM zone 37S","m","Arc 1960 to WGS 84 (1)"

Locally oriented coordinate system (origin at 525000,2500000, rotated 15 deg):
"21037<525000,2500000,0,0,0,15>","","","",""
"<525000,2500000,0,0,0,15>","4210","16137","",""
""Arc 1960 / UTM zone 37S"<525000,2500000,0,0,0,15>","","","",""
set_gxf_safe((str)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5) → int:
Same as geosoft.gxapi.GXIPJ.set_gxf(), but fails gracefully.
Parameters:
  • arg1 (str) – “projection name” or PCS_NAME from ipj_pcs.csv (datum / projection) or EPSG coordinate system code number or “<file.prj>” projection file name or “<file.wrp>” warp file name
  • arg2 (str) – “datum name”[, major axis, elipticity, prime meridian] or DATUM from datum.csv or EPSG datum code number
  • arg3 (str) – “method name”, parameters (P1 through P8) or “projection name”[,”method name”,”Units”,P1,P2...] or TRANSFORM from transform.csv or EPSG transform method code number
  • arg4 (str) – “unit name”, convertion to metres or UNIT_LENGTH from units.csv
  • arg5 (str) – “local transform name”[,dX,dY,dZ,rX,rY,rZ,Scale] or DATUM_TRF from datumtrf.csv or AREA_OF_USE from ldatum.csv or EPSG local datum transform code number
Returns:

0 - error in setting IPJ, input IPJ unchanged. 1 - success: IPJ set using input values.

Return type:

int

New in version 7.0.0.

Note:

geosoft.gxapi.GXIPJ.set_gxf() will fail and terminate the GX if anything goes wrong (e.g. having a wrong
parameter). If this function fails, it simply returns 0 and leaves the
IPJ unchanged.
set_method_parm((int)arg1, (float)arg2) → None:
Set projection method parameter
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

If parameter is not valid, nothing happens.
set_mi_coord_sys((str)arg1, (str)arg2) → None:
Set coordinate system from a MapInfo coordsys command
Parameters:
  • arg1 (str) – MapInfo Coordinate System
  • arg2 (str) – MapInfo Units
Returns:

Nothing

Return type:

None

New in version 5.1.4.

set_normal_section_view((float)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) → None:
Set normal section orientation parameters
Parameters:
  • arg1 (float) – X location of view origin
  • arg2 (float) – Y location of view origin
  • arg3 (float) – Z location of view origin
  • arg4 (float) – Section azimuth - degrees CCW from north
  • arg5 (float) – Section swing -90 < swing < 90.
Returns:

Nothing

Return type:

None

New in version 7.0.0.

Note:

This section is the type where values are projected
normal to the section, and the "Y" values in a grid
do not necessarily correspond to the elvations for a swung section.
set_plan_view((float)arg1, (float)arg2, (float)arg3, (float)arg4) → None:
Set plan orientation parameters.
Parameters:
  • arg1 (float) – X location of view origin
  • arg2 (float) – Y location of view origin
  • arg3 (float) – Z location of view origin
  • arg4 (float) – rotation CCW from normal XY coords
Returns:

Nothing

Return type:

None

New in version 5.1.6.

Note:

This sets up the orientation of an IPJ for plan view plots,
for instance in Wholeplot. These differ from regular plan
map views in that the elevation of the view plane is set, and
the view may be rotated. In addition, when viewed in a map,
a view with this IPJ will give a status bar location (X, Y, Z)
of the actual location in space, as opposed to just the X, Y of
the view plane itself.
set_section_view((float)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) → None:
Set section orientation parameters
Parameters:
  • arg1 (float) – X location of view origin
  • arg2 (float) – Y location of view origin
  • arg3 (float) – Z location of view origin
  • arg4 (float) – Section azimuth - degrees CCW from north
  • arg5 (float) – Section swing -90 < swing < 90.
Returns:

Nothing

Return type:

None

New in version 5.1.6.

Note:

This sets up the orientation of an IPJ for section view plots,
for instance in Wholeplot. In addition, when viewed in a map,
a view with this IPJ will give a status bar location (X, Y, Z)
of the actual location in space, as opposed to just the X, Y of
the view plane itself.
Swung sections are tricky because they are set up for section
plots in such a way that the vertical axis remains "true"; points
are projected horizontally to the viewing plane, independent of the
swing angle. In other words, all locations in 3D space viewed using this
projection will plot on the same horizontal line in the map view.
This function is NOT suitable for simply creating
an orientation for a dipping grid or view.
set_units((float)arg1, (str)arg2) → None:
Set unit parameters
Parameters:
  • arg1 (float) – factor to meters, must be >= 0.0
  • arg2 (str) – abbreviation, can be “”
Returns:

Nothing

Return type:

None

New in version 5.0.0.

set_vcs((str)arg1) → None:
Set the Verical Coordinate System in the IPJ name string
Parameters:arg1 (str) – new name (See Valid inputs above).
Returns:Nothing
Return type:None

New in version 9.2.0.

Note:

         The vertical coordinate system (vcs) describes the datum used for vertical coordinates. The vcs name, if
         known, will appear in square brackets as part of the coordinate system name.

         Examples:
   "WGS 84 [geoid]"
   "WGS 84 / UTM zone 12S" - the vcs is not known.
            "WGS 84 / UTM zone 12S [NAVD88]"

Valid inputs:
  "NAVD88"          - Clears existing vcs, if any, and sets the VCS name to "NAVD88".
  ""                - Clears the vcs
set_wms_coord_sys((str)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) → None:
Set coordinate system from a WMS coordsys string.
Parameters:
  • arg1 (str) – WMS style coordinate string
  • arg2 (float) – minimum X bounding box
  • arg3 (float) – minimum Y
  • arg4 (float) – maximum X
  • arg5 (float) – maximum Y
Returns:

Nothing

Return type:

None

New in version 5.1.5.

Note:

WMS coordinate strings supported:


EPSG:code

where "code" is the EPSG code number
"EPSG:4326"  is geographic "WGS 84" (see datum.csv)
"EPSG:25834" is projected "ETRS89 / UTM zone 34N"
(see ipj_pcs.csv)

The bounding box for EPSG systems must be defined in the
EPSG coordinate system.  If a bounding box is provided,
it will not be changed.


AUTO:wm_id,epsg_units,lon,lat (see OGC documentation)

for "AUTO" coordinates, the "epsg_units" is the units
of the bounding box.  This procedure will transform
the supplied bounding box from these units to the
units of the projection.  Normally, this is from
long/lat (9102) to metres (9001).
set_xml((str)arg1) → None:
Set an IPJ from a Geosoft Metadata XML string
Parameters:arg1 (str) – XML string to set
Returns:Nothing
Return type:None

New in version 7.0.0.

source_type() → int:
Get IPJ source type
Returns:IPJ_TYPE constants
Return type:int

New in version 5.0.0.

support_datum_transform((GXIPJ)arg1) → int:
Can we transform between these two datums?
Parameters:arg1 (geosoft.gxapi.GXIPJ) – IPJ 2
Returns:0 - No 1 - Yes, either because both CS are on the same datum, or because a local datum transform is defined for each coordinate system.
Return type:int

New in version 6.0.0.

Note:

To transform between different datums requires the use of a local
datum transform.  The local datum transform can be defined when
a coordinate system is created, but the definition is optional.
This function will test that the local datum transforms are defined.
Note that a coordinate transformation between datums without a
local datum transform is still possible, but only the effect of
ellipsoid shape will be modelled in the transform.
static unit_name((float)arg1, (int)arg2, (str_ref)arg3) → None:
Get a unit name given a scale factor
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static unit_scale((str)arg1, (float)arg2) → float:
Get a unit scale (m/unit) given a name
Parameters:
  • arg1 (str) – unit name, abbreviation or full name
  • arg2 (float) – default to return if name not found
Returns:

Scale factor m/unit

Return type:

float

New in version 5.0.0.

Note:

If name cannot be found, returns default.
warp_type() → int:
Obtain the warp type of an IPJ.
Returns:IPJ_WARP constants
Return type:int

New in version 7.0.0.

warped() → bool:
Does IPJ contain a warp?
Returns:bool
Return type:bool

New in version 5.0.0.

warps_are_the_same((GXIPJ)arg1) → int:
Are these two warps the same?
Parameters:arg1 (geosoft.gxapi.GXIPJ) – IPJ 2
Returns:0 - No 1 - Yes
Return type:int

New in version 7.2.0.

warps_are_the_same_within_a_small_tolerance((GXIPJ)arg1) → int:
Same as geosoft.gxapi.GXIPJ.warps_are_the_same(), but allows for small numerical differences
Parameters:arg1 (geosoft.gxapi.GXIPJ) – IPJ 2
Returns:0 - No 1 - Yes
Return type:int

New in version 7.2.0.

IPJ_3D_FLAG constants

3D Flags
gxapi.IPJ_3D_FLAG_NONE = 0
Standard
gxapi.IPJ_3D_FLAG_INVERTANGLES = 1
Invert angle rotation during matrix creation
gxapi.IPJ_3D_FLAG_INVERTZ = 2
Invert the Z plane to make up down.
gxapi.IPJ_3D_FLAG_ORDER_ROTATION = 4
Apply rotations in a specific order, determined by pdParm[7]

IPJ_3D_ROTATE constants

3D Rotation Mode
gxapi.IPJ_3D_ROTATE_DEFAULT = 0
gxapi.IPJ_3D_ROTATE_XYZ = 1
gxapi.IPJ_3D_ROTATE_XZY = 2
gxapi.IPJ_3D_ROTATE_YXZ = 3
gxapi.IPJ_3D_ROTATE_YZX = 4
gxapi.IPJ_3D_ROTATE_ZXY = 5
gxapi.IPJ_3D_ROTATE_ZYX = 6

IPJ_CSP constants

Projection Setting
gxapi.IPJ_CSP_SCALE = 0
gxapi.IPJ_CSP_FALSEEAST = 1
gxapi.IPJ_CSP_FALSENORTH = 2
gxapi.IPJ_CSP_LATORIGIN = 3
gxapi.IPJ_CSP_LONORIGIN = 4
gxapi.IPJ_CSP_PARALLEL_1 = 5
gxapi.IPJ_CSP_PARALLEL_2 = 6
gxapi.IPJ_CSP_AZIMUTH = 7
gxapi.IPJ_CSP_ANGLE = 8
gxapi.IPJ_CSP_POINTLAT_1 = 9
gxapi.IPJ_CSP_POINTLON_1 = 10
gxapi.IPJ_CSP_POINTLAT_2 = 11
gxapi.IPJ_CSP_POINTLON_2 = 12

IPJ_NAME constants

Project Name
gxapi.IPJ_NAME_PCS = 0
projected coordinate system name
gxapi.IPJ_NAME_PROJECTION = 1
projection name
gxapi.IPJ_NAME_METHOD = 2
projection method name
gxapi.IPJ_NAME_DATUM = 3
datum name
gxapi.IPJ_NAME_ELLIPSOID = 4
ellipsoid name
gxapi.IPJ_NAME_LDATUM = 5
local datum name
gxapi.IPJ_NAME_UNIT_ABBR = 6
unit abbreviation
gxapi.IPJ_NAME_UNIT_FULL = 7
full unit name
gxapi.IPJ_NAME_TYPE = 8
projection type description
gxapi.IPJ_NAME_LLDATUM = 9
datum transform table name
gxapi.IPJ_NAME_METHOD_PARMS = 10
projection method parameters in GXF order
gxapi.IPJ_NAME_METHOD_LABEL = 11
projection method parameters labels
gxapi.IPJ_NAME_DATUM_PARMS = 12
datum parameters (major axis, flattening, prime meridian)
gxapi.IPJ_NAME_LDATUM_PARMS = 13
local datum parameters (dX,dY,dZ,rX,rY,rZ,scale)
See GXF revision 3 for parameter list order and
specifications.
gxapi.IPJ_NAME_GEOID = 14
geoid name if known
gxapi.IPJ_NAME_LDATUMDESCRIPTION = 15
local datum description
gxapi.IPJ_NAME_METHOD_PARMS_NATIVE = 16
projection method parameters in GXF order (Native units for eastings/northings)
gxapi.IPJ_NAME_ORIENTATION_PARMS = 17
orientation parameters

IPJ_ORIENT constants

Projection Orientation
gxapi.IPJ_ORIENT_DEFAULT = 0
no special orientation - plan view. All views in maps
created before v5.1.3 will return this value.
gxapi.IPJ_ORIENT_PLAN = 1
A plan view with a reference elevation and
optional rotation.
gxapi.IPJ_ORIENT_SECTION = 2
Has an azimuth and swing.
The section view projects all plotted objects
HORIZONTALLY onto the viewing plan in order to
preserve elevations, even if the section has a swing.
gxapi.IPJ_ORIENT_SECTION_NORMAL = 5
Same as IPJ_ORIENT_SECTION, but the projection is perpendicular
to the section, not horizonatl, so elevatins are not preserved
on swung sections.
gxapi.IPJ_ORIENT_DEPTH_SECTION = 3
This simple section has no azimuth or swing defined;
only the depth is of importance, and it is output as
the Y parameter, increasing downward. Used (for instance)
for strip logs in Wholeplot.
gxapi.IPJ_ORIENT_3D = 4
A 3D rotation/scaling/translation orientation
gxapi.IPJ_ORIENT_3D_MATRIX = 7
A 3D matrix orientation
gxapi.IPJ_ORIENT_SECTION_CROOKED = 6
This is a vertical section that follows a
curving path, like a river or survey traverse.
The horizontal section location is the distance along
the path, while the vertical axis gives the elevation.

IPJ_PARM_LST constants

Projection List
gxapi.IPJ_PARM_LST_COORDINATESYSTEM = 0
gxapi.IPJ_PARM_LST_DATUM = 1
gxapi.IPJ_PARM_LST_PROJECTION = 2
gxapi.IPJ_PARM_LST_UNITS = 3
gxapi.IPJ_PARM_LST_LOCALDATUMDESCRIPTION = 4
gxapi.IPJ_PARM_LST_LOCALDATUMNAME = 5
gxapi.IPJ_PARM_LST_UNITSDESCRIPTION = 6

IPJ_TYPE constants

IPJ Types
gxapi.IPJ_TYPE_PRJ = 0
Read from a PRJ file:
string 1 - Source file name
string 2 and 3 are not used.
gxapi.IPJ_TYPE_PCS = 1
Projected coordinate system:
string 1 - POSC PCS name
string 2 - POSC Datum transform name
string 3 - not used.
gxapi.IPJ_TYPE_GCS = 2
Geographic coordinate system:
string 1 - POSC Datum name
string 2 - POSC Datum transform name
string 3 - not used.
gxapi.IPJ_TYPE_ANY = 3
Custom projection
string 1 - POSC Datum name
string 2 - POSC Datum transform name
string 3 - POSC Transform, "" if geographic
gxapi.IPJ_TYPE_NONE = 4
Not used for \ :func:`geosoft.gxapi.GXIPJ.read`\ .  This is used for
\ :func:`geosoft.gxapi.GXIPJ.source_type`\  to indicate no projection.
gxapi.IPJ_TYPE_WRP = 5
gxapi.IPJ_TYPE_TEST = 6
tests the projection tables for internal consistency
and creates report files in the project directory.
string 1 - outout report file name
string 2 - ESRI coordinate strings file.  This contains one
ESRI coordinate string per line.  Lines that
start with '#' are skipped.
string 3 - not currently used

IPJ_UNIT constants

Projection Unit Type
gxapi.IPJ_UNIT_ABBREVIATION = 0
gxapi.IPJ_UNIT_FULLNAME = 1

IPJ_WARP constants

Warp (Transformation) type
gxapi.IPJ_WARP_MATRIX = -1
Matrix Warp
gxapi.IPJ_WARP_NONE = 0
no warp
gxapi.IPJ_WARP_TRANS1 = 1
translate only (needs 1 point)
gxapi.IPJ_WARP_TRANS2 = 2
translate, rotate, normal scale (needs 2 pts)
gxapi.IPJ_WARP_TRANS3 = 3
translate, rotate, scale X and Y (needs 3 pts or more, least-square fit)
gxapi.IPJ_WARP_QUAD = 4
quadrilateral warp (needs 4 points)
gxapi.IPJ_WARP_MULTIPOINT = 5
multipoint warp (needs at least 3 points)
gxapi.IPJ_WARP_LOG = 6
convert from linear to log coords in X and/or Y
gxapi.IPJ_WARP_MULTIPOINT_Y = 7
multipoint warp in Y only (needs at least 3 points)