[GRASS5] esri sites import

Helena hmitaso at unity.ncsu.edu
Thu Dec 20 16:47:30 EST 2001


Markus I think you forgot the cc, so I am sending this to the list. I put the
data at
http://skagit.meas.ncsu.edu/~helena/grasswork/grassprobl/school/
I tried m.in.e00 - works but puts elevation into dig_cats directory
v.in.shape was nice because it told me to use s.in.shape but that one ended in
core dump.
Anyway, this is just a notice of possible problems, not critical for my work
because
I have the data already imported.

Neteler wrote:

> Helena,
>
> (cc to Michel Wurtz)
>
> On Thu, Dec 20, 2001 at 12:36:33PM -0500, Helena Mitasova wrote:
> > Markus
> >
> > I am trying to do an interesting (hopefully) illustration for multiple
> > surfaces - topography before and after school construction, however I have
> > difficulties importing the site shape or e00 file (I can ask for ascii so
> > this is not critical). The e00 creates x,y,#id but puts elevation into a
> > separate file in dig_cats - how do I join those files?
>
> do you want to interpolate them? Is it right that you
> get
>  - a sites list
>  - a dig_cats file
> ?
>
> This is not desired of course (Hi Michel!)
>
> For now I can only suggest to use "join":
>
> >
> > this is the site file
> >
> > 2092279.4|731511.19|#1
> > 2092277.1|731506.56|#2
> > 2092274.6|731501.69|#3
> > 2092271|731496.19|#4
> > 2092269.1|731493.19|#5
> >
> >
> > and this is the cats file
> >
> > # 2631 categories
> > school.elevation
> >
> > 0.00 0.00 0.00 0.00
> > 1:3.80000000000000000E+02
> > 2:3.80000000000000000E+02
> > 3:3.80000000000000000E+02
> > 4:3.80000000000000000E+02
> > 5:3.80000000000000000E+02
> > 6:3.80000000000000000E+02
> > 7:3.80000000000000000E+02
>
> cat sites | tr -s '|' ' ' |tr '#' ' ' > a1
> cat dig_cats | tr -s ':' ' ' > b1
>
> join -1 3 -2 1 a1 b1 > joinfile
> cat joinfile
> 1 2092279.4 731511.19 3.80000000000000000E+02
> 2 2092277.1 731506.56 3.80000000000000000E+02
> 3 2092274.6 731501.69 3.80000000000000000E+02
> 4 2092271 731496.19 3.80000000000000000E+02
> 5 2092269.1 731493.19 3.80000000000000000E+02
>
> Quick and dirty...
>
> cat joinfile | cut -d' ' -f 2,3,4 > newsitestmp
> cat newsitestmp | sed 's/\ /|/;s/\ /|/;s/|/|%/2' > newsites
> cat newsites
> 2092279.4|731511.19|%3.80000000000000000E+02
> 2092277.1|731506.56|%3.80000000000000000E+02
> 2092274.6|731501.69|%3.80000000000000000E+02
> 2092271|731496.19|%3.80000000000000000E+02
> 2092269.1|731493.19|%3.80000000000000000E+02
>
> That's it. Ugly but working. However, a fix to m.in.e00
> will be better.
>
> Markus
>
> PS: to s.in.shape as well to fix that core dump :-(




More information about the grass-dev mailing list