Comments (11)
Comment by cdestigter on 4 Nov 2008 21:21 UTC
second patch removes some unnecessary stuff which shouldn't have been in the first patch (porting artifacts from cvs to svn)
from proj.
Comment by rcoup on 5 Jul 2009 10:41 UTC
I've attached a reworked patch: The goals were to:
- fallback to 3/7 parameter transforms for source points outside the grid range
- happily work for point sequences. ie. if point 5/10 failed it would use 3/7 param, while the other 9 points would use the grid.
The 2nd is a problem currently, since the gridshift bails out with a "transient error", so the return code from pj_datum_transform()
ends up being 0 even though there were errors and many points weren't transformed. Postgis deliberately checks for this and throws an exception. See also #45.
Changes in the patch:
- make a projection's datum_type a mask, so it can have 3param & 7param & gridshift rather than only one.
- make a new -47 error for pj_apply_gridshift, which is transient and is returned only when a point is outside the grid range (as opposed to -38 which is also used for file-not-found, etc).
- make -38 not transient.
- make apply-gridshift take/return an array which it populates with 0 (transformed successfully) or 1 (errors) for each point processed.
- if a -47 error occurs during the gridshift, transform the errored points via 3/7 param before continuing with the remainder of the datum transformation.
- handling only a subset of points required changes to the APIs of several functions. I've maintained the old public APIs and used "funcname_impl()" for the ones that take an ignore-mask. The _impl versions aren't in proj_api.h (and only 1 was needed in projects.h)
My main test case ([attachment:proj_grid_test.c]) was transforming:
3010000.0,5300000.0
1990000.0,6790000.0 # outside the gridshift range
3010000.0,5300000.0
between:
+proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150 +ellps=intl +datum=nzgd49 +units=m +no_defs +nadgrids=nzgd2kgrid0005.gsb
and:
+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
from proj.
Comment by rcoup on 20 Jul 2009 06:20 UTC
Updated patch & testcase fixes an issue where double-datum transforms occurred when projections had both 7/3 and gridshift transforms defined.
from proj.
Attachment added by cdestigter on 4 Nov 2008 21:09 UTC
https://trac.osgeo.org/proj/attachment/ticket/19/datum_gridshift_fallback.diff
from proj.
Attachment added by cdestigter on 4 Nov 2008 21:20 UTC
https://trac.osgeo.org/proj/attachment/ticket/19/datum_gridshift_fallback2.diff
from proj.
Attachment added by rcoup on 5 Jul 2009 10:26 UTC
https://trac.osgeo.org/proj/attachment/ticket/19/datum_gridshift_fallback.4.diff
from proj.
Attachment added by rcoup on 5 Jul 2009 10:43 UTC
https://trac.osgeo.org/proj/attachment/ticket/19/proj_grid_test.c
from proj.
Attachment added by rcoup on 20 Jul 2009 06:21 UTC
https://trac.osgeo.org/proj/attachment/ticket/19/datum_gridshift_fallback.5.diff
from proj.
Attachment added by rcoup on 20 Jul 2009 06:22 UTC
https://trac.osgeo.org/proj/attachment/ticket/19/proj_grid_test.2.c
from proj.
Attachment added by rcoup on 27 Jul 2009 22:37 UTC
https://trac.osgeo.org/proj/attachment/ticket/19/datum_gridshift_fallback.6.diff
from proj.
Closing, since attachment links now 404
from proj.
Related Issues (20)
- Geoid model list for a specific area HOT 5
- Proj4 export from a bound CRS object fails
- Interrupted Mollweide gives wrong result on inverse projections of some lat/lons. HOT 5
- .github/workflows/docker.yml to push only proj-docs for master pushes
- Project build failed on windows10 vs2017 HOT 1
- "proj_grid_info" C API function fails with grid "test_gridshift_projected.tif" HOT 4
- HEPOS GGRS87 shift grid HOT 2
- "No inverse method available" HOT 7
- Different (~100m) results from transforming WGS84 -> Belgian lambert 72 depending on definition used HOT 6
- General grid shift issue HOT 4
- Wrong transformation from vertical with geoid model to "vertical offset" HOT 1
- Doc Helmert: rotation matrix HOT 2
- Google marks proj.org as potentially hacked, recommends against visiting it HOT 11
- Help with compiling PROJ 5.1.0 with JNI on windows HOT 2
- I'm cross-compiling, tried 9.3.1, 9.3.0, 9.0.0, and sqlite cross-compilation and local compilation all failed, don't know why the build failed HOT 3
- Error with sqlite link in cross-compilation HOT 3
- Error initializing invproj 9.1.1 with epsg PROJ_USE_PROJ4_INIT_RULES=YES HOT 1
- multi-grid GTG with overlapping grids and nodata HOT 6
- Make output or error message
- ReadTheDocs Deprecation: Removal of Sphinx context injection at build time
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proj.