Changes between Initial Version and Version 2 of Ticket #4640


Ignore:
Timestamp:
02/12/20 15:43:15 (5 years ago)
Author:
robe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4640

    • Property Component postgisdocumentation
    • Property Owner changed from pramsey to robe
  • Ticket #4640 – Description

    initial v2  
    55source data from - https://www.landfire.gov/fbfm40.php
    66
     7related thread from IRC
     8http://irclogs.geoapt.com/postgis/%23postgis.2020-02-12.log
     9
     10
     11{{{
     1222:14:31        reogl:  hi all; I'm trying to transform a raster that's in crs5070 to crs4326, but I am seeing gaps between the raster tiles when I do that
     1322:15:53        reogl:  i.e. https://i.imgur.com/OFTgXKN.png
     1422:16:21        reogl:  (my query is a super simple ST_Transform(rast, 4326))
     1522:19:27        reogl:  I assume it's related to the fact that 5070 is geocentric while 4326 is geodetic, but I'm not sure how to mitigate this on the postgis level (or if it's possible at all)
     1622:42:53        reogl:  I'm wondering if I should just be reprojecting the data before I import it into the db, but I'd prefer to save a few hours and be able to do it on the db level rather than dropping it all
     1722:55:48        robe2:  reogl when you are transforming multiple raster tiles, you don't want to use ST_Transform(rast, srid) variant as you often end up with misaligned tiles
     1822:56:20        robe2:  I'm not sure if it will help your spacing issue, I suspect it will -- if you use the ST_Transform(rast, alignto) variant
     1922:58:10        reogl:  I'll give that a shot now, thanks; I'm also looking at just reprojecting the whole dataset since we don't need it in the db at 5070 anyways
     2023:02:01        robe2:  Yah look at the https://postgis.net/docs/RT_ST_Transform.html variant 3 example
     2123:02:03        sigq:   Title: ST_Transform (at postgis.net)
     2223:02:27        robe2:  Basically that foo -- you can just replace with your table -- so you can skip the with foo part
     2323:05:17        reogl:  yep, working on it now, thank you
     2423:06:18        robe2:  We should have come up with a simpler to understand example 3 - sorry -- not sure if I wrote that or Bborie -- I blame Bborie cause he's not around :)
     2523:09:08        reogl:  actually it's pretty straightforward to follow, I am trying to coerce it into a table update statement now :)
     26
     2723:27:23        reogl:  and, by the way, the alignto method works as expected
     2823:27:46        reogl:  there are a few small artifacts but nothing that I think will affect the data too much when I'm not operating on a pyramid
     2923:27:48        robe2:  reogl so no gaps
     3023:27:52        reogl:  correct
     31
     3223:29:18        reogl:  it would be nice if there was even just a 'gap' keyword in the ST_Transform docs or something to point to the alignto form of ST_Transform
     3323:29:48        reogl:  (maybe it's my lack of knowledge about CRS and geospatial stuff generally that's made me miss it though)
     3423:30:06        robe2:  no it's a good point -- I'll add it
     3523:30:44        robe2:  I think it was pretty unclear to me early on why we needed an align to version -- so people are probably wondering what that example 3 is for
     3623:31:00        reogl:  here's the reprojected data; you can see some small artifacting especially in the bottom left (the white spots) but for my purposes this will be just fine https://i.imgur.com/BcIORRp.png
     3723:31:39        reogl:  (and for all I know there is some similar artifacting in the actual data ranges but it's not a concern for me right now)
     3823:33:10        robe2:  reogl -- is it okay if we use your screen shot in manual
     3923:33:26        robe2:  thinking visual would be better to explain the difference
     4023:34:04        robe2:  reogl and if you give me your full name I can credit you
     4123:34:55        reogl:  sure; Maksim Gomov
     4223:35:35        reogl:  (the source data is fbfm40 from landfire if you want to pull more examples)
     4323:36:04        reogl:  https://www.landfire.gov/fbfm40.php
     4423:36:05        sigq:   Title: LANDFIRE Program: Data Products - 40 Scott and Burgan Fire Behavior Fuel Models (at www.landfire.gov)
     45}}}