GithubHelp home page GithubHelp logo

Comments (7)

nickkieffer avatar nickkieffer commented on August 29, 2024

Makes geo viz nearly unusable for me

from bigquery-geo-viz.

mentin avatar mentin commented on August 29, 2024

Could you share any of the datasets that cause such result?

One hypothesis, judging by the fact that red starts at antimeridian in the image above - there are some inverted polygons in the dataset. Converted to GeoJson used by GeoViz they are represented by +-180/+-90 box, with the polygon you do want to show as a hole. I could not reproduce this with the polygons I've tried though. So having a dataset to repro would be helpful.

from bigquery-geo-viz.

nickkieffer avatar nickkieffer commented on August 29, 2024

Yep here ya go
bquxjob_7d574d42_18b67e06b84.json

from bigquery-geo-viz.

mentin avatar mentin commented on August 29, 2024

Thanks!

For some reasons I don't understand, I don't get that kind of fill in GeoViz. But I can confirm the polygons are inverted (if they are supposed to describe small blocks in Virginia):

select 
  st_area(st_geogfromtext(geom, oriented=>TRUE)) area, 
  st_area(st_geogfromtext(geom)) area2,
  geom
from  tmp.gvbug

Results I get:

Row | area | area2 | geom |  
-- | -- | -- | -- | --
1 | 510066073116955.81 | 1032.7522888034407 | POLYGON((-79.9924959415828 37.7939704994434, -79.9923042878136 37.7941072727986, -79.9919581354936 37.7938100261923, -79.9921564035582 37.793670066394, -79.9924959415828 37.7939704994434)) |  
2 | 510066073117479.56 | 508.98898554590954 | POLYGON((-79.9921195896996 37.794239082534, -79.992024820132 37.7943067140553, -79.9916787100328 37.7940072747658, -79.9917752115521 37.7939391538722, -79.9921195896996 37.794239082534)) |  
3 | 510066073117735.62 | 252.93059403002817 | POLYGON((-79.9919262704538 37.7943770429917, -79.9915845989301 37.794073722444, -79.9915913848041 37.7940689180758, -79.9916303878571 37.7940413852345, -79.9919753481127 37.7943420190847, -79.9919262704538 37.7943770429917)) |  
4 | 510066073117728.12 | 260.51798355690715 | POLYGON((-79.9919753481127 37.7943420190847, -79.9916303878571 37.7940413852345, -79.9916787100328 37.7940072747658, -79.992024820132 37.7943067140553, -79.9919753481127 37.7943420190847)) |  
5 |  510066073116963.5 |   1025.10061000995 | POLYGON((-79.9924959415828 37.7939704994434, -79.9921564035582 37.793670066394, -79.9923494443263 37.7935337962376, -79.9926909882889 37.7938313030569, -79.9924959415828 37.7939704994434))

The area of the polygons is almost whole globe - so the red fill of the whole globe is correct. I wonder why it does not happen in my browser - this might be an actual bug.

I suggest fixing the polygons - you are likely getting invalid analysis results any way. When loading the geospatial data BigQuery uses oriented semantics. ST_GeogFromText uses unoriented semantics (smaller of two interpretations) by default. Another option is to subtract (ST_Difference) already loaded geography from the whole globe (ST_GeogFromText('fullglobe')).

from bigquery-geo-viz.

nickkieffer avatar nickkieffer commented on August 29, 2024

Hmm thank you for taking a look and letting me know about my geometries!
Extra weird is that the correct polygons look to be where they should be but I just can't zoom to them because of this other backwards polygon coming in at just after this zoom level
image
image

from bigquery-geo-viz.

nickkieffer avatar nickkieffer commented on August 29, 2024

They show in the data view as all wonky too I guess, should've noticed that 😬

from bigquery-geo-viz.

nickkieffer avatar nickkieffer commented on August 29, 2024

FWIW inverting my geometries fixed the issue I was seeing. Sorry for the sass and thanks for the help!

from bigquery-geo-viz.

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.