Jump to content

 
Photo

simplify raster

- - - - -

  • Please log in to reply
8 replies to this topic

#1
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,310 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Hi,

I have a little thing - I would like to "simplify" a raster by removing stray cells (or groups of cells) and assigning those the nearest neighbour value instead. How would one most easily do this in ArcGIS (spatial analyst or ArcInfo GRID). The raster data has a limited number of ordinal classes.

How I did it now: zonal area, and where area < [limit, like 5 cells together] then do a focal majority. It doesn't feel super solid though...
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#2
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,310 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

to respond to myself, I should have used the majority filter... (or boundary clean)
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#3
Charlie Frye

Charlie Frye

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 112 posts
  • Gender:Male
  • Location:Redlands, CA
  • Interests:Base map design/data model, political/election maps; use of historical maps for modern GIS analysis
  • United States

There are a few other tools that may be helpful. The majority filter if over-applied will create a Tanaka-esque wedding cake effect, which is not often desireable. There are some other Spatial Analyst/GRID tools worth exploring:

1. Fill: to find small dips in the raster that would typically represent imperfections in the data, and fill them
2. Focal Statistics: with a Circle shape and a radius between 3 and 6 cells depending on the amount of smoothing desired.
3. Resample: Given your original question, I think this is what you should have used; though I find that using the first two as preparation yield a cleaner result.


to respond to myself, I should have used the majority filter... (or boundary clean)


Charlie Frye
Chief Cartographer
Software Products Department
ESRI, Redlands, California

#4
Charlie Frye

Charlie Frye

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 112 posts
  • Gender:Male
  • Location:Redlands, CA
  • Interests:Base map design/data model, political/election maps; use of historical maps for modern GIS analysis
  • United States

I misread something in your initial post, and assumed you wanted a larger cell size. I think instead you're on the right track with Majority Filter, though it really depends on the nature of your data. If you can live with a slightly larger cell size, I think Aggregate is the best option.

If you want more control, consider converting to Polygon and using the vector generalization tools to remove small pockets and such. If you want weighted control, then try using the Expand tool first. Too, I think playing around with two resample runs might work as well, one to a slightly larger cell size and then back to the original cell size; using nearest neighbor in both cases.

If anyone was using continuous floating point data they use what I suggested a moment ago.

There are a few other tools that may be helpful. The majority filter if over-applied will create a Tanaka-esque wedding cake effect, which is not often desireable. There are some other Spatial Analyst/GRID tools worth exploring:

1. Fill: to find small dips in the raster that would typically represent imperfections in the data, and fill them
2. Focal Statistics: with a Circle shape and a radius between 3 and 6 cells depending on the amount of smoothing desired.
3. Resample: Given your original question, I think this is what you should have used; though I find that using the first two as preparation yield a cleaner result.



to respond to myself, I should have used the majority filter... (or boundary clean)


Charlie Frye
Chief Cartographer
Software Products Department
ESRI, Redlands, California

#5
benbakelaar

benbakelaar

    Ultimate Contributor

  • Associate Admin
  • PipPipPipPipPipPip
  • 658 posts
  • Gender:Male
  • Location:North Brunswick, NJ
  • Interests:maps, information, technology, scripting, computers
  • United States

How I did it now: zonal area, and where area < [limit, like 5 cells together] then do a focal majority. It doesn't feel super solid though...


Can anyone tell me specifically how to do this with the mentioned "vector generalization tools"? My specific scenario is a Google Map with 1000+ markers. Google just today released a new tool to load multiple marker sets, depending on the zoom level. So, if I load all my 1000+ markers in ArcView, I basically want to be able to make a few "views" - one only showing 100 markers, one showing 250, one showing 500, etc.

So rather than doing a random selection of points, can I "merge" 1000+ points down to a specified number (i.e. 100) where ArcView sort of analyzes the points and picks the "most central" ones, and produces a new layer? Sorry, don't know the official words to describe what I am trying to do.

#6
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,310 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Thanks for the tips Charlie,

I achieved what I wanted through the Majority filter. This was the first step(s) before vectorizing it, which I ended up doing in Illy (LiveTrace) with good results.

My understanding is that running the generalization tools in ArcGIS is not so easy on polygon data (experimented a little bit with the smooth tool, but gave up).

Ben - maybe your post should be split into a separate thread... ?
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#7
Martin Gamache

Martin Gamache

    Ultimate Contributor

  • Associate Admin
  • PipPipPipPipPipPip
  • 980 posts
  • Gender:Male
  • Location:Washington DC
  • Interests:History of Topographic Cartography
    Topographic Mapping
    History of Relief Depiction
    Thematic Cartography
    Demographic Cartography
    Cartographic techniques, methods, and tools
    Orienteering
    Panoramic &amp; Kite Photography
  • United States


How I did it now: zonal area, and where area < [limit, like 5 cells together] then do a focal majority. It doesn't feel super solid though...


Can anyone tell me specifically how to do this with the mentioned "vector generalization tools"? My specific scenario is a Google Map with 1000+ markers. Google just today released a new tool to load multiple marker sets, depending on the zoom level. So, if I load all my 1000+ markers in ArcView, I basically want to be able to make a few "views" - one only showing 100 markers, one showing 250, one showing 500, etc.

So rather than doing a random selection of points, can I "merge" 1000+ points down to a specified number (i.e. 100) where ArcView sort of analyzes the points and picks the "most central" ones, and produces a new layer? Sorry, don't know the official words to describe what I am trying to do.



There is a couple cluster analysis functions in the toolbox under spatial statistics I think . What you are essentially trying to do is find clusters inyour data so that you can simplify the presentation.

In manifold you can just drop the level of precision of your data and it thins itself but I'm not sure what method it uses to do this.

#8
CHART

CHART

    Chart

  • Validated Member
  • PipPipPipPipPip
  • 358 posts
  • No Country Selected

Can anyone tell me specifically how to do this with the mentioned "vector generalization tools"? My specific scenario is a Google Map with 1000+ markers. Google just today released a new tool to load multiple marker sets, depending on the zoom level. So, if I load all my 1000+ markers in ArcView, I basically want to be able to make a few "views" - one only showing 100 markers, one showing 250, one showing 500, etc.

So rather than doing a random selection of points, can I "merge" 1000+ points down to a specified number (i.e. 100) where ArcView sort of analyzes the points and picks the "most central" ones, and produces a new layer? Sorry, don't know the official words to describe what I am trying to do.


........................

I think it is called point (data) aggregation.

In MapInfo / Veritcal Mapping there is a simple to use point aggregation function based on distance....

As for obtaining a specific number of points as the results of an aggregation I don't think you can do it. I can only think of increasing the aggregation distance until you get the result close to the numbers you want. But you might need to do a bit of interpretation to get the exact number of say 250...
Chart

#9
Charlie Frye

Charlie Frye

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 112 posts
  • Gender:Male
  • Location:Redlands, CA
  • Interests:Base map design/data model, political/election maps; use of historical maps for modern GIS analysis
  • United States

The tool I was refering to was the Workstation ArcInfo tool called AREAAGGREGATE; it's been re-implemented for ArcGIS 9.2 in the Desktop geoprocessing environment. and there it is called "Aggregate Polygons". You will need an ArcInfo level license to run that tool.

The idea would be to convert the grid (by grid, I mean ArcInfo Raster dataset) to polygons, run AREAAGGREGATE, and then convert the result back to a grid.


There is a couple cluster analysis functions in the toolbox under spatial statistics I think . What you are essentially trying to do is find clusters inyour data so that you can simplify the presentation.

In manifold you can just drop the level of precision of your data and it thins itself but I'm not sure what method it uses to do this.


The clustering tools may not quite do the trick, for two reasons.

1. the points would need to have a value or weight assigned as an attribute; the tool among other things calculates a variance, and if that it zero (i.e., all the values are the same), the tool will not function.

2. The result is a distance to the center of each cluster. The clusters are weighted, so if you class the resulting values, and start showing points, the points in the center of the strongest cluster will show first; as you show more points, the less strong clusters will eventually have points shown, all the way out to the outlying points. I had assumed from the problem description the idea would be to show as many non-overlapping points as possible as someone zoomed in. That's a fairly different problem/solution as it would be okay for the outlying points to be shown initially--though after writing this, I wonder if the problem is defined sufficiently.

Charlie
Charlie Frye
Chief Cartographer
Software Products Department
ESRI, Redlands, California




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->