Tuesday, 28 November 2017

postgis - Georeference raster in non horizontal plane


We have raster data which is generated from (vertical) walls. We would like to keep this data in a postgis database and have the spatial reference encoded "the most accurate way".



Currently, they are saved by abusing a metric CRS and encode the z coordinate of the wall as y, and the offset from the left side of the wall as x. This gives a local reference system which works for its purpose but loses the global context.


For vector data it is straightforward to give every vertex a 3D coordinate to locate it in (global) space. This is what should be created based on the raster data (use a GIS User Interface to digitize areas of interest on top of these walls).


Furthermore, multiple walls can be situated next to each other and it should be possible to visualize these in this context (it's enough if it only works if they have the same azimuth).


There are some approaches available how this could be tackled:


Use a custom CRS in vertical space, which has its origin based on a real-world coordinate. However where exactly this "origin reference" would be stored is still unclear.



  • Save the information in the CRS (is that possible?) - Would require several different CRS'es for each reference plane.

  • Use a foreign key to a line (see red lines in sample) - Current situation, redundant information (what if the length of the line does not correspond to the width of the raster?)

  • Create a 3D polygon as reference plane - Redundant information, see above

  • Create an origin point on the line, which in combination with the azimuth of the line can be the reference plane - Would different walls share the same reference plane?



All of the approaches seem to be somehow "workarounds" and have their caveats.


The two images below show a topview of the situation and a composition of several frontal raster images. (It's ok if they are mapped to a single reference plane)


What is the most appropriate way to store the vertical raster images in the database while not losing its geographic context in horizontal space and with elevation information?


Topview plan of the situation, red lines correspond to real world location of the rasters.


A set of orthorectified raster images, corresponding to red lines with the same azimuth.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...