Giter VIP home page Giter VIP logo

Comments (5)

nyurik avatar nyurik commented on June 21, 2024 1

I'm all for using "standards" (even when standards were created after an established industry practice, and contradicts it). My only concern is that we must not break existing users -- once we introduce an automatic rewinding for Vega users (should be fairly easy to do), we should introduce a new version of the EMS file service that serves different set of files (same files but different winding order). This way existing users will continue using things as is, and eventually all will migrate to the new service.

from ems-file-service.

jsanz avatar jsanz commented on June 21, 2024

We should make this a test to find any other dataset that is breaking in Vega.

from ems-file-service.

jsanz avatar jsanz commented on June 21, 2024

I've been investigating this a bit more.

With geojsonhint I've checked and 61 of our current datasets have one or more warnings about the right-hand rule:

  1:1  warning  Polygons and MultiPolygons should follow the right-hand rule

As Elastic Maps and Landing Page, they render correctly in Vega as well. Just to take Kibana out of the equation you can test this code in the Vega Editor for Bolivia departments:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v3.json",
  "width": 500,
  "height": 300,
  "data": {
    "url": "https://vector.maps.elastic.co/files/bolivia_departments_v1.geo.json?elastic_tile_service_tos=agree&my_app_name=ems-landing-page&my_app_version=7.11.0&license=643c1faf-80fc-4ab0-9323-4d9bd11f4bbc",
    "format": {"property": "features"}
  },
  "transform": [
    
  ],
  "projection": {"type": "mercator"},
  "mark": "geoshape"
}

And this file has warnings when validating it:

dist/vector/files on  master
➜ geojsonhint --format pretty bolivia_departments_v1.geo.json
  1:1  warning  Polygons and MultiPolygons should follow the right-hand rule
  1:1  warning  Polygons and MultiPolygons should follow the right-hand rule
  1:1  warning  Polygons and MultiPolygons should follow the right-hand rule
  1:1  warning  Polygons and MultiPolygons should follow the right-hand rule
  1:1  warning  Polygons and MultiPolygons should follow the right-hand rule
  1:1  warning  Polygons and MultiPolygons should follow the right-hand rule
  1:1  warning  Polygons and MultiPolygons should follow the right-hand rule
  1:1  warning  Polygons and MultiPolygons should follow the right-hand rule
  1:1  warning  Polygons and MultiPolygons should follow the right-hand rule

⚠ 9 warnings

Checking the previous version of the France departments there's a big wrong polygon in the South. geojsonhint only complains about the right-hand rule but maybe this is combined with something else.

image

I will continue debugging the file when I'm back from PTO.

from ems-file-service.

jsanz avatar jsanz commented on June 21, 2024

OK, I did a few more tests and the issue is as @nickpeihl stated the conformity of the France departments GeoJSON file to the RFC 7946 spec. This was already discussed in detail in 2018 on this issue with @thomasneirynck and @nyurik. I'm sorry I did not find that issue before 😞

I will explore adding a step in the build process to enforce a winding order with geojson-rewind, ensuring all our published GeoJSON files are consistent, one way or the other.

Still, the main point of the discussion remains. I'm more inclined to ensure all our GeoJSON files follow the RFC 7946 standard, finding a way for our Vega users to get them properly rendered by d3-geo.

from ems-file-service.

jsanz avatar jsanz commented on June 21, 2024

After sync discussion with @nickpeihl and @thomasneirynck we agreed that EMS data needs to follow industry standards so we need to

  • Upgrade all data in EMS File Service that is not yet following RFC7946 using the EMS data versioning mechanism, so we don't modify current datasets, potentially breaking user workflows. #240
  • Introduce in Kibana a process to rewind the polygons so they work as expected by d3-geo and Vega elastic/kibana#122569

from ems-file-service.

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.