I have used GDAL to convert our GIS datasets to GDA2020 datum in the past year and now have a new challenge. The states property map base is currently being corrected by our State Government meaning the property boundaries are shifting. We have access to the shift vectors to show where each property boundary has shifted. As we have other spatial layers internally that follow property boundaries, we will also need to shift those layers. I was hoping to use the shift vector layer. I know QGIS has Vector Bender, but is there an equivalent function in GDAL that references a shift vector layer?
2 Answers
It should be possible with ogr2ogr https://gdal.org/programs/ogr2ogr.html by using the -gcp option
-gcp <ungeoref_x> <ungeoref_y> <georef_x> <georef_y>
Add the indicated ground control point. This option may be provided multiple times to provide a set of GCPs.
Use the start point of the shift vector as ungeoref and end point as georef. Notice also option -order
and -tps
.
-
That's great. Thankyou very much. I'll try this. Commented Jan 10, 2023 at 3:08
-
If my shift vector is a shapfile containing many lines, how would I indicate the start and end point in place of <ungeoref_x> <ungeoref_y> <georef_x> <georef_y>? I can't seem to find any examples online for this specific example? Would referencing a shapefile pick up every shift vector or does each need to be specified? Commented Jan 10, 2023 at 5:02
-
I have not used ground control points with ogr2ogr myself but they look usable. For extracting the points there are methods like postgis.net/docs/ST_StartPoint.html and postgis.net/docs/ST_EndPoint.html. If you can point where to find some shift vectors I may find time for experimenting with them. Commented Jan 10, 2023 at 7:09
I ended up using FME's Rubbersheet transformer and I think this will suit our needs. Thankyou.