Re: [Pkg-grass-general] BNA file import to QGis?
> ten years ago I made some maps using a proprietary software called
> Goldensoft Mapview IIRC. There, I could interchange boundary data
> (polygons) in an ascii format as shown below (extension had been BNA).
> As I like the idea to re-use this data with QGis, I wonder what was
> the easiest way to import my files?
>
> Is this format still in use, so we should go for an appropriate import
> filter?
>
> Thanks to you all,
> Ralf (Bielefeld, teaching geography, maths, computing)
>
> P.S.: Now, this is the way those files look like:
> Each object starts with a base line defining its ID, description and
> the amount N of succeeding lines (= coordinates). IIRC one could
> distinguish areas from linear objects by switching the signum of N.
>
> Now, here we go (cut fraction):
>
> "751","Bellevue",62
> 32.272358,81.584023
> 32.331161,81.535019
> 32.499729,81.452698
> 32.693775,81.342934
That looks just an awk script away from a GRASS vector or raster ascii
import file.
vector import: (v.in.ascii format=standard)
A 4
x1 y1
x2 y2
x3 y3
x4 y4
A 2
x1 y1
x2 y2
A 321
x1 y1
...
raster area: (r.in.poly)
32.272358,81.584023
32.331161,81.535019
32.499729,81.452698
32.693775,81.342934
A 751 Bellevue
...
export from there to shapefile or whatever with v.out.ogr, r.to.vect,
r.out.gdal, etc.
see:
http://grass.ibiblio.org/grass60/manuals/html60_user/v.in.ascii.html
http://grass.ibiblio.org/grass60/manuals/html60_user/r.in.poly.html
Hamish
Reply to: