| 7 | related thread from IRC |
| 8 | http://irclogs.geoapt.com/postgis/%23postgis.2020-02-12.log |
| 9 | |
| 10 | |
| 11 | {{{ |
| 12 | 22: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 |
| 13 | 22:15:53 reogl: i.e. https://i.imgur.com/OFTgXKN.png |
| 14 | 22:16:21 reogl: (my query is a super simple ST_Transform(rast, 4326)) |
| 15 | 22: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) |
| 16 | 22: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 |
| 17 | 22: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 |
| 18 | 22: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 |
| 19 | 22: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 |
| 20 | 23:02:01 robe2: Yah look at the https://postgis.net/docs/RT_ST_Transform.html variant 3 example |
| 21 | 23:02:03 sigq: Title: ST_Transform (at postgis.net) |
| 22 | 23:02:27 robe2: Basically that foo -- you can just replace with your table -- so you can skip the with foo part |
| 23 | 23:05:17 reogl: yep, working on it now, thank you |
| 24 | 23: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 :) |
| 25 | 23:09:08 reogl: actually it's pretty straightforward to follow, I am trying to coerce it into a table update statement now :) |
| 26 | |
| 27 | 23:27:23 reogl: and, by the way, the alignto method works as expected |
| 28 | 23: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 |
| 29 | 23:27:48 robe2: reogl so no gaps |
| 30 | 23:27:52 reogl: correct |
| 31 | |
| 32 | 23: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 |
| 33 | 23:29:48 reogl: (maybe it's my lack of knowledge about CRS and geospatial stuff generally that's made me miss it though) |
| 34 | 23:30:06 robe2: no it's a good point -- I'll add it |
| 35 | 23: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 |
| 36 | 23: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 |
| 37 | 23: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) |
| 38 | 23:33:10 robe2: reogl -- is it okay if we use your screen shot in manual |
| 39 | 23:33:26 robe2: thinking visual would be better to explain the difference |
| 40 | 23:34:04 robe2: reogl and if you give me your full name I can credit you |
| 41 | 23:34:55 reogl: sure; Maksim Gomov |
| 42 | 23:35:35 reogl: (the source data is fbfm40 from landfire if you want to pull more examples) |
| 43 | 23:36:04 reogl: https://www.landfire.gov/fbfm40.php |
| 44 | 23:36:05 sigq: Title: LANDFIRE Program: Data Products - 40 Scott and Burgan Fire Behavior Fuel Models (at www.landfire.gov) |
| 45 | }}} |