a-b-street / abstreet

Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit
https://a-b-street.github.io/docs/
Apache License 2.0
7.37k stars 332 forks source link

Add Brest, FR #1098

Closed XioNoX closed 10 months ago

XioNoX commented 10 months ago

With public transportations (for the whole metro area).

If needed the import logs are on https://gist.github.com/XioNoX/a4b285eb34634d3c7da1c94dfc8b84c0 I see lots of warning and errors happy to fix (some of) them if I know how.

I named the file "city" as the Brest metro area includes adjacent cities. If I add those later on then it probably makes sens to name them data/system/fr/brest/

I'm also interested in how I can add elevation data as the city is quite hilly.

Thanks! Starting to get familiar with your tool, it's awesome.

dabreegster commented 10 months ago

Hi, and thanks for the PR! It's awesome to see a new map with GTFS support.

I can finish the import and upload to the A/B Street S3 bucket like other maps, but I wanted to first shrink the geojson file. Since everything's in one git repo, ideally we can shrink much more than 190KB. I used mapshaper.org simplify tools and got it down to about 3KB, but the coastline is trimmed a bit: https://gist.github.com/dabreegster/d938c80d296160c00e4e13c7a2f5d91c. We could also try convex hull or just manually draw something around the original relation multipolygon you extracted. The boundaries don't need to exactly clip to any official boundary; it all depends on the area you want to study and having sufficient buffer around it. What would you prefer to do here?

I see lots of warning and errors happy to fix (some of) them if I know how.

Those all look normal to me; the warnings are probably too noisy at this point.

I'm also interested in how I can add elevation data as the city is quite hilly.

You'd need to find a DEM source and add it to https://github.com/eldang/elevation_lookups. That handles a bunch of different input formats, so hopefully the hard part is just finding the data. After rebuilding the Docker image, we'd then update importer/src/map_config.rs where it sets elevation

XioNoX commented 10 months ago

Thanks for your quick reply!

I think this works fine as well. I guess we can fine tune it in the future if this approximation becomes problematic?

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "coordinates": [
          [
            [
              -4.549977266245776,
              48.35112096321657
            ],
            [
              -4.42146691507142,
              48.38290771778398
            ],
            [
              -4.464560402357165,
              48.43512568316484
            ],
            [
              -4.501832529976298,
              48.43594391060566
            ],
            [
              -4.523346221286147,
              48.41048177327892
            ],
            [
              -4.568566082000757,
              48.38855593346918
            ],
            [
              -4.549977266245776,
              48.35112096321657
            ]
          ]
        ],
        "type": "Polygon"
      }
    }
  ]
}

For the elevation data, I might be able to get them from the city but I need to email them (https://geo.brest-metropole.fr/portal/home/item.html?id=d041b7c624894f54b812af17d8dfb737) Seems like this blogpost have other options (of different quality) too (in French): https://christophe-lebas.medium.com/o%C3%B9-trouver-des-heightmaps-des-mnt-et-des-donn%C3%A9es-lidar-pour-faire-des-cartes-3d-9dbc4b2f2944

dabreegster commented 10 months ago

Yep, we can always adjust the polygon. The smaller one looks great to me! And sounds good about the elevation sources, let me know if you hit any troubles.

I can't push a commit to the branch of this PR, so instead I'll merge this one and immediately push another commit on main with the uploaded data and smaller polygon. After that, if you pull from main and rebuild, it should show up as a downloadable city in the big list on the left. Thanks again for the PR! I'll try and get to the other issues ASAP, please do keep reporting anything you find broken or ideas you have for improvements

XioNoX commented 10 months ago

Awesome, thanks, I opened https://github.com/eldang/elevation_lookups/issues/32 for the elevation data.