Comments (5)
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.
We should make this a test to find any other dataset that is breaking in Vega.
from ems-file-service.
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.
I will continue debugging the file when I'm back from PTO.
from ems-file-service.
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.
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)
- [Meta] EMS 7.16 HOT 1
- [Meta] EMS 8.0 HOT 1
- Meta: rename master to main
- Upgrade to Node 16
- Upgrade all GeoJSON layers to follow RFC7946
- Remove region identifiers with values that are too common HOT 1
- Telangana and Andhra Pradesh regions names in India are incorrect
- Fix region name for GB-LND in administrative regions layer
- New Zealand EMS administrative map seems to be missing. Can this please be added? HOT 1
- "<svg onload=alert(1337)>%00"><img src=x onerror=alert`1`//"
- Fix Morocco regions label
- Upgrade to NodeJS 18
- [EMS] Include commit identifier in release artifacts
- Generate EMS File Service manifests for serverless
- [EMS] Create a minimal document for root directory
- Error Loading US Zip Codes GeoJSON file to index HOT 4
- Update ZCTAs to 2020 data
- Fix the content-type for the index.html file in the vector catalog
- Washington DC borders as County vs State are different HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ems-file-service.