Building a geographic region

Ted Cox tedc at alaska.net
Sat May 25 08:00:00 EDT 1996



a16dhoover at attmail.com (David  Hoover) wrote:
>
>Greetings from Idaho!
>
>We received some DLG-3 Optional files from a contractor that did not
>contain header information.  What is a good way, and hopefully a quick
>way, to build the easting and northing coordinates used to display
>to data, either using g.region or the first screen in v.digit?  We have
>a lot of these files and don't want to spend much time going into
>v.digit to build the region data for each file.
>
>Thanks in advance,
>
>Dave Hoover
>Idaho NRCS
>

Dave, 

This is a round-about way, but you could import the DLG, run support,
then v.out.ascii to create an ascii file. Then cut out the existing
dig_ascii file header (14 lines) and pre-pend a generic header that
defines a geographic region encompassing your whole mapset (almost any 
outrageous numbers will do). Then v.in.ascii, v.support -r $filename.
This will shrink your geographic region to the extent of the data and
write a header for you that contains those coordinates. You can automate
the whole process using sed cut or awk. I've done it before and it works.
Far better than pluggin in coordinates by hand.


-Ted Cox
USDA/NRCS -Alaska






More information about the grass-user mailing list