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

我在centos7.3上转换 提示坐标转换失败 #219

Closed
andy-cd-g opened this issue Mar 4, 2022 · 16 comments
Closed

我在centos7.3上转换 提示坐标转换失败 #219

andy-cd-g opened this issue Mar 4, 2022 · 16 comments
Labels
linux build/run on linux

Comments

@andy-cd-g
Copy link

andy-cd-g commented Mar 4, 2022

epsg convert failed!

只有坐标转换失败,文件是转换成功了的 osgb转3dtiles

@fanvanzh
Copy link
Owner

fanvanzh commented Mar 4, 2022

那可能加载到球上位置不对,你可以手动把 metadata.xml 里的坐标改成经纬度坐标

@andy-cd-g
Copy link
Author

epsg convert failed! 这个是你打印的错误提示 不应该是 我那配置不对吗 windows下可以的 linux不行

@liwei0705
Copy link

确实有这个错误。Ubuntu18.04
./target/release/_3dtile --format osgb --input /mnt/d/workspace/osgbdata/KLN --output ./threedtiles222/

ERROR: 2022-11-30 06:27:38 - epsg convert failed!
INFO: 2022-11-30 06:28:01 - task over, cost 23.35 s.

应该是这段代码,osgb::epsg_convert返回false

                                unsafe {
                                    use std::ffi::CString;
                                    let c_str = CString::new(gdal_data).unwrap();
                                    let ptr = c_str.as_ptr();
                                    if osgb::epsg_convert(srs, pt.as_mut_ptr(), ptr) {
                                        center_x = pt[0];
                                        center_y = pt[1];
                                        info!("epsg: x->{}, y->{}", pt[0], pt[1]);
                                    } else {
                                        error!("epsg convert failed!");
                                    }
                                }

@fanvanzh
Copy link
Owner

fanvanzh commented Dec 7, 2022

应该是 linux 分支的代码, 屏蔽了 GDAL transform 的代码, 因为没配置 GDAL 依赖库

@liwei0705
Copy link

我在ubuntu18.04上

sudo add-apt-repository -y ppa:ubuntugis/ppa
sudo apt update
sudo apt upgrade
apt install gdal-bin python-gdal python3-gdal libgdal-dev

$ gdalinfo --version
GDAL 2.4.2, released 2019/06/28

是否可以?

@fanvanzh
Copy link
Owner

fanvanzh commented Dec 8, 2022

应该可以, 你把代码里 宏开关去了

@liwei0705
Copy link

linxu分支里的DIFF不少...没找到要打开哪个开关...方便指点一下吗

@fanvanzh
Copy link
Owner

fanvanzh commented Dec 9, 2022

#ifdef _WIN32
这个宏包起来的代码,只在 Windows 环境下生效,去掉这个宏,在 linux 也编译通过即可

@liwei0705
Copy link

谢谢,搞定了https://github.com/liwei0705/3dtiles/tree/linux_osg_370

简单memo了一下
https://github.com/liwei0705/3dtiles/blob/linux_osg_370/linux_README.md

@fanvanzh fanvanzh added the linux build/run on linux label Dec 14, 2022
@LYP857
Copy link

LYP857 commented Dec 1, 2023

@liwei0705 大哥你是怎么解决的,我还是报epsg convert failed!
是不是这个问题呢,我tileset.cpp里面宏开关没用吖。我用的是centos7.3
[root@localhost release]# ldd _3dtile
linux-vdso.so.1 => (0x00007fff9afc5000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f82726e0000)
libosg.so.202 => not found
libosgDB.so.202 => not found
libosgUtil.so.202 => not found
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f82724c8000)
librt.so.1 => /lib64/librt.so.1 (0x00007f82722c0000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f82720a4000)
libm.so.6 => /lib64/libm.so.6 (0x00007f8271da1000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f8271b9d000)
libc.so.6 => /lib64/libc.so.6 (0x00007f82717cf000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8272f54000)

@liwei0705
Copy link

liwei0705 commented Dec 4, 2023

我在上面贴了代码分支和readme

DIFF linux_osg_370...liwei0705:3dtiles:linux_osg_370
我提交时换行符可能变化了,无视掉所有空白变更

@liwei0705 大哥你是怎么解决的,我还是报epsg convert failed! 是不是这个问题呢,我tileset.cpp里面宏开关没用吖。我用的是centos7.3 [root@localhost release]# ldd _3dtile linux-vdso.so.1 => (0x00007fff9afc5000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f82726e0000) libosg.so.202 => not found libosgDB.so.202 => not found libosgUtil.so.202 => not found libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f82724c8000) librt.so.1 => /lib64/librt.so.1 (0x00007f82722c0000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f82720a4000) libm.so.6 => /lib64/libm.so.6 (0x00007f8271da1000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f8271b9d000) libc.so.6 => /lib64/libc.so.6 (0x00007f82717cf000) /lib64/ld-linux-x86-64.so.2 (0x00007f8272f54000)

@LYP857
Copy link

LYP857 commented Dec 5, 2023

@liwei0705 大哥你修改完的代码没有在仓库吗,我攒看起来和原作者的一样吖,tileset.cpp这个文件最后是什么样的呢,还有gdal版本有要求嘛?

@LYP857
Copy link

LYP857 commented Dec 5, 2023

@liwei0705 大哥,或者能够给我一个编译后好的嘛,我尝试了多次,ubantu下就是编译不成功,去cenots编译成功但是却坐标错误

@liwei0705
Copy link

@fanvanzh
Copy link
Owner

增加了 linux 版本的编译测试

@IKangXu
Copy link
Contributor

IKangXu commented Jul 10, 2024

@liwei0705
#314
可以帮忙测试一下这份数据吗
我使用你改好的编译处理完之后,坐标也是错误的

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

No branches or pull requests

5 participants