[GRASS-dev] r.in.pdf

Roger Miller roger at spinn.net
Mon Jun 7 09:21:08 EDT 2010


I don't know enough about the pdf format to give you a comprehensive
answer, but I can tell you what I've done in the past.  You will need
more information than is inherent in the pdf; you need to know the
projection of the map and you need the information to fit the map to its
location.

1) use the utility pdftoppm to convert the pdf to a ppm file.  pdftoppm
is not a GRASS utility, but is commonly included in linux distributions
and is probably available for other systems as well.

2) convert the ppm file to a jpeg or tiff file.  This can be done with
the common utilities ppmtojpeg or cjpeg, neither of which is part of
grass.

3) construct a world file for the jpeg or tiff file.  You can find
format information for the world file in Wikipedia.

4) use r.in.gdal to import the file to a location that is correct for
the map's projection.

Usually the difficult part in the process is getting the geographic
information necessary to fill out the world file.  The process can be
easily scripted, but it uses filters (pdftoppm and e.g. ppmtojpeg) that
don't come with GRASS.


Roger
 
On Mon, 2010-06-07 at 02:21 -0700, Mohammed Rashad wrote:
>     I have a map in pdf format. i want to import the map in grass.
> reading pdf map is available in ArcGIS. so I thought of developing and
> contributing a module to GRASS GIS (r.in.pdf) to read maps in pdf
> formats directly.I dont know where to start. will anyone please
> provide me any information or links related to importing raster maps
> into grass gis.how a map is processed when we perform r.in.* module on
> the map?. How files are like cellhd,fcell etc are created in GRASS?
> 
> any help, suggestion or comments are really welcome
> 
> -- 
> Rashad
> 
> 
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev



More information about the grass-dev mailing list