# GeoJSON Coordinate Extractor

Extract every coordinate in a GeoJSON file into a flat longitude,latitude CSV — one row per vertex, with elevation, rounding, dedupe and lat/lon order options.

## Run it

- **CLI:** `gizza tool geojson-coords-to-csv '{"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[[-105.1,40.1],[-105.2,40.2]]}}'`
- **Web:** https://gizza.ai/tools/geojson-coords-to-csv/
- **Agents:** machine-readable descriptor (parameters JSON Schema) at https://gizza.ai/tools/geojson-coords-to-csv/tool.json

## Inputs

- `geojson` — GeoJSON _(field)_
- `order` — Coordinate order _(field)_
- `columns` — Columns _(field)_
- `shapes` — Geometries to include _(field)_
- `elevation` — Elevation column _(field)_
- `precision` — Decimal places _(field)_
- `dedupe` — Repeated coordinates _(field)_
- `properties` — Append feature property columns _(field)_
- `delimiter` — Delimiter _(field)_
- `header` — Include header row _(field)_

## Output

- Coordinate CSV (text)

## Query parameters

Open the tool pre-filled and auto-run via URL:

- `geojson` — GeoJSON
- `order` — Coordinate order
- `columns` — Columns
- `shapes` — Geometries to include
- `elevation` — Elevation column
- `precision` — Decimal places
- `dedupe` — Repeated coordinates
- `properties` — Append feature property columns
- `delimiter` — Delimiter
- `header` — Include header row

Example: `https://gizza.ai/tools/geojson-coords-to-csv/?geojson=%7B%22type%22%3A%22Feature%22%2C%22properties%22%3A%7B%7D%2C%22geometry%22%3A%7B%22type%22%3A%22LineString%22%2C%22coordinates%22%3A%5B%5B-105.1%2C40.1%5D%2C%5B-105.2%2C40.2%5D%5D%7D%7D&order=lonlat&columns=coords&shapes=all&elevation=auto&dedupe=none&properties=true&delimiter=comma&header=true`

---

## About this tool

GeoJSON Coordinate Extractor turns geometry positions into spreadsheet-friendly rows. Paste a FeatureCollection, a single Feature, a bare geometry, or an array of GeoJSON objects and the tool emits one CSV row per coordinate in document order. That is different from a feature-level GeoJSON-to-CSV converter: a LineString with 20 vertices becomes 20 rows, and a polygon ring can include every corner plus the closing vertex unless you choose to drop it.

Use the controls to switch between GeoJSON order (`longitude,latitude`) and map-friendly order (`latitude,longitude`), include index and feature context columns, keep only points/lines/polygons, round coordinates, add elevation when present, append feature properties, or remove repeated coordinates. Processing runs locally in the browser and accepts documents up to 16 MiB or 200,000 emitted coordinate rows.

### Worked example

Input GeoJSON:

```json
{"type":"Feature","properties":{"name":"Ridge trail"},"geometry":{"type":"LineString","coordinates":[[-105.1,40.1,2410],[-105.2,40.2,2530]]}}
```

With the default options, the output is:

```csv
longitude,latitude,elevation
-105.1,40.1,2410
-105.2,40.2,2530
```

Choose `columns=full` when you need audit fields such as feature index, geometry type, part, ring, position, and whether a polygon coordinate is the repeated closing vertex.

## FAQ

<details>
<summary>Does this convert GeoJSON features to one CSV row per feature?</summary>

No. This tool extracts coordinates, so it writes one row per GeoJSON position. For example, a 500-vertex polygon produces 500 coordinate rows unless you filter or dedupe it. Use a feature-level GeoJSON-to-CSV converter when you need one row per Feature.

</details>

<details>
<summary>Why are longitude and latitude in that order?</summary>

GeoJSON stores coordinates as `[longitude, latitude]`, so the default CSV columns are `longitude,latitude`. If your spreadsheet, GPS workflow, or map UI expects `latitude,longitude`, switch Coordinate order to `latlon`; the header and values are both swapped.

</details>

<details>
<summary>What happens to polygon closing coordinates?</summary>

GeoJSON polygon rings often repeat the first coordinate as the last coordinate. The default keeps that repeated closing vertex because it is present in the source. Set Repeated coordinates to `ring-close` to drop those closing repeats, or use `full` columns to see a `ring_close` flag for the repeated vertex.

</details>

<details>
<summary>Can it keep Feature properties with each coordinate?</summary>

Yes. Enable Append feature property columns to add the union of property keys as extra CSV columns, repeated on every coordinate row emitted from that feature. Nested property objects and arrays are written as compact JSON strings.

</details>

<details>
<summary>What are the limits and unsupported cases?</summary>

The tool accepts valid GeoJSON geometry types: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Feature, FeatureCollection, or a top-level array of those. It does not reproject coordinates, validate topology, simplify geometry, fetch URLs, or repair malformed GeoJSON. Inputs over 16 MiB or outputs over 200,000 coordinate rows should be split first.

</details>

## Related tools

- [Point in Polygon Checker](https://gizza.ai/tools/geofence-check/): Test latitude/longitude points against a polygon geofence. Paste GeoJSON or lat,lon lines, choose boundary handling, and export text, CSV, or JSON.
- [Query GeoJSON Features](https://gizza.ai/tools/geojson-query/): Filter, project, sort, page, and aggregate GeoJSON features with property predicates, bbox filters, and simple spatial functions.
- [GeoJSON to CSV Converter](https://gizza.ai/tools/geojson-to-csv/): Flatten GeoJSON features into CSV rows with property columns, WKT or longitude/latitude geometry, nested-field flattening, and delimiter options.
- [Convert GeoJSON, WKT, and WKB Geometries](https://gizza.ai/tools/geojson-wkt/): Convert geometries between GeoJSON, WKT/EWKT, and WKB/EWKB with SRID, precision, endian, and multi-feature controls.
- [Absolute value, sign, or negation for a whole column](https://gizza.ai/tools/absolute-value-transformer/): Paste a column of numbers and apply absolute value, sign extraction (-1/0/1), sign flipping, or force-negative to every value at once, with rounding and an audit table.
