paleolimbot commented on issue #2586:
URL: https://github.com/apache/iceberg/issues/2586#issuecomment-1817530680

   I think there is a recording but I'm not sure if it has been posted yet. The 
slides are here: https://dewey.dunnington.ca/slides/geoarrow2023 and GeoArrow 
for Python is on pypi/conda and can generate examples of what Parquet files 
would look like and what the memory layout would be:
   
   ```python
    import geoarrow.pyarrow as ga
   import pyarrow as pa
   from geoarrow.pyarrow import io
   from pyarrow import parquet
   
   extension_array = ga.as_geoarrow(["POLYGON ((0 0, 1 0, 0 1, 0 0))"])
   extension_array.type
   #> PolygonType(geoarrow.polygon)
   extension_array.type.storage_type
   #> ListType(list<rings: list<vertices: struct<x: double, y: double>>>)
   extension_array.geobuffers()
   #> [None,
   #>  array([0, 1], dtype=int32),
   #>  array([0, 4], dtype=int32),
   #>  array([0., 1., 0., 0.]),
   #>  array([0., 0., 1., 0.])]
   
   # Parquet with extension type
   table = pa.table([extension_array], names=["geometry"])
   parquet.write_table(table, "ext.parquet")
   
   # GeoParquet (no extension type, but with 'geo' metadata for GeoParquet)
   io.write_geoparquet_table(table, "geo.parquet")
   ```
   
   An example of how to find column statistics and use them is here: 
https://github.com/geoarrow/geoarrow-python/blob/main/geoarrow-pyarrow/src/geoarrow/pyarrow/dataset.py#L434-L468


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to