BlinkTagInc / gtfs-to-geojson

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

Wrong attribute order in "feature" #29

Closed GuiChevis closed 1 month ago

GuiChevis commented 1 month ago

I noticed some geojson decoders (specifically MKGeoJSONDecoder in Swift) require a specific attribute in order to work, and the result I am getting with your code gives me a different order.

The problem I am facing right now is with the order of the attributes "properties" and "geometry" in the "feature" object. This decoder expects "geometry" first, but the code generates it reversed.

GuiChevis commented 1 month ago

Here is my config.json file

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

Hi - did you figure out a workaround for this issue?

GuiChevis commented 1 month ago

Hey, thanks for the response, I figured it wasn't actually the order that was messing things up in my code!