EPSGToCoordSysString$() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Converts a string containing a Spatial Reference System into a CoordSys clause that can be used with any MapBasic function or statement. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

EPSGToCoordSysString$( srs_string )

srs_string is a String describing a Spatial Reference System (SRS) for any supported coordinate systems. SRS strings are also referred to as EPSG (European Petroleum Survey Group) strings (for example, epsg:2600). For a complete list of EPSG codes used with MapInfo Pro see the MAPINFOW.PRJ file in your MapInfo Pro installation. The EPSG codes are identified by a "\p" followed by a number.

Description

The EPSGToCoordSysString$() is used to convert a SRS String into a CoordSys clause that can be used in any MapBasic function or statement that takes a CoordSys clause as an input.

Example

The following example sets the coordinate system of a map to Earth Projection 1, 104.

run command("Set Map " +  EPSGToCoordSysString$("EPSG:4326"))

See Also:

CoordSys clause