prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Cannot handle CRS w/o EPSG
  ```
  Checking for existing output  [####################################]  100%
  Saving command configuration to /opt/data/rv_root/chip/xview-object_detection/command-config.json...
  Saving command configuration to /opt/data/rv_root/train/xview-object-detection-mobilenet/command-config.json...
  Saving command configuration to /opt/data/rv_root/bundle/xview-object-detection-mobilenet/command-config.json...
  Saving command configuration to /opt/data/rv_root/predict/xview-object-detection-mobilenet/command-config.json...
  Saving command configuration to /opt/data/rv_root/eval/xview-object-detection-mobilenet/command-config.json...
  python -m rastervision  run_command /opt/data/rv_root/chip/xview-object_detection/command-config.json
  Making training chips...
  2019-03-20 16:00:47:rastervision.utils.files: INFO - Downloading s3://azavea-nyc-ml/cogs/000227.tif to /tmp/tmp98w0p7cl/tmpypmuuz6t/tmpqbscq03c/s3/azavea-nyc-ml/cogs/000227.tif
  Traceback (most recent call last):
    File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
      "__main__", mod_spec)
    File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/opt/src/rastervision/__main__.py", line 17, in <module>
      rv.main()
    File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
      return self.main(*args, **kwargs)
    File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
      rv = self.invoke(ctx)
    File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
      return ctx.invoke(self.callback, **ctx.params)
    File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
      return callback(*args, **kwargs)
    File "/opt/src/rastervision/cli/main.py", line 253, in run_command
      rv.runner.CommandRunner.run(command_config_uri)
    File "/opt/src/rastervision/runner/command_runner.py", line 11, in run
      CommandRunner.run_from_proto(msg)
    File "/opt/src/rastervision/runner/command_runner.py", line 17, in run_from_proto
      command.run()
    File "/opt/src/rastervision/command/chip_command.py", line 22, in run
      map(lambda s: s.create_scene(cc.task, tmp_dir), cc.train_scenes))
    File "/opt/src/rastervision/command/chip_command.py", line 22, in <lambda>
      map(lambda s: s.create_scene(cc.task, tmp_dir), cc.train_scenes))
    File "/opt/src/rastervision/data/scene_config.py", line 36, in create_scene
      raster_source = self.raster_source.create_source(tmp_dir)
    File "/opt/src/rastervision/data/raster_source/geotiff_source_config.py", line 70, in create_source
      y_shift_meters=y_shift_meters)
    File "/opt/src/rastervision/data/raster_source/geotiff_source.py", line 46, in __init__
      super().__init__(raster_transformers, temp_dir, channel_order)
    File "/opt/src/rastervision/data/raster_source/rasterio_source.py", line 47, in __init__
      with self.activate():
    File "/opt/src/rastervision/data/activate_mixin.py", line 21, in __enter__
      self.activate()
    File "/opt/src/rastervision/data/activate_mixin.py", line 54, in do_activate
      self._activate()
    File "/opt/src/rastervision/data/raster_source/geotiff_source.py", line 104, in _activate
      super()._activate()
    File "/opt/src/rastervision/data/raster_source/rasterio_source.py", line 106, in _activate
      self._set_crs_transformer()
    File "/opt/src/rastervision/data/raster_source/geotiff_source.py", line 56, in _set_crs_transformer
      self.image_dataset)
    File "/opt/src/rastervision/data/crs_transformer/rasterio_crs_transformer.py", line 59, in from_dataset
      image_crs = dataset.crs['init']
    File "/usr/lib/python3.5/collections/__init__.py", line 986, in __getitem__
      raise KeyError(key)
  KeyError: 'init'
  /tmp/tmpkon0yhf2/tmpyysq6a82/Makefile:6: recipe for target '0' failed
  make: *** [0] Error 1
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `rastervision/data/crs_transformer/rasterio_crs_transformer.py`
  Content:
  ```
  1 import pyproj
  2 
  3 from rasterio.transform import (rowcol, xy)
  4 
  5 from rastervision.data.crs_transformer import (CRSTransformer,
  6                                                IdentityCRSTransformer)
  7 
  8 
  9 class RasterioCRSTransformer(CRSTransformer):
  10     """Transformer for a RasterioRasterSource."""
  11 
  12     def __init__(self, transform, image_crs, map_crs='epsg:4326'):
  13         """Construct transformer.
  14 
  15         Args:
  16             image_dataset: Rasterio DatasetReader
  17             map_crs: CRS code
  18         """
  19         self.map_proj = pyproj.Proj(init=map_crs)
  20         self.image_proj = pyproj.Proj(init=image_crs)
  21 
  22         super().__init__(image_crs, map_crs, transform)
  23 
  24     def map_to_pixel(self, map_point):
  25         """Transform point from map to pixel-based coordinates.
  26 
  27         Args:
  28             map_point: (x, y) tuple in map coordinates
  29 
  30         Returns:
  31             (x, y) tuple in pixel coordinates
  32         """
  33         image_point = pyproj.transform(self.map_proj, self.image_proj,
  34                                        map_point[0], map_point[1])
  35         pixel_point = rowcol(self.transform, image_point[0], image_point[1])
  36         pixel_point = (pixel_point[1], pixel_point[0])
  37         return pixel_point
  38 
  39     def pixel_to_map(self, pixel_point):
  40         """Transform point from pixel to map-based coordinates.
  41 
  42         Args:
  43             pixel_point: (x, y) tuple in pixel coordinates
  44 
  45         Returns:
  46             (x, y) tuple in map coordinates
  47         """
  48         image_point = xy(self.transform, int(pixel_point[1]),
  49                          int(pixel_point[0]))
  50         map_point = pyproj.transform(self.image_proj, self.map_proj,
  51                                      image_point[0], image_point[1])
  52         return map_point
  53 
  54     @classmethod
  55     def from_dataset(cls, dataset, map_crs='epsg:4326'):
  56         if dataset.crs is None:
  57             return IdentityCRSTransformer()
  58         transform = dataset.transform
  59         image_crs = dataset.crs['init']
  60         return cls(transform, image_crs, map_crs)
  61 
  62     def get_affine_transform(self):
  63         return self.transform
  64
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/rastervision/data/crs_transformer/rasterio_crs_transformer.py b/rastervision/data/crs_transformer/rasterio_crs_transformer.py
  --- a/rastervision/data/crs_transformer/rasterio_crs_transformer.py
  +++ b/rastervision/data/crs_transformer/rasterio_crs_transformer.py
  @@ -17,7 +17,7 @@
               map_crs: CRS code
           """
           self.map_proj = pyproj.Proj(init=map_crs)
  -        self.image_proj = pyproj.Proj(init=image_crs)
  +        self.image_proj = pyproj.Proj(image_crs)
   
           super().__init__(image_crs, map_crs, transform)
   
  @@ -56,7 +56,7 @@
           if dataset.crs is None:
               return IdentityCRSTransformer()
           transform = dataset.transform
  -        image_crs = dataset.crs['init']
  +        image_crs = dataset.crs
           return cls(transform, image_crs, map_crs)
   
       def get_affine_transform(self):
  
verification_info: {"golden_diff": "diff --git a/rastervision/data/crs_transformer/rasterio_crs_transformer.py b/rastervision/data/crs_transformer/rasterio_crs_transformer.py\n--- a/rastervision/data/crs_transformer/rasterio_crs_transformer.py\n+++ b/rastervision/data/crs_transformer/rasterio_crs_transformer.py\n@@ -17,7 +17,7 @@\n             map_crs: CRS code\n         \"\"\"\n         self.map_proj = pyproj.Proj(init=map_crs)\n-        self.image_proj = pyproj.Proj(init=image_crs)\n+        self.image_proj = pyproj.Proj(image_crs)\n \n         super().__init__(image_crs, map_crs, transform)\n \n@@ -56,7 +56,7 @@\n         if dataset.crs is None:\n             return IdentityCRSTransformer()\n         transform = dataset.transform\n-        image_crs = dataset.crs['init']\n+        image_crs = dataset.crs\n         return cls(transform, image_crs, map_crs)\n \n     def get_affine_transform(self):\n", "issue": "Cannot handle CRS w/o EPSG\n```\r\nChecking for existing output  [####################################]  100%\r\nSaving command configuration to /opt/data/rv_root/chip/xview-object_detection/command-config.json...\r\nSaving command configuration to /opt/data/rv_root/train/xview-object-detection-mobilenet/command-config.json...\r\nSaving command configuration to /opt/data/rv_root/bundle/xview-object-detection-mobilenet/command-config.json...\r\nSaving command configuration to /opt/data/rv_root/predict/xview-object-detection-mobilenet/command-config.json...\r\nSaving command configuration to /opt/data/rv_root/eval/xview-object-detection-mobilenet/command-config.json...\r\npython -m rastervision  run_command /opt/data/rv_root/chip/xview-object_detection/command-config.json\r\nMaking training chips...\r\n2019-03-20 16:00:47:rastervision.utils.files: INFO - Downloading s3://azavea-nyc-ml/cogs/000227.tif to /tmp/tmp98w0p7cl/tmpypmuuz6t/tmpqbscq03c/s3/azavea-nyc-ml/cogs/000227.tif\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.5/runpy.py\", line 184, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/usr/lib/python3.5/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/opt/src/rastervision/__main__.py\", line 17, in <module>\r\n    rv.main()\r\n  File \"/usr/local/lib/python3.5/dist-packages/click/core.py\", line 722, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.5/dist-packages/click/core.py\", line 697, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/usr/local/lib/python3.5/dist-packages/click/core.py\", line 1066, in invoke\r\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n  File \"/usr/local/lib/python3.5/dist-packages/click/core.py\", line 895, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/usr/local/lib/python3.5/dist-packages/click/core.py\", line 535, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/opt/src/rastervision/cli/main.py\", line 253, in run_command\r\n    rv.runner.CommandRunner.run(command_config_uri)\r\n  File \"/opt/src/rastervision/runner/command_runner.py\", line 11, in run\r\n    CommandRunner.run_from_proto(msg)\r\n  File \"/opt/src/rastervision/runner/command_runner.py\", line 17, in run_from_proto\r\n    command.run()\r\n  File \"/opt/src/rastervision/command/chip_command.py\", line 22, in run\r\n    map(lambda s: s.create_scene(cc.task, tmp_dir), cc.train_scenes))\r\n  File \"/opt/src/rastervision/command/chip_command.py\", line 22, in <lambda>\r\n    map(lambda s: s.create_scene(cc.task, tmp_dir), cc.train_scenes))\r\n  File \"/opt/src/rastervision/data/scene_config.py\", line 36, in create_scene\r\n    raster_source = self.raster_source.create_source(tmp_dir)\r\n  File \"/opt/src/rastervision/data/raster_source/geotiff_source_config.py\", line 70, in create_source\r\n    y_shift_meters=y_shift_meters)\r\n  File \"/opt/src/rastervision/data/raster_source/geotiff_source.py\", line 46, in __init__\r\n    super().__init__(raster_transformers, temp_dir, channel_order)\r\n  File \"/opt/src/rastervision/data/raster_source/rasterio_source.py\", line 47, in __init__\r\n    with self.activate():\r\n  File \"/opt/src/rastervision/data/activate_mixin.py\", line 21, in __enter__\r\n    self.activate()\r\n  File \"/opt/src/rastervision/data/activate_mixin.py\", line 54, in do_activate\r\n    self._activate()\r\n  File \"/opt/src/rastervision/data/raster_source/geotiff_source.py\", line 104, in _activate\r\n    super()._activate()\r\n  File \"/opt/src/rastervision/data/raster_source/rasterio_source.py\", line 106, in _activate\r\n    self._set_crs_transformer()\r\n  File \"/opt/src/rastervision/data/raster_source/geotiff_source.py\", line 56, in _set_crs_transformer\r\n    self.image_dataset)\r\n  File \"/opt/src/rastervision/data/crs_transformer/rasterio_crs_transformer.py\", line 59, in from_dataset\r\n    image_crs = dataset.crs['init']\r\n  File \"/usr/lib/python3.5/collections/__init__.py\", line 986, in __getitem__\r\n    raise KeyError(key)\r\nKeyError: 'init'\r\n/tmp/tmpkon0yhf2/tmpyysq6a82/Makefile:6: recipe for target '0' failed\r\nmake: *** [0] Error 1\r\n```\n", "before_files": [{"content": "import pyproj\n\nfrom rasterio.transform import (rowcol, xy)\n\nfrom rastervision.data.crs_transformer import (CRSTransformer,\n                                               IdentityCRSTransformer)\n\n\nclass RasterioCRSTransformer(CRSTransformer):\n    \"\"\"Transformer for a RasterioRasterSource.\"\"\"\n\n    def __init__(self, transform, image_crs, map_crs='epsg:4326'):\n        \"\"\"Construct transformer.\n\n        Args:\n            image_dataset: Rasterio DatasetReader\n            map_crs: CRS code\n        \"\"\"\n        self.map_proj = pyproj.Proj(init=map_crs)\n        self.image_proj = pyproj.Proj(init=image_crs)\n\n        super().__init__(image_crs, map_crs, transform)\n\n    def map_to_pixel(self, map_point):\n        \"\"\"Transform point from map to pixel-based coordinates.\n\n        Args:\n            map_point: (x, y) tuple in map coordinates\n\n        Returns:\n            (x, y) tuple in pixel coordinates\n        \"\"\"\n        image_point = pyproj.transform(self.map_proj, self.image_proj,\n                                       map_point[0], map_point[1])\n        pixel_point = rowcol(self.transform, image_point[0], image_point[1])\n        pixel_point = (pixel_point[1], pixel_point[0])\n        return pixel_point\n\n    def pixel_to_map(self, pixel_point):\n        \"\"\"Transform point from pixel to map-based coordinates.\n\n        Args:\n            pixel_point: (x, y) tuple in pixel coordinates\n\n        Returns:\n            (x, y) tuple in map coordinates\n        \"\"\"\n        image_point = xy(self.transform, int(pixel_point[1]),\n                         int(pixel_point[0]))\n        map_point = pyproj.transform(self.image_proj, self.map_proj,\n                                     image_point[0], image_point[1])\n        return map_point\n\n    @classmethod\n    def from_dataset(cls, dataset, map_crs='epsg:4326'):\n        if dataset.crs is None:\n            return IdentityCRSTransformer()\n        transform = dataset.transform\n        image_crs = dataset.crs['init']\n        return cls(transform, image_crs, map_crs)\n\n    def get_affine_transform(self):\n        return self.transform\n", "path": "rastervision/data/crs_transformer/rasterio_crs_transformer.py"}], "after_files": [{"content": "import pyproj\n\nfrom rasterio.transform import (rowcol, xy)\n\nfrom rastervision.data.crs_transformer import (CRSTransformer,\n                                               IdentityCRSTransformer)\n\n\nclass RasterioCRSTransformer(CRSTransformer):\n    \"\"\"Transformer for a RasterioRasterSource.\"\"\"\n\n    def __init__(self, transform, image_crs, map_crs='epsg:4326'):\n        \"\"\"Construct transformer.\n\n        Args:\n            image_dataset: Rasterio DatasetReader\n            map_crs: CRS code\n        \"\"\"\n        self.map_proj = pyproj.Proj(init=map_crs)\n        self.image_proj = pyproj.Proj(image_crs)\n\n        super().__init__(image_crs, map_crs, transform)\n\n    def map_to_pixel(self, map_point):\n        \"\"\"Transform point from map to pixel-based coordinates.\n\n        Args:\n            map_point: (x, y) tuple in map coordinates\n\n        Returns:\n            (x, y) tuple in pixel coordinates\n        \"\"\"\n        image_point = pyproj.transform(self.map_proj, self.image_proj,\n                                       map_point[0], map_point[1])\n        pixel_point = rowcol(self.transform, image_point[0], image_point[1])\n        pixel_point = (pixel_point[1], pixel_point[0])\n        return pixel_point\n\n    def pixel_to_map(self, pixel_point):\n        \"\"\"Transform point from pixel to map-based coordinates.\n\n        Args:\n            pixel_point: (x, y) tuple in pixel coordinates\n\n        Returns:\n            (x, y) tuple in map coordinates\n        \"\"\"\n        image_point = xy(self.transform, int(pixel_point[1]),\n                         int(pixel_point[0]))\n        map_point = pyproj.transform(self.image_proj, self.map_proj,\n                                     image_point[0], image_point[1])\n        return map_point\n\n    @classmethod\n    def from_dataset(cls, dataset, map_crs='epsg:4326'):\n        if dataset.crs is None:\n            return IdentityCRSTransformer()\n        transform = dataset.transform\n        image_crs = dataset.crs\n        return cls(transform, image_crs, map_crs)\n\n    def get_affine_transform(self):\n        return self.transform\n", "path": "rastervision/data/crs_transformer/rasterio_crs_transformer.py"}]}