Select to view content in your preferred language

Complex problem involving multiple shapefiles 'flattened' to a raster image

1778
2
02-19-2013 11:34 AM
Labels (1)
EzraSidran
Emerging Contributor
I have a complex problem and I'm looking for advice on how to approach it. I'm quite comfortable coding in C# and WPF but I'm new to ArcGIS Consequently, I am probably overlooking 'easy' ways to solve this.

Input:
N number of shapefiles that contain data about roads, rivers, coastlines, forests, etc.

Output:
A raster image (actually just a 2D array) that contains the sum* of all the data from the shapefiles (above) mapped to a common coordinate system.

* = When I say 'sum' I mean added in a specific order so that the shapefile that contains road would be added last so that the roads would 'cross' the rivers.

In the graphic below I've created a very crude example (the values are 0 = 'clear terrain', 1 = water, 2 = road).
[ATTACH=CONFIG]21965[/ATTACH]

So what I want to end up with is a 2D array that has numerical values for the terrain features imported from the shapefiles and also the lat/long coordinates of the beginning and end of the 2D array.

Anybody have any ideas? Thanks in advance!
0 Kudos
2 Replies
MichaelBranscomb
Esri Frequent Contributor
Hi,

If this is just for display then it's very simple to add all those layers to the desktop GUI (ArcMap), apply some symbols and rasterize them as tiles for use in a client application.

But if you actually want a raster grid of cells with calculated values then you're getting into the realms of what we call "geoprocessing". ArcGIS has a library of geoprocessing tools which perform many functions - the idea being that you build up a model in the desktop GUI (ArcMap) by tying together multiple tools and then export that as a Geoprocessing Package for use in our ArcGIS Runtime SDK for WPF. You can also use Python to create that model which opens up access to some of the additional Python libraries included with ArcGIS. There is lots of help in the main ArcGIS for Desktop help which might be a good place to start: http://resources.arcgis.com/en/help/main/10.1/#/What_is_geoprocessing/002s00000001000000/.

You'll probably first need to convert each individual vector dataset (roads, rivers, etc) into a raster dataset, perhaps using the "Feature to Raster" tool (http://resources.arcgis.com/en/help/main/10.1/index.html#//00120000002v000000). Then you'll need to combine them - there are many tools for working with rasters in the Spatial Analyst toolbox (note this requires an extension license when deploying your app). Here's an intro to the Spatial Analyst tools: http://resources.arcgis.com/en/help/main/10.1/index.html#/An_overview_of_the_Spatial_Analyst_toolbox....

One of the key things to note is that not all of the tools are supported in our WPF SDK - here's a list of the ones that are: http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/Supported_geoprocessing_tools/0...

We do have a similar but much smaller set of similar help in the SDK help which covers more of the topics you need to consider when you want to make your geoprocessing tool/model available in an ArcGIS Runtime application: http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/What_is_geoprocessing/017000000....


Cheers

Mike
0 Kudos
EzraSidran
Emerging Contributor
First, Mike, thanks for pointing me in the right direction!

The only reason to convert to raster, as an intermediate step, is because it seems like there are methods that support this. If at all possible, I would prefer going from Shapefiles to 2D array and completely bypass the raster conversion step.

Do you think that's possible? Or will it be easier to go Shapefiles --> Raster --> 2D array?
0 Kudos