Jump to content

 
Photo

Filtering out irregular values in flat areas of a hillshade that was created with aspect-based shading

- - - - - aspect-based shading aspect shading landserf landscript filter filtering filter out irregular irregular values

  • Please log in to reply
2 replies to this topic

#1
HK120

HK120

    Newbie

  • Validated Member
  • Pip
  • 7 posts
  • Gender:Male
  • Location:Switzerland
  • Switzerland

I'm trying to filter out irregular values in flat areas of a hillshade that was created with aspect-based shading. In the attached hillshade, the flat ridges and valley grounds show irregular values. I use the scripting language "Landscript" of Landserf. However I couldn't find a way to filter them out. Has anybody achieved that? 

More about the topic is here: http://cartography.o...liefshading.pdf

 

I'm thankful for any suggestions! 

Best regards!

 

I tried below's code in Landscript but wasn't successful:

 

version(1.0);

baseDir = "/Users/../ASPECT/";
dem = open(baseDir&"tibet5cut_asc.srf");
edit(dem,"sunAzim",35);
edit(dem,"sunElev",59.4);
edit(dem,"pShade",100);
edit(dem,"vExag",1);
 
slope = surfparam(dem,"slope");
draw(baseDir & "slope.jpg",slope,"null","null","null","raster");
# showMetadata(slope,"slope");
 
edit(dem,"aBias",0);
aBiasLow = new(dem, "true");
draw(baseDir & "aBiasLow.jpg",aBiasLow,"null","null","null","relief");
 
edit(dem,"aBias",50);
aBiasHigh =  new(dem, "true");
draw(baseDir & "aBiasHigh.jpg",aBiasHigh,"null","null","null","relief");
 
finalMap = new(dem);
finalMap = ifelse(slope < 24, aBiasLow, aBiasHigh);
 
draw(baseDir & "finalMap.jpg",finalMap,"null","null","null","relief");

Attached Files



#2
David Medeiros

David Medeiros

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,085 posts
  • Gender:Male
  • Location:Redwood City CA
  • Interests:Cartography, wood working, wooden boats, fishing, camping, overland travel, exploring.
  • United States

This is the sort of work that is usually best handeled in photo editing software (like Photo Shop) after the inital terrain has been created. You can apply a very small median filter or a blur filter (smart, guassian, or surface all work well with different results) to remove the rough pixelated appearance of a freash shaded relief image.


GIS Reference and Instruction Specialist, Stanford Geospatial Center.

 

www.mapbliss.com

 


#3
HK120

HK120

    Newbie

  • Validated Member
  • Pip
  • 7 posts
  • Gender:Male
  • Location:Switzerland
  • Switzerland

Thanks for the answer! Well, if trying to solve it with a filter, then only applying the filter where the values are irregular (i.e. the flat valley and ridge lines). The slopes are good and should remain crisp. It could be helped by applying a photoshop mask of the slope. I was hoping though to find a solution with the programming to combine two distinct shading settings (one with aspect-based shading for hilly areas and one without aspect-based shading for flat areas) within one raster.







Also tagged with one or more of these keywords: aspect-based shading, aspect, shading, landserf, landscript, filter, filtering, filter out, irregular, irregular values

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users

-->