-
Notifications
You must be signed in to change notification settings - Fork 869
Closed
Labels
Description
Behavior changes in versions 8.1.0 and 5.0.1
# code test version 8.1.0
PJ_CONTEXT* context = proj_context_create();
//set search_paths The code for setting the path is not the key point, which is omitted here
auto srcCRS = proj_create(context, "EPSG:4490");
auto targetCRS = proj_create(context, "EPSG:4547");
auto pj = proj_create_crs_to_crs_from_pj(context, srcCRS, targetCRS, nullptr, nullptr);
proj_destroy(srcCRS);
proj_destroy(targetCRS);
//PJ_COORD coord = { -78271.516964022070, 313086.06785608182, 0, 0 };
PJ_COORD coord = { 313086.06785608182,-78271.516964022070, 0, 0 };
PJ_COORD coord2 = proj_trans(m_pj, PJ_DIRECTION::PJ_FWD, coord);
//output coord2 is inf inf inf infbut the Code in version 5.0.1
can get result : -1366.095681552781 5464.3827262110126
and the website http://epsg.io/transform#s_srs=4490&t_srs=4547&x=-78271.5169639&y=313086.0678561
also get result: -1366.10 5464.38
I am very clear about the following points.
1: I know the coordinates are beyond the boundary of 4490 CRS
2: I Know the new feature in version 8.1.0 of proj coordinate's order need to swap. that is not the key point
3: I Know I should to do transform from 4547 to 4490.
4: I know that converting out of range coordinates has no practical significance
now I have a question
Problem description
when input the coordinates out of boundary,
output is inf inf ... is that Intentional change?or a bug? or is that some way to avoid this?
yes , I want to get same result with version 5.0.1
please help me, actually, the code I learned from gdal 3.3.1 source code.
someone tell me what can I do someting in gdal is also ok.
jmckenna