OvertureMaps/data

Difficulty identify country specific part numbers

Closed this issue · 3 comments

Many people like me who are comfortable with Postgres to handle Geometry data. Thus I use Microsoft Blob to download Geo parquet on windows . (Fastest and simplest). Then I use GPQ library to covert the parquet to geojson. Now the challenge is I am trying to download India specific data and I don't find any list of part numbers or a simple map that will show part numbers carrying such region. So if you guys can create a simple map for part number area coverage will be a great help.

HDDL commented

I have the same question. It is time consuming to select specific cities from the provided data.

Hi @DeepakSharda,
I encourage you to consider some of the examples in the documentation to query the source data by bounding box: https://docs.overturemaps.org/getting-data/

The "partition map" that you are asking for is something we essentially get for free when interacting with the geoparquet.

Perhaps try the overturemaps-py downloader to download only the bounding box you are after directly as GeoJSON.

If, however, you would like to know which files contain your area of interest, consider a query like the following:

SELECT distinct("$path")
from v2024_04_16_beta_0
WHERE type = 'place'
	AND ST_CONTAINS(
		ST_GeometryFromText(
			'POLYGON((-74.02860939502716 40.69637170009895,-74.01498913764952 40.746887132052024,-73.95668059587477 40.838661880879215,-73.92638504505156 40.88709623672031,-73.80063503980637 40.84946871009049,-73.79208147525786 40.80349604693666,-73.84976506233214 40.80029416765285,-73.89714092016219 40.79950027260929,-73.92131030559538 40.789787995185776,-73.93696099519728 40.779229383819455,-73.96633118391036 40.74161377205604,-73.9679592847824 40.72419957032406,-73.97218644618987 40.71161371303384,-73.98833870887755 40.703444135048585,-74.02860939502716 40.69637170009895))'
		),
		ST_GeomFromBinary(geometry)
	)

In this example, I used Amazon Athena to identify which file on s3 contained places within the arbitrary WKT geometry (representing Manhattan).

I then downloaded only that file and loaded it into QGIS — it contained a lot more than just Manhattan, but it had the desired outcome.

Again, I recommend trying DuckDB with a bbox clause or the overturemaps-py download utility as a first step in obtaining data.