Hi all, I am not sure I understand well the operation of v.split.
Keeping in mind the "Florida coastline" problem mentioned elsewhere in this
forum, I split a large vector with v.split.
Question is, what happens to the attributes? No new attribute table is
created as far as I can tell.
So, should one connect, via v.db.connect, the old (i.e. pre-split) attribute
table to the new split vector? Would that work? (I don't think so)
Or, should one use v.build.polilines and then v.db.connect the old table.?
And if the answer is no to all the above, is there a way that anybody can
suggest, to create a new attribute table before, during or after the v.split
that takes the new segments into account? Preferably via a script because
the number of segments would be in the 100,000.
Hi all, I am not sure I understand well the operation of v.split.
Keeping in mind the "Florida coastline" problem mentioned elsewhere in this
forum, I split a large vector with v.split.
Question is, what happens to the attributes? No new attribute table is
created as far as I can tell.
So, should one connect, via v.db.connect, the old (i.e. pre-split)
attribute table to the new split vector? Would that work? (I don't think
so) Or, should one use v.build.polilines and then v.db.connect the old
table.? And if the answer is no to all the above, is there a way that
anybody can suggest, to create a new attribute table before, during or
after the v.split that takes the new segments into account? Preferably via
a script because the number of segments would be in the 100,000.
Many thanks,
Bill
Bill,
you can check the manual ("g.manual v.split"). There is an example in which
"v.split" is followed by (optionally) "v.build.polylines" (in case you want to
have a polyline) and "v.category in=VectorMap out=VectorMap_Categorised
option=add" to add (new) categories.
Thank you Nikos. I should have explained my problem better.
I have a large contours file, originally a shape file which I imported into
GRASS. It takes ages (e.g. days) to do any processing on it in its entirety
because of its size (approx 700MB).
So I decided to divide it into smaller areas. But even the dividing (using
v.select and v.overlay) takes ages. Finally I decided to try v.split before
v.select to segment the contours and avoid the dreaded "Florida coastline"
problem. Unfortunately v.split does not create an output attributes file.
And this is where I get lost.
Assuming, for argument sake, a single contour line being v.split into 100
segments, the output file will not have any attributes (one of which is the
contour elevation). How do I create an attribute table that will attach the
correct elevation to each new contour segment (easy when you have only one
contour line, but what when you have several '000 contours?)
I hope this clarifies my problem a bit better.
As an aside, since my earlier posting I have discovered that under Windows
you can run gdal 1.7, which adds a cropping functionality to input shape
files, incredibly fast, and produces an output shape file with attributes,
including elevation. And I am thinking of using that functionality before I
import the shapefiles into GRASS, instead of doing the cropping in GRASS.
Any thoughts on this will be most welcome too.
Thank you
All this went fine (after some initial problems). Now, when I startup the application I get the following error message:
##########
'/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh'; exit
norte:~ antonio$ '/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh'; exit
Rebuilding Addon HTML manual pages index...
Rebuilding Addon menu...
Python 2.5.1 found.
/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh: line 220: /Applications/GRASS-7.0.app/Contents/MacOS/etc/Init.sh: No such file or directory
/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh: line 220: exec: /Applications/GRASS-7.0.app/Contents/MacOS/etc/Init.sh: cannot execute: No such file or directory
logout
[Process completed]
##########
I tried to google the problem, but didn't really find anything. So, I just tried to copy the init.sh from GRASS6.4 into the GRASS7 app to see what happened. After the first welcome menu, I get:
##########
Starting GRASS ...
Error in startup script: couldn't read file "/Applications/GRASS-7.0.app/Contents/MacOS/etc/gis_set.tcl": no such file or directory
Error in GUI startup. If necessary, please
report this error to the GRASS developers.
Switching to text mode now.
Hit RETURN to continue...
/Applications/GRASS-7.0.app/Contents/MacOS/etc/Init.sh: line 643: /Applications/GRASS-7.0.app/Contents/MacOS/etc/set_data: No such file or directory
logout
##########
I suspect the problem may have to do with the new GUI and the python version which comes pre-installed with MAC OS. I had problems in the past trying to run some QGIS plugins (ex: ManageR), a problems which I have not yet been able to solve (any help on this is moslty welcomed).
Other than trying to solve the problem with python, I guess the simplest thing would be to start GRASS with the older GUI (which I'm perfectly happy with, running GRASS6.4 with no problems at all). But how do I do this?
All this went fine (after some initial problems). Now, when I startup the application I get the following error message:
##########
'/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh'; exit
norte:~ antonio$ '/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh'; exit
Rebuilding Addon HTML manual pages index...
Rebuilding Addon menu...
Python 2.5.1 found.
/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh: line 220: /Applications/GRASS-7.0.app/Contents/MacOS/etc/Init.sh: No such file or directory
/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh: line 220: exec: /Applications/GRASS-7.0.app/Contents/MacOS/etc/Init.sh: cannot execute: No such file or directory
logout
[Process completed]
##########
I tried to google the problem, but didn't really find anything. So, I just tried to copy the init.sh from GRASS6.4 into the GRASS7 app to see what happened. After the first welcome menu, I get:
##########
Starting GRASS ...
Error in startup script: couldn't read file "/Applications/GRASS-7.0.app/Contents/MacOS/etc/gis_set.tcl": no such file or directory
Error in GUI startup. If necessary, please
report this error to the GRASS developers.
Switching to text mode now.
Hit RETURN to continue...
/Applications/GRASS-7.0.app/Contents/MacOS/etc/Init.sh: line 643: /Applications/GRASS-7.0.app/Contents/MacOS/etc/set_data: No such file or directory
logout
##########
I suspect the problem may have to do with the new GUI and the python version which comes pre-installed with MAC OS. I had problems in the past trying to run some QGIS plugins (ex: ManageR), a problems which I have not yet been able to solve (any help on this is moslty welcomed).
Other than trying to solve the problem with python, I guess the simplest thing would be to start GRASS with the older GUI (which I'm perfectly happy with, running GRASS6.4 with no problems at all). But how do I do this?
All this went fine (after some initial problems). Now, when I startup
the application I get the following error message:
##########
'/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh'; exit
norte:~ antonio$ '/Applications/GRASS-7.0.app/Contents/MacOS/
grass.sh'; exit
Rebuilding Addon HTML manual pages index...
Rebuilding Addon menu...
Python 2.5.1 found.
/Applications/GRASS-7.0.app/Contents/MacOS/grass.sh: line 220: /
Applications/GRASS-7.0.app/Contents/MacOS/etc/Init.sh: No such file or
directory
The GRASS startup has been modified (the shell scripts have been
removed in favour of a Python script), but the MacOSX packaging hasn't
been updated to account for this.
Other than trying to solve the problem with python, I guess the
simplest thing would be to start GRASS with the older GUI (which I'm
perfectly happy with, running GRASS6.4 with no problems at all). But
how do I do this?
You could try installing the Python script (bin.<arch>/grass70) and
using that, although it may require some changes to work work with an
"app" build.