> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# get_geo_json

### get\_geo\_json

<ul>
  <li>
    get\_geo\_json(\
    &#x20;table\_name: string,\
    &#x20;offset?: number,\
    &#x20;limit?: number,\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md),\
    ): Promise\<Record\<string, any>>

    Retrieves records from a table as a GeoJSON FeatureCollection.A convenience wrapper over `/get/records` with `encoding` forced to `geojson`, unwrapping the single encoded document the server returns.

    #### Parameters

    <ul>
      <li>
        table\_name: string

        Table to read from
      </li>

      <li>
        `Optional`offset: number

        Record offset; defaults to 0
      </li>

      <li>
        `Optional`limit: number

        Maximum records to return; defaults to 10000
      </li>

      <li>
        `Optional`options: Record\<string, string>

        Optional parameters for `/get/records`
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<Record\<string, any>>

    Promise resolving to the GeoJSON FeatureCollection

    #### Example

    ```
    const geo = await gpudb.get_geo_json('shapes', 0, 100, {});
    geo.type;        // 'FeatureCollection'
    geo.features;    // [...]
    ```

    <ul>
      <li>Defined in [src/GPUdb.ts:16133](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L16133)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.