Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NTT is a brand, but what should we do by region? #6235

Closed
blendy-map opened this issue Feb 28, 2022 · 8 comments
Closed

NTT is a brand, but what should we do by region? #6235

blendy-map opened this issue Feb 28, 2022 · 8 comments

Comments

@blendy-map
Copy link
Contributor

Hello.
Thank you for editing "operators/amenity/telephone.json".

After editing, I suddenly thought, "Isn't NTT (nippontelegraphandtelephone-8c2f5b) a brand managed by NTT East (nippontelegraphandtelephoneeest-8c2f5b) and NTT West (nippontelegraphandtelephonewest-8c2f5b)?"

It is said that in 1999, NTT's business was reorganized into a holding company structure and the business was transferred to wholly owned subsidiaries by region (NTT East Japan, NTT West Japan).

Therefore, it is necessary to rewrite the NTT item according to "brands/amenity/telephone.json" and separate the include of NTT East and NTT West.

I'm wondering if I should use GEOJSON for each prefecture when splitting the include statement, or GEOJSON for the jurisdiction of NTT East and NTT West.

prefecture-split pattern

    {
      "displayName": "NTT東日本",
      "id": "nippontelegraphandtelephoneeest-8c2f5b",
      "locationSet": {"include": ["jp-tokyo.json","jp-nagano.json","jp-miyagi.json"]},
      "tags": {
        "amenity": "telephone",
        "operator": "東日本電信電話株式会社",
        "operator:en": "Nippon Telegraph and Telephone Eest",
        "operator:ja": "東日本電信電話株式会社",
        "operator:short": "NTT東日本",
        "operator:wikidata": "Q11527212",
        "operator:wikipedia": "ja:東日本電信電話"
      }
    },

jurisdiction-split pattern

    {
      "displayName": "NTT東日本",
      "id": "nippontelegraphandtelephoneeest-8c2f5b",
      "locationSet": {"include": ["jp-ntt-east.json"]},
      "tags": {
        "amenity": "telephone",
        "operator": "東日本電信電話株式会社",
        "operator:en": "Nippon Telegraph and Telephone Eest",
        "operator:ja": "東日本電信電話株式会社",
        "operator:short": "NTT東日本",
        "operator:wikidata": "Q11527212",
        "operator:wikipedia": "ja:東日本電信電話"
      }
    },

I presented an example like this. (There is a misspelling "s/Eest/East/" in the original, but I will fix it later.)
Please let me know if there is any good way.

@arch0345
Copy link
Collaborator

Either option would be fine. Although creating geojsons for each prefecture would take more work, these could be used for other brands/operators in the index.

@blendy-map
Copy link
Contributor Author

@arch0345 -san

Thank you for your reply.

For the time being, I will make it with jurisdiction-split pattern and make it a prefecture-split pattern again.
(There is a repository where you can see his GEOJSON in each prefecture on GitHub, but I wondered what it was like in terms of license)

By the way, is there any service / software that will convert the prefectural border to his GEOJSON with OSM?

@LaoshuBaby
Copy link
Collaborator

LaoshuBaby commented Mar 2, 2022

convert the prefectural border to his GEOJSON with OSM?

For online tools you can see polygons.openstreetmap.fr, need to give a specify OSM relation id.

For software you can try JOSM, download a relation and modify tag, then save as a geojson, maybe a little trouble when there need a lot of region geojson.

————
And my opinion is create prefecture level geojson file, you can reuse it in JR东日本/JR北海道 and other splited Japanese brand.

@blendy-map
Copy link
Contributor Author

blendy-map commented Mar 3, 2022

@LaoshuBaby -san

Thank you for telling us about polygons.openstreetmap.fr.
However, if you use the GeoJSON generated by get_geojson.py as it is, an error will occur, so let's create a slightly different script to generate GeoJSON.

@LaoshuBaby
Copy link
Collaborator

LaoshuBaby commented Mar 3, 2022

polygon.osmfr

This website haven't down, I just tested. (If needed you can tell me all prefecture's name and osm relation id)

For example this is tokyo (If need you can delete those island)

Other geojson / poly source

let's create a slightly different script to generate GeoJSON.

Emm, maybe we can re-use other famous polygon file created by other osm project? (The license check may need other maintainer to do).

What about those source? (We can use JOSM convert it to geojson)

Organicmap's polygon file

https://github.com/organicmaps/organicmaps/tree/master/data/borders

Total 50 files.

BTW, organicmap's monorepo is too big to clone, if need, just download a single file, I think.

OsmAnd's polygon file

OsmAnd offer 2 kinds of polygon file, metropolis and single prefecture

download.osmfr & geofabrik.de

https://download.openstreetmap.fr/polygons/asia/japan/
http://download.geofabrik.de/asia/japan/

@blendy-map
Copy link
Contributor Author

blendy-map commented Mar 3, 2022

polygon.osmfr can be seen normally in this environment as well.

The problem is that when I npm the GeoJSON file generated by get_geojson.py, I get a validation error.

$ npm run build:features 

> name-suggestion-index@6.0.20220228 build:features
> node scripts/build_features.js

----------------------------------------------------------------------
🧩  Build features
----------------------------------------------------------------------

🏗   Building features...
Error - Schema validation:
  features/jp/tokyo.geojson: 
  instance does not match allOf schema <http://json.schemastore.org/geojson.json#/definitions/feature> with 2 error[s]:
  instance requires property "geometry"
  instance.type is not one of enum values: Feature

My explanation was inadequate.

@arch0345
Copy link
Collaborator

arch0345 commented Mar 4, 2022

NSI only supports a single geojson Feature (or a FeatureCollection containing a single Feature) and either Polygon or MultiPolygon geometries. I recommend drawing these by hand instead with geojson.io using the polygon tool as suggested in the wiki article linked above as we try to use as few points as possible, see #4784 (comment). It looks like other geojsons use less than 100 points.

@blendy-map
Copy link
Contributor Author

blendy-map commented Mar 4, 2022

It looks like other geojsons use less than 100 points.

Is it the number per polygon? Or is it the number per file?

I tend to ask for the accuracy of the prefectural border, so I feel that 100 points is not enough.

try not to include/exclude too many things in a locationSet

I read #4784.
In the case of NTT East, there are 17 prefectures, and in the case of NTT West, there are the remaining 30 prefectures.
(I don't know if this is more or less.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants