nakijun / tilers-tools

Automatically exported from code.google.com/p/tilers-tools
1 stars 0 forks source link

TypeError in Transformer_TransformPoints #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. python gdal_tiler.py --tps -q -r -s -p xyz 11325_3.KAP

What is the expected output? What do you see instead?

error: solve(): solution not found

There is a problem to invert the interpolation matrix
Traceback (most recent call last):
  File "/arquivos/maps/tilers_tools/gdal_tiler.py", line 184, in <module>
    main(sys.argv)
  File "/arquivos/maps/tilers_tools/gdal_tiler.py", line 176, in main
    res = parallel_map(preprocess_src, sources)
  File "/arquivos/maps/tilers_tools/tiler_functions.py", line 97, in parallel_map
    return map(func, iterable)
  File "/arquivos/maps/tilers_tools/gdal_tiler.py", line 45, in preprocess_src
    res = map2gdal.process_src(src, no_error=True, opt=opt)
  File "/arquivos/maps/tilers_tools/map2gdal.py", line 63, in process_src
    res = [(layer.convert(), True) for layer in cls(src,options=opt).get_layers()]
  File "/arquivos/maps/tilers_tools/reader_backend.py", line 282, in convert
    poly,gmt_data=self.cut_poly(dst_ds)
  File "/arquivos/maps/tilers_tools/reader_backend.py", line 320, in cut_poly
    pix_lst=plys.pix_coords(dst_ds)
  File "/arquivos/maps/tilers_tools/reader_backend.py", line 122, in pix_coords
    p_pix=pix_tr.transform(p_dst,inv=True)
  File "/arquivos/maps/tilers_tools/tiler_functions.py", line 296, in transform
    transformed, ok = self.TransformPoints(inv, points)
  File "/usr/lib/python2.7/dist-packages/osgeo/gdal.py", line 1571, in TransformPoints
    return _gdal.Transformer_TransformPoints(self, *args)
TypeError: in method 'Transformer_TransformPoints', argument 1 of type 
'GDALTransformerInfoShadow *'

Please provide any additional information below.

I was thinking that it was a problem in gdal itself but when testing the same 
file with this I can see the rendered tiles:

gdal_translate -of vrt -expand rgba 11325_3.KAP temp.vrt
gdal2tiles.py temp.vrt

Since they are using the same libs, I guess that the problem is in 

Original issue reported on code.google.com by nao...@gmail.com on 22 Jul 2014 at 1:44

Attachments:

GoogleCodeExporter commented 9 years ago
* is in tiler-tools

Original comment by nao...@gmail.com on 22 Jul 2014 at 1:45

GoogleCodeExporter commented 9 years ago
You should try it without "--tps".

I believe gdal2tiles.py doesn't use it either. 

Original comment by vadp.d...@gmail.com on 24 Jul 2014 at 9:18

GoogleCodeExporter commented 9 years ago
There is an error in the source data.

Original comment by vadp.d...@gmail.com on 24 Jul 2014 at 9:28

GoogleCodeExporter commented 9 years ago
Right.
Can't it automatically fallback to no "--tps" if it fails?

The problem is that I am batch processing a lot of files and I don't know when 
I need or when I don't need to use "--tps".

Maybe there could be an option to specify the order that we would like to try: 
"--someoption tps,nontps" (ie, try tps first; if it fails, automatically 
fallback to non-tps)

Original comment by nao...@gmail.com on 24 Jul 2014 at 12:24

GoogleCodeExporter commented 9 years ago
Perhaps you would not need '--tps' at all, would you?

Geotransform should be quite fine for BSB rasters.

Original comment by vadp.d...@gmail.com on 1 Aug 2014 at 10:24