Polygon for raster GIS

I have an India shapefile with states (probably as polygons). I want to convert each polygon to equally spaced cells ("raster" way) and fill (actually color) each cell with a value that will be calculated by an algorithm that is specific to the cells. This has to be done for all the cells of the polygon (programmatically), so at the end I have a shapefile that looks like a thematic (from what my algorithm calculates) bitmap. I am not running any image because the information is actually calculated by an algorithm and does not come from satellite images or anything like that.

In other words, it is not vegetation or elevation, but something like a population distribution, where each value (color) of a cell represents the mean of the population there, showing in its entirety as a distribution on a large scale.

Can anyone help how to do this using any open source application? (both in app and programmatically using API like sharpmap) Please help

+1


source to share


4 answers


GDAL utilities and scripts will be my choice.

http://www.gdal.org/index.html

I'm not quite clear on how you are going to determine cell values โ€‹โ€‹based on position, but take a look at the following utilities:



http://www.gdal.org/gdal_grid.html

http://www.gdal.org/gdal_rasterize.html

If you cannot get the required output from the command line, then GDAL functions can be scripted (C ++ or Python has the most examples).

+1


source


One easy way to do this is using Mapnik and its Python binding. See their site for a tutorial on basic usage and their XML configuration schema .



0


source


I did it using MapScript (from UMN Mapserver).

http://mapserver.org/mapscript/index.html#mapscript

It's pretty straight forward and has many bindings (PHP, Ruby, Python, .NET, etc.), but the API is the same for all bindings. These bindings were of varying quality when I last used it and I am not aware of the current quality.

0


source


I did it using python and GDAL following the instructions below:

http://proj.lis.ic.unicamp.br/webmaps/docs/calc_ndvi/

Hope this helps.

ps. The site is in Portuguese, so if you don't speak this language, you may find the Google translation very helpful. Good luck.

P

0


source







All Articles