<commit_before>geom2gtfs
=========

[geom2gtfs](https://github.com/conveyal/geom2gtfs) is a command line tool that converts each feature in a shapefile into a route in a GTFS file.

Setup
-----

To get started, install the [latest JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and [Gradle](http://www.gradle.org/). Then:

```console
git clone https://github.com/conveyal/geom2gtfs
cd geom2gtfs
gradle fatJar
java -jar build/libs/geom2gtfs.jar <shapefile_filename> <config_filename> <output_filename>
```

Usage
-----

Using the geom2gtfs tool is simple, but it requires a carefully prepared shapefile and configuration file.

The input shapefile must contain only lines, with no multigeometry features. If the features in the shapefile have properties, such as “route” or “mode” or “speed” those properties can be used to modulate the speed of the routes written to the GTFS. It’s possible to use multiple lines to represent the same route if they share a route id property (the name of the property is defined in the config file) and sequential lines run in the same direction and have successive “segment” properties. It’s possible to join a CSV to the shapefile using the geom2gtfs config file, which is how we associated service frequencies with lines. The CSV of service frequencies from King County was compiled using the King County spreadsheet, and looks like this:<commit_msg>fatJar to shadowJar<commit_after>geom2gtfs
=========

[geom2gtfs](https://github.com/conveyal/geom2gtfs) is a command line tool that converts each feature in a shapefile into a route in a GTFS file.

Setup
-----

To get started, install the [latest JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and [Gradle](http://www.gradle.org/). Then:

```console
git clone https://github.com/conveyal/geom2gtfs
cd geom2gtfs
gradle shadowJar
java -jar build/libs/geom2gtfs-all.jar <shapefile_filename> <config_filename> <output_filename>
```

Usage
-----

Using the geom2gtfs tool is simple, but it requires a carefully prepared shapefile and configuration file.

The input shapefile must contain only lines, with no multigeometry features. If the features in the shapefile have properties, such as “route” or “mode” or “speed” those properties can be used to modulate the speed of the routes written to the GTFS. It’s possible to use multiple lines to represent the same route if they share a route id property (the name of the property is defined in the config file) and sequential lines run in the same direction and have successive “segment” properties. It’s possible to join a CSV to the shapefile using the geom2gtfs config file, which is how we associated service frequencies with lines. The CSV of service frequencies from King County was compiled using the King County spreadsheet, and looks like this:
{'fraction_non_alphanumeric': 0.075079309129362, 'fraction_numerical': 0.005639760310186817, 'mean_word_length': 4.744939271255061, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5667989', 'n_tokens_mistral': 818, 'n_tokens_neox': 756, 'n_words': 379}