BlinkTagInc / gtfs-to-geojson

Generate geoJSON of transit route data from a GTFS file.
MIT License
114 stars 23 forks source link

No MultiLineString support #30

Closed GuiChevis closed 1 month ago

GuiChevis commented 1 month ago

All lines I get in the geojson file are "LineString", some parsers and libraries like MKGeoJSON from MapKit in Swift can render multiple lines (MultiLineString) at once if the geojson contains this type of feature.

brendannee commented 1 month ago

Great idea.

I updated the library so when you export "lines" or "lines-and-stops" is uses MultiLineString for each route line. Check out this release and let me know what you think. https://github.com/BlinkTagInc/gtfs-to-geojson/releases/tag/3.7.6

GuiChevis commented 1 month ago

Thank you for the quick response! I don't know if I am doing something wrong, but I am not getting MultiLineStrings with the following config:

{
  "agencies": [
    {
      "agency_key": "SPTRANS",
      "url": "https://www.sptrans.com.br/umbraco/Surface/PerfilDesenvolvedor/BaixarGTFS"
    }
  ],
  "bufferSizeMeters": 400,
  "coordinatePrecision": 6,
  "outputType": "agency",
  "outputFormat": "lines-and-stops",
  "startDate": "20240301",
  "endDate": "20240331",
  "verbose": true,
  "zipOutput": false
}
brendannee commented 1 month ago

Make sure you update your version of gtfs-to-GeoJSON to the latest version 3.7.6

GuiChevis commented 1 month ago

Thank you, got it to work!