[GRASS-dev] r.in.pdf

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

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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

what about making a script or program in addon for doing these operation in single click or command


Rashad


From: Roger Miller roger@spinn.net
To: Mohammed Rashad rashadkm@yahoo.com
Cc: grass-dev@lists.osgeo.org
Sent: Mon, June 7, 2010 6:51:08 PM
Subject: Re: [GRASS-dev] r.in.pdf

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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

It would certainly be possible to do so, but I don't think there is a way to do it without requiring the user to provide the geographic information.

The script could provide for user input of the missing information. Alternatively the script could require that the user is in the correct mapset and has the right region boundaries for the map that will be imported. In that case the script would use the region settings and the image resolution to build the world file.

Mohammed Rashad writes:

what about making a script or program in addon for doing these operation in single click or command

--
Rashad

________________________________
From: Roger Miller <roger@spinn.net>
To: Mohammed Rashad <rashadkm@yahoo.com>
Cc: grass-dev@lists.osgeo.org
Sent: Mon, June 7, 2010 6:51:08 PM
Subject: Re: [GRASS-dev] r.in.pdf

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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Mohammed Rashad pisze:

what about making a script or program in addon for doing these operation in single click or command
--
Rashad

------------------------------------------------------------------------
*From:* Roger Miller <roger@spinn.net>
*To:* Mohammed Rashad <rashadkm@yahoo.com>
*Cc:* grass-dev@lists.osgeo.org
*Sent:* Mon, June 7, 2010 6:51:08 PM
*Subject:* Re: [GRASS-dev] r.in.pdf

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 <http://r.in.gd>.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 <http://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@lists.osgeo.org <mailto:grass-dev@lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/grass-dev

------------------------------------------------------------------------

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

I do not see much sense of create such script. It would be rather source of frustration, none can predict what can be in pdf so how to divide geographical information from others like legends, symbols etc during rasterisation or which vector is geographical data and which is not?

Esri solution concerns GeoPDF, created with ESRI and imported back as set of data and ESRI layers so I is not a good example. I think that problem of importing GeoPDF is rather a problem for GDAL/OGR dev team.
And AFAIK they do not work on it due to it is porperatly format. Maybe ask GDAL devs about details.

Jarek

On Jun 7, 2010, at 11:15 AM, Jarek Jasiewicz wrote:

Esri solution concerns GeoPDF, created with ESRI and imported back as set of data and ESRI layers so I is not a good example. I think that problem of importing GeoPDF is rather a problem for GDAL/OGR dev team.
And AFAIK they do not work on it due to it is porperatly format. Maybe ask GDAL devs about details.

GeoPDF recently became an open standard. The spec has been published.

Best,

Jeshua Lacock, Owner
<http://OpenOSX.com>
phone: 208.462.4171