Opened 12 years ago
Closed 12 years ago
#2163 closed patch (fixed)
[raster] Add st_tpi
Reported by: | nclay | Owned by: | dustymugs |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.1.0 |
Component: | raster | Version: | master |
Keywords: | history | Cc: |
Description
Add the ability to calculate the Topographic Position Index for a DEM raster.
Attachments (5)
Change History (17)
by , 12 years ago
Attachment: | st_tpi.sql added |
---|
comment:1 by , 12 years ago
Version: | 2.0.x → trunk |
---|
comment:2 by , 12 years ago
Summary: | Add st_tpi → [raster] Add st_tpi |
---|
Can I get some reference material describing TPI and TRI? That way appropriate regression tests can be created. I can't really consider committing this without a good understanding of the operations and verifying that the code is doing what it is saying it is doing.
comment:3 by , 12 years ago
Milestone: | PostGIS 2.1.0 → PostGIS Future |
---|
No regression tests or docs… punting to the future. Should also add roughness…
comment:4 by , 12 years ago
Added docs, is there anything other than regression test that I need to do?
Thanks,
Nathan
comment:5 by , 12 years ago
Milestone: | PostGIS Future → PostGIS 2.1.0 |
---|---|
Type: | enhancement → patch |
nclay — roughness?(though guess that can wait if it's a feature) Also the id of your function in doc has to be <refentry id="RT_ST_TPI"> to agree with other documented raster functions.
I'm willing to accept this for 2.1 (since it was originally slated for 2.1) if you can get the regress in by next week and dustymugs is fine with it.
dustymugs — what d'ya think?
comment:6 by , 12 years ago
Assuming regression tests are done and code review, I'm fine with 2.1. roughness would be a separate function and the last one needed to complete the "basic" set of DEM processing functions.
by , 12 years ago
Attachment: | st_tpi.xml added |
---|
comment:7 by , 12 years ago
Regression tests, how should or should I, I add rasters to the testing environment? What rasters am I to expect to be available, for my regression scripts? I know that these are basic questions but I want to get things right and up to snuff.
Thanks,
Nathan
comment:8 by , 12 years ago
Generally, you want to create a raster within the database using ST_MakeEmptyRaster(), ST_AddBand() and ST_SetValues(). That way, everything is portable regardless of filesystem.
comment:9 by , 12 years ago
Just to be clear, I should build up and tear down any needed raster within the regression script.
comment:10 by , 12 years ago
Yes. You may want to consider regression tests that focus only upon the callback function. Take a look at rt_4ma.sql and rt_invdistweight4ma.sql in raster/test/regress. The idea is to test just the code that needs testing rather than the whole map algebra framework, which is tested elsewhere. This way any failures can only originate in the callback function.
by , 12 years ago
Attachment: | rt_st_tpi.sql added |
---|
by , 12 years ago
Attachment: | rt_st_tpi_expected added |
---|
comment:12 by , 12 years ago
Keywords: | history added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Added in r11378
st_tpi