From 1213457ec356ba7afcef5b244bdec1c68b832ce7 Mon Sep 17 00:00:00 2001 From: Stephen Epps Date: Tue, 4 Aug 2026 22:14:01 -0700 Subject: [PATCH 1/4] divisions guide: territorial and land flag descriptions Signed-off-by: Stephen Epps --- docs/guides/divisions/index.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/guides/divisions/index.mdx b/docs/guides/divisions/index.mdx index 6958cefc..103cb628 100644 --- a/docs/guides/divisions/index.mdx +++ b/docs/guides/divisions/index.mdx @@ -43,7 +43,13 @@ Divisions data can be used for many purposes, which can include, but are not lim A **division** is a feature type that represents an official or non-official organization of people: country, region, province, city, neighborhood, etc. — as seen from a given political perspective. It has a point geometry which gives an approximate location of the position most commonly associated with the feature. -A **division_area** is a feature type that captures the shape of the land area, or land and territorial sea (maritime), belonging to a division feature. It has a polygon or multipolygon geometry. +A **division_area** is a feature type that captures the shape of the land area, or land and territorial sea (maritime), belonging to a division feature. It has a polygon or multipolygon geometry. + +The `is_land` and `is_territorial` booleans represent a division area's extent. The only combinations that occur are: + +- landlocked division areas: `is_land`=`TRUE`, `is_territorial`=`TRUE` +- division areas clipped to land only, water excluded: `is_land`=`TRUE`, `is_territorial`=`FALSE` +- unclipped division areas including water (the full territorial extent): `is_land`=`FALSE`, `is_territorial`=`TRUE` A **division_boundary** is a feature type that represents a shared border between two division features. It has a linestring geometry. The geometry of a divison_boundary is either wholly non-maritime, or wholly maritime. A maritime boundary is the extension of a non-maritime boundary into the water. From b2a2a70a9604b14c75b455dda49bb6a8dbf07dda Mon Sep 17 00:00:00 2001 From: Stephen Epps Date: Mon, 17 Aug 2026 09:12:28 -0700 Subject: [PATCH 2/4] add new territorial query - divisions Signed-off-by: Stephen Epps --- .../duckdb/divisions_is_territorial_true.sql | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/queries/duckdb/divisions_is_territorial_true.sql diff --git a/src/queries/duckdb/divisions_is_territorial_true.sql b/src/queries/duckdb/divisions_is_territorial_true.sql new file mode 100644 index 00000000..d50000db --- /dev/null +++ b/src/queries/duckdb/divisions_is_territorial_true.sql @@ -0,0 +1,24 @@ +LOAD spatial; -- noqa +LOAD httpfs; -- noqa +-- Access the data on AWS in this example +SET s3_region='us-west-2'; + +COPY ( + SELECT + id, + names.primary as name, + subtype, + geometry + FROM + read_parquet('s3://overturemaps-us-west-2/release/__OVERTURE_RELEASE/theme=divisions/type=division_area/*', filename=true, hive_partitioning=1) + WHERE + country = 'JP' + AND subtype = 'region' + AND is_territorial = True +) +TO + 'overture_japan_is_territorial_region.gpkg' +WITH ( + FORMAT GDAL, + DRIVER 'GPKG' +); \ No newline at end of file From 3c60c9b6651fb67e24b47a69bddab92dc3a176a6 Mon Sep 17 00:00:00 2001 From: Stephen Epps Date: Mon, 17 Aug 2026 09:12:59 -0700 Subject: [PATCH 3/4] add new is_land query - divisions Signed-off-by: Stephen Epps --- src/queries/duckdb/divisions_is_land_true.sql | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/queries/duckdb/divisions_is_land_true.sql diff --git a/src/queries/duckdb/divisions_is_land_true.sql b/src/queries/duckdb/divisions_is_land_true.sql new file mode 100644 index 00000000..36546025 --- /dev/null +++ b/src/queries/duckdb/divisions_is_land_true.sql @@ -0,0 +1,24 @@ +LOAD spatial; -- noqa +LOAD httpfs; -- noqa +-- Access the data on AWS in this example +SET s3_region='us-west-2'; + +COPY ( + SELECT + id, + names.primary as name, + subtype, + geometry + FROM + read_parquet('s3://overturemaps-us-west-2/release/__OVERTURE_RELEASE/theme=divisions/type=division_area/*', filename=true, hive_partitioning=1) + WHERE + country = 'JP' + AND subtype = 'region' + AND is_land = True +) +TO + 'overture_japan_is_land_region.gpkg' +WITH ( + FORMAT GDAL, + DRIVER 'GPKG' +); \ No newline at end of file From 623b037df260815e84d6b1294e5026bb62da0165 Mon Sep 17 00:00:00 2001 From: Stephen Epps Date: Mon, 17 Aug 2026 09:16:17 -0700 Subject: [PATCH 4/4] update divisions guide with new example queries Signed-off-by: Stephen Epps --- docs/guides/divisions/index.mdx | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/guides/divisions/index.mdx b/docs/guides/divisions/index.mdx index 103cb628..08e7a975 100644 --- a/docs/guides/divisions/index.mdx +++ b/docs/guides/divisions/index.mdx @@ -20,6 +20,8 @@ import CountsPerEntity from '!!raw-loader!@site/src/queries/duckdb/divisions_cou import SubTypeCountsUSMXCA from '!!raw-loader!@site/src/queries/duckdb/divisions_subtype_counts_specific_countries.sql'; import DenmarkLocalityNeighborhood from '!!raw-loader!@site/src/queries/duckdb/divisions_denmark_locality_neighborhood.sql'; import PhillyPlaces from '!!raw-loader!@site/src/queries/duckdb/divisions_philly_places.sql'; +import IsLandTrue from '!!raw-loader!@site/src/queries/duckdb/divisions_is_land_true.sql'; +import IsTerritorialTrue from '!!raw-loader!@site/src/queries/duckdb/divisions_is_territorial_true.sql'; # Divisions Guide @@ -237,9 +239,26 @@ This query will return a subset of fields and the geometry for each locality and - #### Exporting places data within Philadelphia to a local Parquet file This query will return Places theme data for any place within the locality of Philadelphia + +#### Exporting different representations of a division area geometry + +Using the `is_land` and `is_territorial` field values, you can export different extents of the same division area: + + + + +This query will return regions in Japan with land-clipped geometries. + + + + +This query will return regions in Japan with geometries that represent full territorial extent, extending into water. + + + + \ No newline at end of file