[GRASS-user] vector data - convert lines/intersections into areas?

I'm relatively new to Grass.

I've had some luck at figuring out how to convert DXF files into vector data within Grass but I'm running into a problem. The CAD designer that generated these DXF files used horizontal and vertical lines to create large grids. Visually, the lines form a multitude of squares and rectangles, but the intersections are not defined at the vector level. That is, they were not drawn as closed polygons, so v.in.dxf doesn't yield any areas.

I'd like each of the "polygons" created by the grid lines to become a vector area, but haven't yet found a clever way to do it. For now, I'm simply creating a raster with the vector data, pulling it back in with r.in.gdal and subsequently using "r.to.vect feature=area" to find the closed polygons.

Is there a way that I can go about this purely within the vector space? I'd like to skip the lossy raster conversion step. Thanks for the help.

I'm doing an install of grass62. I'm a bit confused about this new program gdal-grass.

Yes, I know google is my friend, but I don't really follow this explanation:
http://osdir.com/ml/gis.gdal.devel/2005-02/msg00049.html

Incidentally, I've already compiled proj-4, geos, gdal, and grass62. I'm not sure how to set up the ./configure for gdal-grass.

Kurt Heston wrote:

The CAD designer that
generated these DXF files used horizontal and vertical lines to create
large grids. Visually, the lines form a multitude of squares and
rectangles, but the intersections are not defined at the vector level.
That is, they were not drawn as closed polygons, so v.in.dxf doesn't
yield any areas.

I'd like each of the "polygons" created by the grid lines to become a
vector area, but haven't yet found a clever way to do it. For now, I'm
simply creating a raster with the vector data, pulling it back in with
r.in.gdal and subsequently using "r.to.vect feature=area" to find the
closed polygons.

Is there a way that I can go about this purely within the vector space?

v.type type=line,boundary
v.clean tool=bpol (or maybe tool=break?)
v.centroids

Maciek

Mon 31 Dec 2007 07:21, Kurt Heston wrote:

Is there a way that I can go about this purely within the vector space?

did you try v.type ?

s.

gary wrote:

I'm doing an install of grass62. I'm a bit confused about this new
program gdal-grass.

Yes, I know google is my friend, but I don't really follow this
explanation:
http://osdir.com/ml/gis.gdal.devel/2005-02/msg00049.html

Incidentally, I've already compiled proj-4, geos, gdal, and grass62. I'm
not sure how to set up the ./configure for gdal-grass.

./configure --with-grass=/path/to/grass/instalation

It should pick up right --with-gdal and --with-autoload
automatically. If it doesn't, refer to ./configure --help.

Maciek

On Dec 31, 2007 1:37 PM, Maciej Sieczka <tutey@o2.pl> wrote:

gary wrote:
> I'm doing an install of grass62. I'm a bit confused about this new
> program gdal-grass.

It exists for some years now :slight_smile:

> Yes, I know google is my friend, but I don't really follow this
> explanation:
> http://osdir.com/ml/gis.gdal.devel/2005-02/msg00049.html
>
> Incidentally, I've already compiled proj-4, geos, gdal, and grass62. I'm
> not sure how to set up the ./configure for gdal-grass.

Please take a look here:
http://grass.gdf-hannover.de/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin

Markus

Is this supposed to point to where I extract the grass tarball?

Maciej Sieczka wrote:

gary wrote:

I'm doing an install of grass62. I'm a bit confused about this new
program gdal-grass.

Yes, I know google is my friend, but I don't really follow this
explanation:
http://osdir.com/ml/gis.gdal.devel/2005-02/msg00049.html

Incidentally, I've already compiled proj-4, geos, gdal, and grass62. I'm
not sure how to set up the ./configure for gdal-grass.

./configure --with-grass=/path/to/grass/instalation

It should pick up right --with-gdal and --with-autoload
automatically. If it doesn't, refer to ./configure --help.

Maciek

gary wrote:

Is this supposed to point to where I extract the grass tarball?

Yes. Eg. --with-grass=/usr/local/grass-6.3.svn

Maciek

I have tried pointing to where:
1) the tarball was extracted
2) the directory lib, contained in the directory where the tarball was extracted
3) a directory called grass-6.2.3, which was created in /usr/local
4) the directory lib in the above directory

That is:
1) /usr/local/src/grass/grass-6.2.3
2) /usr/local/src/grass/grass-6.2.3/lib
3) /usr/local/grass-6.2.3
4) /usr/local/grass-6.2.3/lib

The error message is
configuration error --with-grass= blah blah blah libraries not found

Maciej Sieczka wrote:

gary wrote:

Is this supposed to point to where I extract the grass tarball?

Yes. Eg. --with-grass=/usr/local/grass-6.3.svn

Maciek

Gary,

since I am a lazy person, I have made this a script:
http://mpa.itc.it/markus/useful/conf_install_gdal_ogr_grass_plugin.sh

this may help you. It compiles and installs the plugin right away from
the GDAL source code, you don't even have to download the
separate plugin code (which is really just taken from the GDAL
source code).

Maybe that helps,
Markus

On Jan 1, 2008 9:49 PM, gary <lists@lazygranch.com> wrote:

I have tried pointing to where:
1) the tarball was extracted
2) the directory lib, contained in the directory where the tarball was
extracted
3) a directory called grass-6.2.3, which was created in /usr/local
4) the directory lib in the above directory

That is:
1) /usr/local/src/grass/grass-6.2.3
2) /usr/local/src/grass/grass-6.2.3/lib
3) /usr/local/grass-6.2.3
4) /usr/local/grass-6.2.3/lib

The error message is
configuration error --with-grass= blah blah blah libraries not found

Maciej Sieczka wrote:
> gary wrote:
>> Is this supposed to point to where I extract the grass tarball?
>
> Yes. Eg. --with-grass=/usr/local/grass-6.3.svn
>
> Maciek
>
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
Open Source Geospatial Foundation
http://www.osgeo.org/
http://www.grassbook.org/

Well, different errors. I assume you wanted that file in the gdal-grass directory as created by tar, which in my case is
/usr/local/src/gdal-grass/gdal-grass-1.4.3

I "sourced" the file. Error message is --with-grass=/root/grass63/dist.x86_64-unknown-linux-gnu

Markus Neteler wrote:

Gary,

since I am a lazy person, I have made this a script:
http://mpa.itc.it/markus/useful/conf_install_gdal_ogr_grass_plugin.sh

this may help you. It compiles and installs the plugin right away from
the GDAL source code, you don't even have to download the
separate plugin code (which is really just taken from the GDAL
source code).

Maybe that helps,
Markus

On Jan 1, 2008 9:49 PM, gary <lists@lazygranch.com> wrote:

I have tried pointing to where:
1) the tarball was extracted
2) the directory lib, contained in the directory where the tarball was
extracted
3) a directory called grass-6.2.3, which was created in /usr/local
4) the directory lib in the above directory

That is:
1) /usr/local/src/grass/grass-6.2.3
2) /usr/local/src/grass/grass-6.2.3/lib
3) /usr/local/grass-6.2.3
4) /usr/local/grass-6.2.3/lib

The error message is
configuration error --with-grass= blah blah blah libraries not found

Maciej Sieczka wrote:

gary wrote:

Is this supposed to point to where I extract the grass tarball?

Yes. Eg. --with-grass=/usr/local/grass-6.3.svn

Maciek

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Only works marginally well because part of my vector drawing is being
ignored.

Acrobat only exports R13, R14 and LT2000. It appears v.in.dxf doesn't
support these newer formats. So, part of the data comes over, but not
all of it.

Suggestions?

sebastian sauer wrote:

Mon 31 Dec 2007 07:21, Kurt Heston wrote:
  

Is there a way that I can go about this purely within the vector space?
    

did you try v.type ?

s.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
  
--
/Please note our new company name is: *Heston Systems*/
*Kurt Heston*
kheston@hestonsystems.com <mailto:kheston@hestonsystems.com>
/*Heston Systems, Inc.*
www.hestonsystems.com <http://www.hestonsystems.com>
510-324-1837 ofc.
510-329-5703 cel.
/

*Notice to recipient:*
This e-mail is meant only for the intended recipient of the
transmission, and may be a communication privileged by law. If you
received this e-mail in error, any review, use, distribution, copying,
or use of this e-mail is strictly prohibited. If you have received this
message in error, please immediately notify us by telephone or e-mail
and please delete the message from your system. Thank you in advance for
your cooperation.