Giter Club home page Giter Club logo

Comments (5)

imincik avatar imincik commented on May 28, 2024

I tested our GDAL build with example parquet file to make sure it really works and it looks OK.

ogrinfo --version
GDAL 3.6.4, released 2023/04/17

ogrinfo -al /home/imincik/Downloads/example.parquet | head -n 50
INFO: Open of `/home/imincik/Downloads/example.parquet'
      using driver `Parquet' successful.

Layer name: example
Geometry: Multi Polygon
Feature Count: 5
Extent: (-180.000000, -90.000000) - (180.000000, 83.645100)
Layer SRS WKT:
GEOGCRS["WGS 84 (CRS84)",
    ENSEMBLE["World Geodetic System 1984 ensemble",
        MEMBER["World Geodetic System 1984 (Transit)"],
        MEMBER["World Geodetic System 1984 (G730)"],
        MEMBER["World Geodetic System 1984 (G873)"],
        MEMBER["World Geodetic System 1984 (G1150)"],
        MEMBER["World Geodetic System 1984 (G1674)"],
        MEMBER["World Geodetic System 1984 (G1762)"],
        MEMBER["World Geodetic System 1984 (G2139)"],
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]],
        ENSEMBLEACCURACY[2.0]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    USAGE[
        SCOPE["Not known."],
        AREA["World."],
        BBOX[-90,-180,90,180]],
    ID["OGC","CRS84"]]
Data axis to CRS axis mapping: 1,2
Geometry Column = geometry
pop_est: Integer64 (0.0)
continent: String (0.0)
name: String (0.0)
iso_a3: String (0.0)
gdp_md_est: Real (0.0)
OGRFeature(example):0
  pop_est (Integer64) = 920938
  continent (String) = Oceania
  name (String) = Fiji
  iso_a3 (String) = FJI
  gdp_md_est (Real) = 8374
  MULTIPOLYGON (((180.0 -16.0671326636424,180.0 -16.5552165666392,179.364142661964 -16.8013540769469,178.725059362997 -17.012041674368,178.596838595117 -16.63915,179.096609362997 -16.4339842775474,179.413509362997 -16.3790542775474,180.0 -16.0671326636424)),((178.12557 -17.50481,178.3736 -17.33992,178.71806 -17.62846,178.55271 -18.15059,177.93266 -18.28799,177.38146 -18.16432,177.28504 -17.72465,177.67087 -17.38114,178.12557 -17.50481)),((-179.793320109049 -16.0208822567412,-179.917369384765 -16.5017831356494,-180 -16.5552165666392,-180 -16.0671326636424,-179.793320109049 -16.0208822567412)))

OGRFeature(example):1

from fiona.

imincik avatar imincik commented on May 28, 2024

Opening same file with Fiona works as well:

t.py

import fiona

with fiona.open("/home/imincik/Downloads/example.parquet") as f:
    print(f.schema)
python ./t.py
{'properties': {'pop_est': 'int', 'continent': 'str', 'name': 'str', 'iso_a3': 'str', 'gdp_md_est': 'float'}, 'geometry': 'MultiPolygon'}```

from fiona.

sgillies avatar sgillies commented on May 28, 2024

@imincik one difference is that the test is trying to open an existing file in append mode to add new features. I'm not sure the OGR Parquet driver allows this. The Parquet format itself makes appending complicated.

from fiona.

rbuffat avatar rbuffat commented on May 28, 2024

@imincik Fiona maintains in drvsupport.py a list of driver capabilities. Unfortunately, this metadata is not present in GDAL (e.g. if a driver support append or write mode). These functionalities change between GDAL versions and some of Fiona's tests are to check for such changes of support. In general, they do not test the functionality of Fiona but rather the driver support of GDAL (e.g. by trying to write data with a specific driver and rereading it). For packaging, it should be safe to ignore these tests. The pytest marker gdal can be used to disable all such tests that only test GDAL functionality.

However, I think we do not test the parquet driver in the CI despite being included in drvsupport.py Thus, the parquet driver might not support raw but only rw.

from fiona.

imincik avatar imincik commented on May 28, 2024

Thank you very much @sgillies and @rbuffat for explanation. We will disable these tests.

from fiona.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.