shapefiles from http://www.maproom.psu.edu/dcw/

Arlindo da Silva dasilva at ALUM.MIT.EDU
Thu Jun 12 08:45:07 EDT 2008


On Tue, Jun 10, 2008 at 4:49 AM, Karin Meier-Fleischer <
karin.meier-fleischer at zmaw.de> wrote:

> Hi,
>
> I have downloaded files from http://www.maproom.psu.edu/dcw/ and have
> problems to display it with grads.
>
> For example, I downloaded the tar file 451.tar for Germany drainage, which
> contains ArcView data. I converted the data to shapefile using ogr2ogr:
>
> ogr2ogr -f "ESRI Shapefile" drainage dnpoint.e00
>
> Now, I have the directory drainage which contains the following files
>
> LAB.dbf
> LAB.prj
> LAB.shp
> LAB.shx
>
> When running the grads script only the data variable ts is plotted
> but the drainage shapefile data not:
>
> 'reinit'
> 'open model.ctl'
> 'set lon 4 17'
> 'set lat 45 55'
> 'set gxout shaded'
> 'set csmooth on'
> 'set mpdraw off'
> 'd ts'
> 'shp_polyf drainage/LAB'
> 'printim test.gif white'
>
> Any idea?
>
> In the shape extensions documentation an object could be given to the
> call of shp_lines and shp_polyf:
>
> shp_lines SHAPEFILE [OBJECT]
> shp_polyf SHAPEFILE [OBJECT]
>
> What is the meaning of OBJECT?


A shapefile consists of a collection of OBJECTS, think of like like it were
records. If you just enter the file name than all objects in the file are
plotted. If you specify an object than only polygons for a smaller areas
will be plotted. It is just a device for plotting portions of a file.


>
> Perhaps I misunderstand the handling with shapefiles within grads?!....
>


The shapelib C library is used to read the shapefiles:

     http://shapelib.maptools.org/



More information about the gradsusr mailing list