[GRASS5] making raster maps from vector maps with PostgreSQL data
in GRASS 5.3
Michael Barton
michael.barton at asu.edu
Fri Jan 9 11:52:12 EST 2004
Tom,
Thanks for this suggestion.
On Friday, January 9, 2004, at 08:52 AM, Thomas Adams wrote:
> Michael,
>
> Iteresting you should ask this question since I had a similar need.
> What you need to do is this:
>
> (1) first do the v.to.rast conversion on your vector files, creating
> the raster equivalents
>
> (2) if you have the dig_cats files for the vector files, then simply
> copy them into the cats directory; the only thing is that the cats
> filenames & the cell file names must be the same - then you're done.
Actually I don't **think** that this is even necessary if you have
dig_cats. I **think** that v.to.rast will copy the vector attributes
into the proper raster cat & label files. The problem, of course is
that I **don't** have the dig_cats file and want to create it from a
PostgreSQL table column. However, barring an elegant solution to this,
what you recommend below will work even if it is 'brute force'. Thanks
again.
>
> (3) if you don't have the dig_cats files, you'll have to do a SQL
> query to dump the attributes to a text file by polygon area and then
> do a little file manipulation to get them into the format needed for
> Step-(2) above.
>
> Now, this may be a brute force way to do this and someone else will
> come along with something more elegant, but it will work.
>
Michael
> Regards,
> Tom
>
>
>
> Michael Barton wrote:
>
>> Here is the setup:
>>
>> I have a vector area map with related information in a PostgreSQL
>> database. I can query and display the vector map using information
>> from any of the data fields in the PostgreSQL table.
>>
>> What I'd like to do is create a series of raster maps of the vectora
>> areas in which the cat and/or label values are derived from a
>> corresponding series of field from the PostgreSQL file (e.g., raster
>> map1 using field 1, raster map2 using field 2, etc.)
>>
>> How do I get data from a PostgreSQL field into the cat or label field
>> of a vector file so I can do a v.to.rast transformation?
>>
>> Or is there another solution to this?
>>
>> Thanks
>> Michael Barton
>> ______________________________
>> Michael Barton, Professor & Curator
>> Department of Anthropology
>> Arizona State University
>> Tempe, AZ 85287-2402
>> USA
>>
>> voice: 480-965-6262; fax: 480-965-7671
>>
>> _______________________________________________
>> grass5 mailing list
>> grass5 at grass.itc.it
>> http://grass.itc.it/mailman/listinfo/grass5
>
>
> --
> Thomas E Adams
> National Weather Service
> Ohio River Forecast Center
> 1901 South State Route 134
> Wilmington, OH 45177
>
> EMAIL: thomas.adams at noaa.gov
>
> VOICE: 937-383-0528
> FAX: 937-383-0033
>
>
>
______________________________
Michael Barton, Professor & Curator
Department of Anthropology
Arizona State University
Tempe, AZ 85287-2402
USA
voice: 480-965-6262; fax: 480-965-7671
More information about the grass-dev
mailing list