Giter VIP home page Giter VIP logo

Comments (6)

jiayuasu avatar jiayuasu commented on August 18, 2024

@ruanqizhen can you show me the full stacktrace? The one that is after Caused by: java.lang.NullPointerException ?

from sedona.

ruanqizhen avatar ruanqizhen commented on August 18, 2024

@ruanqizhen can you show me the full stacktrace? The one that is after Caused by: java.lang.NullPointerException ?

This is the entire stacktrace it returned. Caused by: java.lang.NullPointerException is the last line.

from sedona.

jiayuasu avatar jiayuasu commented on August 18, 2024

@ruanqizhen I think the GeometryType might have indeterministic behavior over invalid geometries. We need to further investigate this issue.

Can you run ST_IsValid on your geometry column? Is there any invalid geometries? If you remove those and run GeometryType again, do you still have the same problem?

from sedona.

ruanqizhen avatar ruanqizhen commented on August 18, 2024

@ruanqizhen I think the GeometryType might have indeterministic behavior over invalid geometries. We need to further investigate this issue.

Can you run ST_IsValid on your geometry column? Is there any invalid geometries? If you remove those and run GeometryType again, do you still have the same problem?

It is not likely caused by the invalid geometry, because I've called the ST_MakeValid() for all of the geometries.

from sedona.

jiayuasu avatar jiayuasu commented on August 18, 2024

@ruanqizhen ST_MakeValid might not work for all cases. Any way to fix geometries is ST_Buffer(geom, 0).

If both of the method still cannot fix the issue, I think you can stick to ST_GeometryType. If you don't want the ST_ in the result, you can easily write a PySpark UDF to split the string by _ and only keep the second half.

from sedona.

ruanqizhen avatar ruanqizhen commented on August 18, 2024

@ruanqizhen ST_MakeValid might not work for all cases. Any way to fix geometries is ST_Buffer(geom, 0).

If both of the method still cannot fix the issue, I think you can stick to ST_GeometryType. If you don't want the ST_ in the result, you can easily write a PySpark UDF to split the string by _ and only keep the second half.

I'm using ST_GeometryType now. But I'm wondering if there is a way to find out which row caused the problem. Is there a way that I can "try", or skip the error, to let the query continue process other rows, so that I can then check which row was skipped.

from sedona.

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.