[gdal-dev] writing arrow geometry

Michael Sumner mdsumner at gmail.com
Mon Oct 7 06:23:48 PDT 2024


I realize I left out the INTERLEAVING, ie.

ogr2ogr ~/fromgdal.arrow
ogr/data/arrow/from_paleolimbot_geoarrow/polygon-default.ipc -lco
GEOMETRY_ENCODING=GEOARROW_INTERLEAVED

but still, I get these list<item elements rather than their
rings/vertices/geoarrow.point type names:

<nanoarrow_array_stream struct<row_num: int32, geometry:
geoarrow.polygon{list<item: list<item: fixed_size_list(2)<xy: double>>>}>>



On Tue, Oct 8, 2024 at 12:19 AM Michael Sumner <mdsumner at gmail.com> wrote:

> When I investigate the schema in one of the test files
>
> ogr/data/arrow/from_paleolimbot_geoarrow/polygon-default.ipc
>
> I see expected  list<polygons and list<rings and xy etc. I'm printing this
> by using R nanoarrow::read_arrow, or from poLayer->GetArrowStream and I get
> the same output:
>
> <nanoarrow_array_stream struct<row_num: int32, geometry:
> geoarrow.polygon{list<rings: list<vertices:
> geoarrow.point{fixed_size_list(2)<xy: double>}>>}>>
>
> If I write a new .arrow with GDAL
>
> ogr2ogr ~/fromgdal.arrow
> ogr/data/arrow/from_paleolimbot_geoarrow/polygon-default.ipc
>
> the stream schema looks like this:
>
> <nanoarrow_array_stream struct<row_num: int32, geometry:
> geoarrow.polygon{list<item: list<item: struct<x: double, y: double>>>}>>
>
> and from nanoarrow I see
>
> nanoarrow::read_nanoarrow("~/fromgdal.arrow")
> Error in read_nanoarrow.character("~/fromgdal.arrow") :
>   array_stream->get_schema(): [29] Expected >= 1330795077 bytes of
> remaining data but found 2266 bytes in buffer
>
> Are we in-between moves regarding specifications, or something?  I'm
> having good results generally and this seems like a problem in the Arrow
> driver for write.
>
> Cheers, Mike
>
>
> --
> Michael Sumner
> Research Software Engineer
> Australian Antarctic Division
> Hobart, Australia
> e-mail: mdsumner at gmail.com
>


-- 
Michael Sumner
Research Software Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsumner at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20241008/6b60c8dd/attachment.htm>


More information about the gdal-dev mailing list