Home Explore Blog CI



postgresql

3rd chunk of `doc/src/sgml/earthdistance.sgml`
13592b050b939c5ba8573822b81a0f6a58d4f57ff2fe5b4b00000001000007ff
     <para>
        Returns the location of a point on the surface of the Earth given
        its latitude (argument 1) and longitude (argument 2) in degrees.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <indexterm><primary>latitude</primary></indexterm>
        <function>latitude</function> ( <type>earth</type> )
        <returnvalue>float8</returnvalue>
       </para>
       <para>
        Returns the latitude in degrees of a point on the surface of the
        Earth.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <indexterm><primary>longitude</primary></indexterm>
        <function>longitude</function> ( <type>earth</type> )
        <returnvalue>float8</returnvalue>
       </para>
       <para>
        Returns the longitude in degrees of a point on the surface of the
        Earth.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <indexterm><primary>earth_distance</primary></indexterm>
        <function>earth_distance</function> ( <type>earth</type>, <type>earth</type> )
        <returnvalue>float8</returnvalue>
       </para>
       <para>
        Returns the great circle distance between two points on the
        surface of the Earth.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <indexterm><primary>earth_box</primary></indexterm>
        <function>earth_box</function> ( <type>earth</type>, <type>float8</type> )
        <returnvalue>cube</returnvalue>
       </para>
       <para>
        Returns a box suitable for an indexed search using the <type>cube</type>
        <literal>@&gt;</literal>
        operator for points within a given great circle distance of a location.
        Some points in this box are further than the specified great circle
        distance from the location, so a second check using

Title: More Cube-Based Earthdistance Functions
Summary
This section details more functions provided by the `earthdistance` module for calculating distances and creating bounding boxes for geographic locations. Specifically, it describes `earth_distance(earth, earth)`, which returns the great circle distance between two points on Earth, and `earth_box(earth, float8)`, which generates a cube-shaped bounding box for indexed searches to find points within a given great circle distance of a location. It notes that the `earth_box` may include points beyond the specified distance, necessitating a secondary distance check.