# Generating new spatial data

### Draw custom geographies&#x20;

<table data-full-width="false"><thead><tr><th align="center">CARTO DW</th><th width="154" align="center">BigQuery</th><th align="center">Snowflake</th><th align="center">Redshift</th><th align="center">PostgreSQL</th><th data-hidden>Snowflake</th><th data-hidden>Redshift</th><th data-hidden>PostgreSQL</th><th data-hidden>CARTO DW</th></tr></thead><tbody><tr><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td></td><td></td><td></td><td></td></tr></tbody></table>

This example demonstrates how to use Workflows to define custom points, lines and polygons that can be incorporated into the analysis.

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/custom_geogs.sql)

<div align="left"><figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/w8fbLgnYmrrP19gFY6m1/Screenshot%202023-10-19%20at%2019.34.06.png" alt="" width="368"><figcaption></figcaption></figure></div>

### Create routes from origin/destination dataset&#x20;

<table data-full-width="false"><thead><tr><th align="center">CARTO DW</th><th width="154" align="center">BigQuery</th><th align="center">Snowflake</th><th align="center">Redshift</th><th align="center">PostgreSQL</th><th data-hidden>Snowflake</th><th data-hidden>Redshift</th><th data-hidden>PostgreSQL</th><th data-hidden>CARTO DW</th></tr></thead><tbody><tr><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td></td><td></td><td></td><td></td></tr></tbody></table>

This example demonstrates how to create an OD matrix from different data sources and create routes between them.&#x20;

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/routes_od_matrix.sql)

<div align="left"><figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/3hbtlP9j9S1aBOluUsWQ/Screenshot%202023-10-18%20at%2018.07.37.png" alt="" width="563"><figcaption></figcaption></figure></div>

### Geocode street addresses into point geometries&#x20;

<table data-full-width="false"><thead><tr><th align="center">CARTO DW</th><th width="154" align="center">BigQuery</th><th align="center">Snowflake</th><th align="center">Redshift</th><th align="center">PostgreSQL</th><th data-hidden>Snowflake</th><th data-hidden>Redshift</th><th data-hidden>PostgreSQL</th><th data-hidden>CARTO DW</th></tr></thead><tbody><tr><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td></td><td></td><td></td><td></td></tr></tbody></table>

This example demonstrates how to use Workflows to generate points from a list of street addresses.

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/geocode.sql)

<div align="left"><figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/Weq54e1Isouf2QQ4VbpI/Screenshot%202023-10-19%20at%2010.29.19.png" alt="" width="375"><figcaption></figcaption></figure></div>

### Generate points out of Latitude and Longitude columns&#x20;

<table data-full-width="false"><thead><tr><th align="center">CARTO DW</th><th width="154" align="center">BigQuery</th><th align="center">Snowflake</th><th align="center">Redshift</th><th align="center">PostgreSQL</th><th data-hidden>Snowflake</th><th data-hidden>Redshift</th><th data-hidden>PostgreSQL</th><th data-hidden>CARTO DW</th></tr></thead><tbody><tr><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td></td><td></td><td></td><td></td></tr></tbody></table>

This example demonstrates how to use Workflows to generate point geographies out of Latitude/Longitude coordinates on separate columns.

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/lat_lon_to_points.sql)

<div align="left"><figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/nJOUEOlA7fLa2Mw1siRx/Screenshot%202023-10-19%20at%2012.32.02.png" alt="" width="312"><figcaption></figcaption></figure></div>

### Generate isochrones from point data

<table data-full-width="false"><thead><tr><th align="center">CARTO DW</th><th width="154" align="center">BigQuery</th><th align="center">Snowflake</th><th align="center">Redshift</th><th align="center">PostgreSQL</th><th data-hidden>Snowflake</th><th data-hidden>Redshift</th><th data-hidden>PostgreSQL</th><th data-hidden>CARTO DW</th></tr></thead><tbody><tr><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td></td><td></td><td></td><td></td></tr></tbody></table>

This example demonstrates how to use Workflows to generate isochrones from a set of points.

[**Download example**](https://storage.googleapis.com/carto-workflows-examples/files/isochrones_from_points.sql)

<div align="left"><figure><img src="https://content.gitbook.com/content/FEElAdsRIl9DzfMhbRlB/blobs/1N5aEfyhyVFyjctqf2Cu/Screenshot%202023-10-19%20at%2012.42.10.png" alt="" width="375"><figcaption></figcaption></figure></div>
