Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Import a GeoParquet file as a dataset
| ResourceFunction["ImportGeoParquet"][file] imports the GeoParquet file and returns a Dataset. | 
Download a sample GeoParquet file:
| In[1]:= | ![file = URLDownload[
  "https://github.com/opengeospatial/geoparquet/raw/main/examples/example.parquet", "example.parquet"]](https://www.wolframcloud.com/obj/resourcesystem/images/22e/22e4a5d9-ba49-4ebc-8183-a2ad9357d8fd/32c2d7809d97b71c.png) | 
| Out[1]= |  | 
Import the file as a dataset:
| In[2]:= | ![ds = ResourceFunction["ImportGeoParquet"][file]](https://www.wolframcloud.com/obj/resourcesystem/images/22e/22e4a5d9-ba49-4ebc-8183-a2ad9357d8fd/3a0fb52ee016be80.png) | 
| Out[2]= |  | 
Obtain the geo-polygons from the dataset:
| In[3]:= | ![gp = Normal[ds[All, "geometry"]]](https://www.wolframcloud.com/obj/resourcesystem/images/22e/22e4a5d9-ba49-4ebc-8183-a2ad9357d8fd/598935d85d7e9fca.png) | 
| Out[3]= |  | 
Create a map of the last geo-polygon in that list:
| In[4]:= | ![GeoGraphics[Last[gp], GeoBackground -> "VectorClassic"]](https://www.wolframcloud.com/obj/resourcesystem/images/22e/22e4a5d9-ba49-4ebc-8183-a2ad9357d8fd/6fa53d3b871a9674.png) | 
| Out[4]= |  | 
Download building data for a Japanese city:
| In[5]:= | ![file = URLDownload[
  "https://data.source.coop/pacificspatial/flateau/parquet/01205_muroran-shi_2022_building_lod0.parquet", "01205_muroran-shi_2022_building_lod0.parquet"]](https://www.wolframcloud.com/obj/resourcesystem/images/22e/22e4a5d9-ba49-4ebc-8183-a2ad9357d8fd/724517db4be91d3f.png) | 
| Out[5]= |  | 
Import the file as a dataset. This may take several minutes:
| In[6]:= | ![ds = ResourceFunction["ImportGeoParquet"][file]](https://www.wolframcloud.com/obj/resourcesystem/images/22e/22e4a5d9-ba49-4ebc-8183-a2ad9357d8fd/23b53cbc79b604bd.png) | 
| Out[6]= |  | 
Extract the building geometries from the dataset:
| In[7]:= | ![gp = Normal[ds[All, "GEOM"]];
RandomSample[gp, 4]](https://www.wolframcloud.com/obj/resourcesystem/images/22e/22e4a5d9-ba49-4ebc-8183-a2ad9357d8fd/3b32149f751767ae.png) | 
| Out[8]= |  | 
Map the building data:
| In[9]:= | ![GeoGraphics[{GeoStyling[White], gp}, GeoBackground -> Black, PlotRangePadding -> None]](https://www.wolframcloud.com/obj/resourcesystem/images/22e/22e4a5d9-ba49-4ebc-8183-a2ad9357d8fd/6630716d41ebc04a.png) | 
| Out[9]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License