Coder Social home page Coder Social logo

Comments (4)

vpipkt avatar vpipkt commented on June 11, 2024

Using 0.6.0-RC7

from pre-lt-raster-frames.

metasim avatar metasim commented on June 11, 2024

@vpipkt Any chance you can try dropping the bounds column before writing and see if you still get the error? I'm wondering if something's funny with writing JTS types...

from pre-lt-raster-frames.

metasim avatar metasim commented on June 11, 2024

Here's the schema it's confused by, formatted for reading:

{
    "type": "struct",
    "fields": [
        {
            "name": "spatial_key",
            "type": {
                "type": "struct",
                "fields": [
                    {
                        "name": "col",
                        "type": "integer",
                        "nullable": false,
                        "metadata": {}
                    },
                    {
                        "name": "row",
                        "type": "integer",
                        "nullable": false,
                        "metadata": {}
                    }
                ]
            },
            "nullable": false,
            "metadata": {
                "_context": {
                    "extent": {
                        "xmax": 752414.0000034694,
                        "ymin": 4151951.9999965937,
                        "ymax": 4243599.999999758,
                        "xmin": 658974.0000002789
                    },
                    "layoutDefinition": {
                        "tileLayout": {
                            "layoutRows": 65602,
                            "tileRows": 100,
                            "layoutCols": 6106,
                            "tileCols": 100
                        },
                        "extent": {
                            "xmax": 805300.0,
                            "ymin": 2657400.0,
                            "ymax": 9217600.0,
                            "xmin": 194700.0
                        }
                    },
                    "bounds": {
                        "minKey": {
                            "col": 4642,
                            "row": 49740
                        },
                        "maxKey": {
                            "col": 5577,
                            "row": 50656
                        }
                    },
                    "cellType": "int32",
                    "crs": "proj=utm +zone=17 +ellps=GRS80 +datum=NAD83 +units=m +no_defs "
                },
                "_stRole": "spatial_key"
            }
        },
        {
            "name": "bounds",
            "type": {
                "type": "udt",
                "class": "org.apache.spark.sql.jts.PolygonUDT$",
                "pyClass": null,
                "sqlType": {
                    "type": "struct",
                    "fields": [
                        {
                            "name": "wkb",
                            "type": "binary",
                            "nullable": true,
                            "metadata": {}
                        }
                    ]
                }
            },
            "nullable": false,
            "metadata": {}
        },
        {
            "name": "naip_band1",
            "type": {
                "type": "udt",
                "class": "org.apache.spark.sql.gt.types.TileUDT$",
                "pyClass": "pyrasterframes.TileUDT",
                "sqlType": {
                    "type": "struct",
                    "fields": [
                        {
                            "name": "cellType",
                            "type": "string",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "cols",
                            "type": "short",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "rows",
                            "type": "short",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "data",
                            "type": "binary",
                            "nullable": false,
                            "metadata": {}
                        }
                    ]
                }
            },
            "nullable": true,
            "metadata": {}
        },
        {
            "name": "naip_band2",
            "type": {
                "type": "udt",
                "class": "org.apache.spark.sql.gt.types.TileUDT$",
                "pyClass": "pyrasterframes.TileUDT",
                "sqlType": {
                    "type": "struct",
                    "fields": [
                        {
                            "name": "cellType",
                            "type": "string",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "cols",
                            "type": "short",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "rows",
                            "type": "short",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "data",
                            "type": "binary",
                            "nullable": false,
                            "metadata": {}
                        }
                    ]
                }
            },
            "nullable": true,
            "metadata": {}
        },
        {
            "name": "naip_band3",
            "type": {
                "type": "udt",
                "class": "org.apache.spark.sql.gt.types.TileUDT$",
                "pyClass": "pyrasterframes.TileUDT",
                "sqlType": {
                    "type": "struct",
                    "fields": [
                        {
                            "name": "cellType",
                            "type": "string",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "cols",
                            "type": "short",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "rows",
                            "type": "short",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "data",
                            "type": "binary",
                            "nullable": false,
                            "metadata": {}
                        }
                    ]
                }
            },
            "nullable": true,
            "metadata": {}
        },
        {
            "name": "naip_band4",
            "type": {
                "type": "udt",
                "class": "org.apache.spark.sql.gt.types.TileUDT$",
                "pyClass": "pyrasterframes.TileUDT",
                "sqlType": {
                    "type": "struct",
                    "fields": [
                        {
                            "name": "cellType",
                            "type": "string",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "cols",
                            "type": "short",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "rows",
                            "type": "short",
                            "nullable": false,
                            "metadata": {}
                        },
                        {
                            "name": "data",
                            "type": "binary",
                            "nullable": false,
                            "metadata": {}
                        }
                    ]
                }
            },
            "nullable": true,
            "metadata": {}
        }
    ]
}

from pre-lt-raster-frames.

vpipkt avatar vpipkt commented on June 11, 2024

I tried dropping the bounds column and get same/similar error

from pre-lt-raster-frames.

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.