Code Monkey home page Code Monkey logo

Comments (3)

Mo-Dabao avatar Mo-Dabao commented on May 24, 2024

推测投影中心并不是图像中心。

如果投影中心是是图像中心,经度范围应该是关于投影中心经度对称的

from awxreader.

Mo-Dabao avatar Mo-Dabao commented on May 24, 2024

我用MICAPS4打开了几个AWX文件看了一下,发现MICAPS4只有一套固定投影("D:\MICAPS4.8.0\config\Map\projections.ini"),但逻辑确实是用投影中心当作图像中心。

而AWX二级头信息中的经纬度范围确实是MICAPS4那一套固定投影产生的范围,和它本身的投影中心并不匹配。

综合文档中说二级头信息中的经纬度范围是大致范围,所以投影中心优先级应当高于经纬度范围。

所以应该可以认为这个思路没问题,不是bug。至少不是咱作为数据用户端解析的bug。

AwxReader/awx/__init__.py

Lines 273 to 280 in 4b1e4da

cx, cy = transformer.transform(h2.clon / 100., h2.clat / 100.)
dx, dy = h2.reso_h / 100. * 1000, h2.reso_v / 100. * 1000,
ll_x = cx - (dx * h2.width / 2.)
ll_y = cy - (dy * h2.height / 2.)
ur_x = cx + (dx * h2.width / 2.)
ur_y = cy + (dy * h2.height / 2.)
x = np.linspace(ll_x, ur_x, h2.width)
y = np.linspace(ur_y, ll_y, h2.height)

from awxreader.

wqshen avatar wqshen commented on May 24, 2024

我用MICAPS4打开了几个AWX文件看了一下,发现MICAPS4只有一套固定投影("D:\MICAPS4.8.0\config\Map\projections.ini"),但逻辑确实是用投影中心当作图像中心。

而AWX二级头信息中的经纬度范围确实是MICAPS4那一套固定投影产生的范围,和它本身的投影中心并不匹配。

综合文档中说二级头信息中的经纬度范围是大致范围,所以投影中心优先级应当高于经纬度范围。

所以应该可以认为这个思路没问题,不是bug。至少不是咱作为数据用户端解析的bug。

AwxReader/awx/__init__.py

Lines 273 to 280 in 4b1e4da

cx, cy = transformer.transform(h2.clon / 100., h2.clat / 100.)
dx, dy = h2.reso_h / 100. * 1000, h2.reso_v / 100. * 1000,
ll_x = cx - (dx * h2.width / 2.)
ll_y = cy - (dy * h2.height / 2.)
ur_x = cx + (dx * h2.width / 2.)
ur_y = cy + (dy * h2.height / 2.)
x = np.linspace(ll_x, ur_x, h2.width)
y = np.linspace(ur_y, ll_y, h2.height)

实际测试发现,兰伯特投影和墨卡托投影的经纬度确实与实际数据不符,目前正在解决当中。
已有的结果表明,墨卡托投影下lat_ts需指定为0(默认),而不是数据头信息中的标准纬度,才能保持投影正确。
兰伯特投影也存在轻微的位置漂移,如下图,目前正在查找原因。

image

from awxreader.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.