question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GeoJSON for states

See original GitHub issue

This is a poor-man’s extension to https://github.com/ideditor/country-coder/issues/19. (Related: https://github.com/ideditor/country-coder/issues/26) Is it worthwhile to make simple GeoJSON shapes that “loose fit” states?

They would be useful for locationSet.include, but not really for exclude. I’m imagining something like

    {
      "displayName": "Some Regional Bus System",
      "locationSet": {
        "include": [
          "us-wa.lenient.geojson",
          "us-or.lenient.geojson",
          "us-id.lenient.geojson"
         ]
      },
      "tags": {
        "network": "Some Regional Bus System",
        "route": "bus"
      }
    },

It’d be really helpful, I imagine, for doing state police. Also, the country-code (text) search in NSI.guide would start working for locations tagged that way.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:23 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
bhouselcommented, Jan 9, 2021

Is there any performance gain / lose by including two or three single gps points as a location set, and letting locationConflation build an area from that? For example: 3-point radius … or would a “.geojson” still be preferable?

That’s very clever! I think a .geojson is still slightly preferable, just because it’s more clear what it is doing, but they’d both be fast approaches.

I did improve the performance of the unioning recently, and took this comparison screenshot: https://github.com/ideditor/location-conflation/issues/26#issuecomment-752344607 Basically, the biggest hit to performance is unioning a lot of things. (so, those locationSets where someone added like 20 countries to it). But even with that it performs well enough.

I’ve been adding this to iD the past few days, and it resolves them all in a few seconds. This means that for the first few seconds that iD starts up, a user won’t have these presets available yet.

In practice it’s surprisingly fast… The first time I tried it, I was planning to pay close attention to how long the task took. But iD showed me the “you have unsaved changes do you want to restore them” dialog box, and by the time I clicked “no” the background task had already completed! 😆

3reactions
jdcarls2commented, Oct 4, 2021

I just ran into this when elaborating on a brand (Pinnacle Bank), and finding that there were in fact 2 bank brands in the US using this name, but in separate regions. Each bank’s website helpfully displays a map of the states that they serve, and this seemed like a great way to differentiate the locations.

Reading back through this issue, I have considerable QGIS experience with things like topological editing. The few state geojson files I have added were individually simplified features, but it wouldn’t be too much work to generate a file per state (or province, etc) with properly aligned features between each.

If there’s real interest in having these sorts of features, I could add them to my pull request sometime this week probably. (Or would it be a separate pull request or something? Apologies, it’s the first pull request I’ve done ever, and I’m still getting the hang of how Git works.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

GeoJSON and KML data for the United States - Eric Celeste
GeoJSON and KML data for the United States. I had a devil of a time finding simple GeoJSON and KML boundary files for...
Read more >
MappingAPI/us-states.json at master - GitHub
MappingAPI/data/geojson/us-states.json. Go to file · Go to file T; Go to line L; Copy path; Copy permalink. This commit does not belong to...
Read more >
USA states GeoJson | Kaggle
This file is a GeoJson encoding of Usa states. I use this file to create visualisation of data per USA state in a...
Read more >
Source for GeoJSON data for the US - GIS Stack Exchange
After trying to find similar GeoJSON versions of US State and County boundaries, I finally decided to roll my own from the United...
Read more >
How/Where do I get geoJSON data for states, provinces, and ...
I need geoJSON formatted paths for states, provinces, and regions within multiple countries. Most readily available geoJSON data is for US ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found