Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to generate graph if the image is not from SpaceNet #15

Closed
moopene36607 opened this issue Jun 3, 2020 · 1 comment
Closed

Unable to generate graph if the image is not from SpaceNet #15

moopene36607 opened this issue Jun 3, 2020 · 1 comment

Comments

@moopene36607
Copy link

If I use my own .tif image, it's fine during step 2~4 but failed to generate graph in step 5.
Guess there exists some dependencies about SpaceNet dataset.
Is there any simple way to walk around that?

python 05_wkt_to_G.py /opt/cresi/cresi/configs/sn5_baseline.json

ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed.
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/opt/conda/envs/cresi/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/opt/conda/envs/cresi/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "05_wkt_to_G.py", line 354, in pixelToGeoCoord
    geom.Transform(coord_trans)
  File "/opt/conda/envs/cresi/lib/python3.6/site-packages/osgeo/ogr.py", line 7371, in Transform
    return _ogr.Geometry_Transform(self, *args)
TypeError: in method 'Geometry_Transform', argument 2 of type 'OSRCoordinateTransformationShadow *'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "05_wkt_to_G.py", line 1283, in <module>
    main()
  File "05_wkt_to_G.py", line 1274, in main
    wkt_to_G(params[0])
  File "05_wkt_to_G.py", line 887, in wkt_to_G
    verbose=verbose)
  File "05_wkt_to_G.py", line 439, in get_node_geo_coords
    coords_dict_list = pool.map(pixelToGeoCoord, params)
  File "/opt/conda/envs/cresi/lib/python3.6/multiprocessing/pool.py", line 266, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/opt/conda/envs/cresi/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
TypeError: in method 'Geometry_Transform', argument 2 of type 'OSRCoordinateTransformationShadow *'
@moopene36607
Copy link
Author

The input most be a raster image.
I should use rasterio to transform my image into a raster.
https://rasterio.readthedocs.io/en/latest/quickstart.html#saving-raster-data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant